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

[Rust] Unable to read Parquet file because of mismatch in column-derived and embedded schemas

    XMLWordPrintableJSON

Details

    Description

      The issue seems to stem from the new(-ish) behavior of the Arrow Parquet reader where the embedded arrow schema is used instead of deriving the schema from the Parquet columns.

       

      However it seems like some cases still derive the schema type from the column types, leading to the Arrow record batch reader erroring out that the column types must match the schema types.

       

      In our case, the column type is an int96 datetime (ns) type, and the Arrow type in the embedded schema is DataType::Timestamp(TimeUnit::Nanoseconds, Some("UTC")). However, the code that constructs the Arrays seems to re-derive this column type as DataType::Timestamp(TimeUnit::Nanoseconds, None) (because the Parquet schema has no timezone information). And so, Parquet files that we were able to read successfully with our branch of Arrow circa October are now unreadable.

       

      I've attached an example of a Parquet file that demonstrates the problem. This file was created in Python (as most of our Parquet files are).

       

      I've also attached a sample Rust program that will demonstrate the error.

      Attachments

        1. 0100c937-7c1c-78c4-1f4b-156ef04e79f0.parquet
          918 kB
          Max Burke
        2. main.rs
          0.9 kB
          Max Burke

        Issue Links

          Activity

            People

              nevi_me Neville Dipale
              m18e Max Burke
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 1h 50m
                  1h 50m