Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-10656

[Rust] New RecordBatch requires exact match of Data Types

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0
    • Rust

    Description

      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) 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

      Attachments

        Activity

          People

            nevi_me Neville Dipale
            ch-sc Christoph Schulze
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 8h 40m
                8h 40m