Skip to content

Read Column With Null Data Page Header (#776) - #777

Open
mukunku wants to merge 3 commits into
aloneguid:masterfrom
mukunku:mukunku/read-column-with-no-data-page-header
Open

Read Column With Null Data Page Header (#776)#777
mukunku wants to merge 3 commits into
aloneguid:masterfrom
mukunku:mukunku/read-column-with-no-data-page-header

Conversation

@mukunku

@mukunku mukunku commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

This is for #776.

One of my users reported an issue when reading a file created with PyArrow v25 where all the values in the column are null. It seems the DataPageHeader is null for this file which causes the library to throw an exception when reading it. However other providers like parquetreader.com and DuckDB are able to open this file.

This PR is my clunky attempt to make this test file readable. I'm open to feedback or if you'd like to come up with your own solution 👍🏾

break;
case PageType.DATA_PAGE:
await ReadDataPageV1Async(ph, rc, cancellationToken);
allNullColumnProcessed = definedValuesCount == 0;

@mukunku mukunku Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately rc.ValuesRead always returns 0 for this column because it has a MaxDefinitionLevel of 1. See:

public int ValuesRead => Field.MaxDefinitionLevel > 0
    ? _definitionOffset
    : _definedDataCount;

So the rc.MarkValuesRead(allValueCount); call I added below isn't actually doing anything in this situation 🤷🏾‍♂️

This is my clunky attempt to get this to work. The loop will first read the dictionary page, then the data page and then will exit early.

This also doesn't make any changes to ReadDataPageV2Async so that's also an open question 😬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant