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

Fix arrays_overlap, array_intersect, and array_except when one input is a constant with dictionary-encoded elements #2954

Closed
wants to merge 1 commit into from

Conversation

kagamiori
Copy link
Contributor

@kagamiori kagamiori commented Oct 25, 2022

Summary:
arrays_overlap, array_intersect, and array_except have a special handling of literal
input in validateConstantVectorAndGenerateSet(), but this function assumes the
element vector of the literal array vector is flat. Velox fuzzer found a corner case
where one of their inputs is the result of another function on a literal and this result
has dictionary-encoded elements, e.g.,arrays_overlap(c0, array_distinct(ARRAY [1, 2, 3, 3]))
(#2793). arrays_overlap, array_intersect, and array_except throws before this fix.
This diff adds the handling of dictionary-encoded element vector.

Reviewed By: mbasmanova

Differential Revision:
D40663617

LaMa Project: L1134559

@netlify
Copy link

netlify bot commented Oct 25, 2022

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit 9a4947f
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/635892452fad4500083925cf

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported labels Oct 25, 2022
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D40663617

…is a constant with dictionary-encoded elements (facebookincubator#2954)

Summary:
Pull Request resolved: facebookincubator#2954

arrays_overlap, array_intersect, and array_except have a special handling of literal
input in `validateConstantVectorAndGenerateSet()`, but this function
assumes the element vector of the literal array vector is flat. Velox fuzzer found a
corner case where one of their inputs is the result of another function on a literal
and this result has dictionary-encoded elements, e.g.,
`arrays_overlap(c0, array_distinct(ARRAY [1, 2, 3, 3]))` (facebookincubator#2793). arrays_overlap, array_intersect, and array_except throws before this fix. This diff
adds the handling of dictionary-encoded element vector.

Reviewed By: mbasmanova

Differential Revision:
D40663617

LaMa Project: L1134559

fbshipit-source-id: 1d8a118c6f6823dbcd7558f22f85203d4404651f
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D40663617

marin-ma pushed a commit to marin-ma/velox-oap that referenced this pull request Dec 15, 2023
…`JoinRelParser` (facebookincubator#2954)

* [GLUTEN-2953][CH] Simplify SerializedPlanParser: introduce JoinRelParser

* Fix Style
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants