bharadwaj-pendyala opened a new pull request, #12266: URL: https://github.com/apache/arrow-rs/pull/12266
# Which issue does this PR close? - Closes #12265. # Rationale for this change fastparquet writes the empty `row_groups` list of a 0-row file as a single `0x00` header. #8827 made `read_list_begin` accept that header, but the element type check added in #9924 still rejects it. These files fail to open with "Expected list element type of Struct but got Byte". # What changes are included in this PR? `validate_list_type` skips the element type check when the list is empty. Every caller loops over `size`. An empty list therefore decodes no elements, while non-empty lists are checked as before. This accepts any empty list header, not only `0x00`, as suggested in the issue. The narrower alternative is to accept only the `Byte` placeholder that `read_list_begin` returns for `0x00`. # Are these changes tested? Yes. `test_file_reader_empty_row_groups_with_zero_list_header` writes a 0-row file, patches the `row_groups` list header in the footer from `0x0C` to `0x00`, and opens it. `test_read_empty_list_with_zero_header` covers `read_thrift_vec` directly. Both fail on main with the error from the issue. # Are there any significant user-facing changes? No. # AI usage disclosure I used Claude to write the fix, the tests and this description. I reproduced the failure and ran the parquet test suite locally before opening the PR. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
