Skip to content

[query] Fix lowered coercers with empty partitions#10878

Merged
danking merged 2 commits intohail-is:mainfrom
tpoterba:fix-coercer-empty-partitions
Sep 15, 2021
Merged

[query] Fix lowered coercers with empty partitions#10878
danking merged 2 commits intohail-is:mainfrom
tpoterba:fix-coercer-empty-partitions

Conversation

@tpoterba
Copy link
Contributor

No description provided.

Copy link
Member

@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
Member

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
Member

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.

3 participants