Christoph Schulze created ARROW-10656:
-----------------------------------------
Summary: New RecordBatch requires exact match of Data Types
Key: ARROW-10656
URL: https://issues.apache.org/jira/browse/ARROW-10656
Project: Apache Arrow
Issue Type: Bug
Components: Rust
Reporter: Christoph Schulze
When instanciating a new RecordBatch with {{try_new()}}, the data types of
columns are checked to match their corresponding fields in the schema with
{{==}}. The {{==}} operator will consider all attribues of the two data types
and compare strictly if all values are equal. However, a code comment above
this comparison indicates _[1]_:
?? list types can have different names, but we only need the data types to be
the same??
Since ARROW-10261 ([PR|https://github.com/apache/arrow/pull/8608]) was merged
lists contain a {{Field}} instead of just a {{DataType}}. Therefore, the values
of this field are striclty compared. This behavior contradicts the comment.
*Solution*
The data type comparison in {{try_new()}} should be changed into only matching
data types, including the nested ones, but leaving out other values.
_[1] src/record_batch.rs:103_
--
This message was sent by Atlassian Jira
(v8.3.4#803005)