Skip to content

Comments

Avoid pushdown of negative position for element_at as subfield pruning for array #23479

Merged
jp-sivaprasad merged 1 commit intoprestodb:masterfrom
jp-sivaprasad:issue-22690-negative-array-subscript-pushdown
Aug 23, 2024
Merged

Avoid pushdown of negative position for element_at as subfield pruning for array #23479
jp-sivaprasad merged 1 commit intoprestodb:masterfrom
jp-sivaprasad:issue-22690-negative-array-subscript-pushdown

Conversation

@jp-sivaprasad
Copy link
Contributor

@jp-sivaprasad jp-sivaprasad commented Aug 20, 2024

Description

Currently negative array subscript (for example, an array index of -2, for element_at ) is pushed down as subfield pruning, and worker is not sanity checking against it causing IllegalArgumentException
(Issue : #22690)

The fix is to avoid pushing down negative position for element_at for array, in PushdownSubfields.toSubfield()

Motivation and Context

Impact

Test Plan

Contributor checklist

  • Please make sure your submission complies with our development, formatting, commit message, and attribution guidelines.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.

Release Notes

Please follow release notes guidelines and fill in the release notes below.

== RELEASE NOTES ==

General Changes
* Avoid pushdown of negative position for element_at for array  :pr:`23479`

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 20, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@tdcmeehan tdcmeehan self-assigned this Aug 20, 2024
@jp-sivaprasad jp-sivaprasad force-pushed the issue-22690-negative-array-subscript-pushdown branch from 636e226 to 473b72e Compare August 20, 2024 22:47
@jp-sivaprasad jp-sivaprasad changed the title Avoid pushdown of negative position for element_at for array as subfield pruning Avoid pushdown of negative position for element_at as subfield pruning for array Aug 20, 2024
@jp-sivaprasad jp-sivaprasad force-pushed the issue-22690-negative-array-subscript-pushdown branch from 473b72e to 2e3cea5 Compare August 21, 2024 18:25
elharo
elharo previously approved these changes Aug 21, 2024
@jp-sivaprasad jp-sivaprasad force-pushed the issue-22690-negative-array-subscript-pushdown branch from 2e3cea5 to 5ec446d Compare August 21, 2024 20:34
@tdcmeehan
Copy link
Contributor

Please reword commit message per our guidelines in CONTRIBUTING. Perhaps Avoid pushdown of negative position for element_at

@jp-sivaprasad jp-sivaprasad force-pushed the issue-22690-negative-array-subscript-pushdown branch 2 times, most recently from 5c7eec1 to 44ac434 Compare August 21, 2024 20:57
@jp-sivaprasad jp-sivaprasad force-pushed the issue-22690-negative-array-subscript-pushdown branch from 44ac434 to be2dcc8 Compare August 23, 2024 17:08
@tdcmeehan
Copy link
Contributor

Please add a release note @jp-sivaprasad

@jp-sivaprasad jp-sivaprasad merged commit 9ede266 into prestodb:master Aug 23, 2024
@jaystarshot jaystarshot mentioned this pull request Nov 1, 2024
25 tasks
@tdcmeehan tdcmeehan added the from:IBM PR from IBM label Dec 13, 2024
@prestodb-ci prestodb-ci requested a review from a team December 13, 2024 15:20
@prestodb-ci prestodb-ci requested review from bibith4 and namya28 and removed request for a team December 13, 2024 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

from:IBM PR from IBM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Negative array subscript being pushdown as subfield pruning and worker is not checking against it

3 participants