Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow filtering on newly added columns #246

Merged
merged 2 commits into from
Jan 3, 2024
Merged

Allow filtering on newly added columns #246

merged 2 commits into from
Jan 3, 2024

Conversation

Fokko
Copy link
Contributor

@Fokko Fokko commented Jan 1, 2024

Resolves #217

Copy link
Contributor

@amogh-jahagirdar amogh-jahagirdar left a comment

Choose a reason for hiding this comment

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

Some questions, but nothing that I think is blocking, thanks @Fokko !

Comment on lines 912 to 916
if "Not found in file schema" in str(e):
if isinstance(expr, BoundIsNull):
return AlwaysTrue()
else:
return AlwaysFalse()
Copy link
Contributor

Choose a reason for hiding this comment

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

Curious, why not do this in the visitor itself (_ColumnNameTranslator#visit_bound_predicate)? Is it something we would want decoupled from it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I actually like that more, great suggestion 👍

Comment on lines +384 to +385
arrow_table = test_table_add_column.scan(row_filter="b == '2'").to_arrow()
assert arrow_table["b"].to_pylist() == ['2']
Copy link
Contributor

Choose a reason for hiding this comment

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

As a sanity check should we add a test which validates that a row_filter='b is NOT NULL' returns the same?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a good one, added 👍

@Fokko Fokko merged commit 5af05bd into apache:main Jan 3, 2024
6 checks passed
sungwy pushed a commit to sungwy/iceberg-python that referenced this pull request Jan 13, 2024
* Allow filtering on newly added columns

Resolves apache#217

* Thanks Amogh!
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.

Incorrect filtering on newly added columns
2 participants