JohannesFranzMaier commented on issue #1353:
URL: https://github.com/apache/arrow-rs/issues/1353#issuecomment-1898696629

   I think in the meantime there was a change that it is actually checked. For 
example, I want to construct this schema:
   ```Rust
   let flow_field = Field::new("flow", DataType::Float32, false);
   let field_value_list = Field::new("Value", 
DataType::FixedSizeList(Arc::from(flow_field), 3), false);
   let schema = Schema::new(vec![field_value_list]);
   ```
   So far, no problem.
   But afterwards I use this builder to build the FixedSizeList.
   ```Rust
   let mut flow_data = FixedSizeListBuilder::new(Float32Builder::new(), 3);
   ```
   The problem is now, when I want to construct a `RecordBatch` from my schema 
and the data output:
   ```Rust
   let flow_column = Arc::new(flow_data.finish()) as Arc<dyn Array>;
   RecordBatch::try_new(Arc::from(schema), vec![flow_column])?
   ```
   I get the following error:
   ```
   Invalid argument error: column types must match schema types, expected 
FixedSizeList(Field { name: "flow", data_type: Float32, nullable: false, 
dict_id: 0, dict_is_ordered: false, metadata: {} }, 3) but found 
FixedSizeList(Field { name: "item", data_type: Float32, nullable: true, 
dict_id: 0, dict_is_ordered: false, metadata: {} }, 3) at column index 0
   ```
   
   Am I mistaken here or shouldn't that work?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to