-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-42702][SPARK-42623][SQL] Support parameterized query in subquery and CTE #40333
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
Conversation
MaxGekk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Waiting for CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is "query parameters" a term? I thought we go by "parameter marker". Either way we can be more descriptive.
| "Query parameters in Command." | |
| "Parameter markers in a DDL statement. Parameter markers must only be used in a query, or DML statement. Usage within CREATE or ALTER is unsupported." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "PARAMETERIZED_COMMAND" : { | |
| "PARAMETERIZED_DDL" : { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you don't mind, can we have a negative test case for this case-sensitive?
dongjoon-hyun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, cc @sunchao , @huaxingao , @viirya , too.
|
The failed |
…ry and CTE ### What changes were proposed in this pull request? This PR fixes a few issues of parameterized query: 1. replace placeholders in CTE/subqueries 2. don't replace placeholders in non-DML commands as it may store the original SQL text with placeholders and we can't resolve it later (e.g. CREATE VIEW). ### Why are the changes needed? make the parameterized query feature complete ### Does this PR introduce _any_ user-facing change? yes, bug fix ### How was this patch tested? new tests Closes #40333 from cloud-fan/parameter. Authored-by: Wenchen Fan <[email protected]> Signed-off-by: Wenchen Fan <[email protected]> (cherry picked from commit a780703) Signed-off-by: Wenchen Fan <[email protected]>
|
This is a bug fix of a new feature in 3.4, so I won't call it a release blocker. I've set the fixed version to 3.4.0, if rc3 passes, I'll change it to 3.4.1. |
|
Seems like the compliation didn't pass. Let me just quickly revert this and reopen. |
|
maybe there is a conflict right after my last commit, let me rebase |
dongjoon-hyun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, LGTM (Pending CIs)
|
GA passes, let me merge it back. |
…ry and CTE This PR fixes a few issues of parameterized query: 1. replace placeholders in CTE/subqueries 2. don't replace placeholders in non-DML commands as it may store the original SQL text with placeholders and we can't resolve it later (e.g. CREATE VIEW). make the parameterized query feature complete yes, bug fix new tests Closes #40333 from cloud-fan/parameter. Authored-by: Wenchen Fan <[email protected]> Signed-off-by: Wenchen Fan <[email protected]> (cherry picked from commit f8966e7) Signed-off-by: Wenchen Fan <[email protected]>
…ry and CTE This PR fixes a few issues of parameterized query: 1. replace placeholders in CTE/subqueries 2. don't replace placeholders in non-DML commands as it may store the original SQL text with placeholders and we can't resolve it later (e.g. CREATE VIEW). make the parameterized query feature complete yes, bug fix new tests Closes apache#40333 from cloud-fan/parameter. Authored-by: Wenchen Fan <[email protected]> Signed-off-by: Wenchen Fan <[email protected]> (cherry picked from commit f8966e7) Signed-off-by: Wenchen Fan <[email protected]>
What changes were proposed in this pull request?
This PR fixes a few issues of parameterized query:
Why are the changes needed?
make the parameterized query feature complete
Does this PR introduce any user-facing change?
yes, bug fix
How was this patch tested?
new tests