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

[Rust] Parquet reader cannot read file where a struct column has the same name as struct member columns

    XMLWordPrintableJSON

Details

    Description

      For example, given the schema:

       
      count: struct<min: int64 not null, max: int64 not null, mean: int64 not null, count: uint64 not null, sum: int64 not null, variance: int64 not null> not null
      child 0, min: int64 not null
      child 1, max: int64 not null
      child 2, mean: int64 not null
      child 3, count: uint64 not null
      child 4, sum: int64 not null
      child 5, variance: int64 not null
      ul_observation_date: struct<min: timestamp[us] not null, max: timestamp[us] not null, mean: timestamp[us] not null, count: uint64 not null, sum: timestamp[us] not null, variance: timestamp[us] not null> not null
      child 0, min: timestamp[us] not null
      child 1, max: timestamp[us] not null
      child 2, mean: timestamp[us] not null
      child 3, count: uint64 not null
      child 4, sum: timestamp[us] not null
      child 5, variance: timestamp[us] not null
       

      The array reader performs dictionary lookups for the type of columns of types such as ul_observation_date, but when it looks up the field `count` it gets the definition not of the ul_observation_date.count field but of the `count` struct. 

       

      Attached is a sample file that exhibits this behavior.

       

      structs.parquet

      Attachments

        1. structs.parquet
          52 kB
          Max Burke

        Activity

          People

            m18e Max Burke
            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 - 2h 10m
                2h 10m