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 lowered coercers with empty partitions #10878

Merged
merged 2 commits into from
Sep 15, 2021

Conversation

tpoterba
Copy link
Contributor

No description provided.

Copy link
Collaborator

@patrick-schultz patrick-schultz left a comment

Choose a reason for hiding this comment

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

Looks good, other than one preexisting issue. Since it doesn't seem to be causing problems, I'm okay if you want to get this in and fix the other bug later.

("maxkey", ArrayRef(GetField(row, "maxkey"), I32(0)))))
}
}) { (l, r) =>
ApplyComparisonOp(LT(keyType), GetField(l, "minkey"), GetField(r, "minkey"))
Copy link
Collaborator

Choose a reason for hiding this comment

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

You didn't introduce this, but shouldn't this sort on (key, i) lexicographically? Say the partitions are [0, 2], [2, 2], [2, 5], and it sorted by min key to [0, 2], [2, 5], [2, 2]. Then we would decide the data was unsorted.

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 can fix this. I think it should sort on (minkey, maxkey) though -- the index shouldn't matter.

I believe the adversarial case is:

[0, 2], [2, 5], [2, 2]

This will be sorted to itself, and will fail the sortedness check in the next phase.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yup, you're right.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

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.

None yet

3 participants