Repository: ArroyoSystems/arroyo (language: rust)

Issue:
Compilation failure when casting types
The S3 sink work (#197 ) appears to have introduced a regression around casting and type handling. This query now produces a compilation error:

```sql
SELECT CAST(1 as FLOAT)
from nexmark100;
```

The error occurs when constructing the record builder:

```
error[E0308]: mismatched types
   --> pipeline/src/main.rs:375:50
    |
375 |                 self.Int64_1__array.append_value(data.Int64_1_);
    |                                     ------------ ^^^^^^^^^^^^^ expected `i32`, found `f32`
    |                                     |
    |                                     arguments to this method are incorrect
    |
note: method defined here
   --> /Users/mwylde/.cargo/git/checkouts/arrow-rs-4244527eea6aecc6/31d78a5/arrow-array/src/builder/primitive_builder.rs:205:12
    |
205 |     pub fn append_value(&mut self, v: T::Native) {
    |            ^^^^^^^^^^^^
```


Discussion / hints:

Fix patch:
diff --git a/arroyo-sql/src/types.rs b/arroyo-sql/src/types.rs
index c0fb37b0a..10204c314 100644
--- a/arroyo-sql/src/types.rs
+++ b/arroyo-sql/src/types.rs
@@ -876,7 +876,9 @@ impl StructField {
                     quote!(arrow_array::builder::PrimitiveBuilder::<arrow_array::types::Int16Type>)
                 }
                 DataType::Float32 => {
-                    quote!(arrow_array::builder::PrimitiveBuilder::<arrow_array::types::Int32Type>)
+                    quote!(
+                        arrow_array::builder::PrimitiveBuilder::<arrow_array::types::Float32Type>
+                    )
                 }
                 DataType::Float64 => {
                     quote!(arrow_array::builder::PrimitiveBuilder::<arrow_array::types::Int64Type>)


Test patch: