Skip to content

Fix PlanRemoteProjections#16136

Merged
rongrong merged 1 commit intoprestodb:masterfrom
rongrong:remote-udf
May 20, 2021
Merged

Fix PlanRemoteProjections#16136
rongrong merged 1 commit intoprestodb:masterfrom
rongrong:remote-udf

Conversation

@rongrong
Copy link
Contributor

@rongrong rongrong commented May 20, 2021

When a function/operator only has constants as input, processedArguments.size() could be 0.
Previous logic can produce index out of bound exception.

Test plan - unit test

== RELEASE NOTES ==

General Changes
* Fix a bug where queries that have both remote functions and a local function with only constant arguments could throw an IndexOutOfBoundException during planning. The bug was introduced in release 0.253 by :pr:`16039`.

When a function/operator only has constants as input, processedArguments.size() could be 0.
Previous logic can produce index out of bound exception.
@rongrong rongrong requested review from highker and rschlussel May 20, 2021 19:58
@rschlussel
Copy link
Contributor

For the release note, can you clarify the error case? "remote functions and local function with only constant arguments" isn't clear to me. Does that mean remote or local functions with only constant arguments? also, instead of the PR the bug was introduced in, maybe share the release number where it was introduced.

@rongrong
Copy link
Contributor Author

For the release note, can you clarify the error case? "remote functions and local function with only constant arguments" isn't clear to me. Does that mean remote or local functions with only constant arguments? also, instead of the PR the bug was introduced in, maybe share the release number where it was introduced.

I tried to modify it to make it clearer. Basically what I want to say is that 1) the query has remote functions (cause otherwise we'd by-pass the rule at the beginning) 2) it also has local functions that only has constant arguments. Please help me reword it if you can describe it better. Thanks!

@rongrong rongrong merged commit 8aa2961 into prestodb:master May 20, 2021
@sujay-jain sujay-jain mentioned this pull request May 21, 2021
10 tasks
@rongrong rongrong deleted the remote-udf branch November 23, 2021 23:12
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.

2 participants