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

[query] Fix simplify rule for nested TableFilterIntervals #9114

Merged
merged 1 commit into from
Jul 22, 2020

Conversation

tpoterba
Copy link
Contributor

No description provided.

@johnc1231
Copy link
Contributor

Would you mind explaining what was wrong / context?

CHANGELOG: Fixed crash when using repeated calls to `hl.filter_intervals`.
@@ -769,7 +770,7 @@ object Simplify {
case TableFilterIntervals(TableAggregateByKey(child, expr), intervals, keep) =>
TableAggregateByKey(TableFilterIntervals(child, intervals, keep), expr)
case TableFilterIntervals(TableFilterIntervals(child, i1, keep1), i2, keep2) if keep1 == keep2 =>
val ord = child.typ.keyType.ordering.intervalEndpointOrdering
val ord = PartitionBoundOrdering(child.typ.keyType).intervalEndpointOrdering
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Somewhat recently we refactored things so that the struct prefix ordering (where you can compare structs that may have different sizes) is separate from the IR struct ordering (assert same length). The former is now called PartitionBoundOrdering, and it's used with partition intervals (also filter_intervals). This is a bug because if you tried to filter a table with a length-2 key with length-1 intervals, you'd hit that assertion.

@danking danking merged commit 73e79b8 into hail-is:master Jul 22, 2020
Dania-Abuhijleh pushed a commit to Dania-Abuhijleh/hail that referenced this pull request Jul 23, 2020
CHANGELOG: Fixed crash when using repeated calls to `hl.filter_intervals`.
annamiraotoole pushed a commit to annamiraotoole/hail that referenced this pull request Aug 3, 2020
CHANGELOG: Fixed crash when using repeated calls to `hl.filter_intervals`.
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.

3 participants