-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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
[SPARK-50965][SQL][TESTS] Making sure that multiple parameterized queries work on SparkConnect #49628
Conversation
@vladimirg-db Can you take a look? |
@HyukjinKwon Could you please take a look? |
connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/ClientE2ETestSuite.scala
Outdated
Show resolved
Hide resolved
connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/ClientE2ETestSuite.scala
Outdated
Show resolved
Hide resolved
connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/ClientE2ETestSuite.scala
Outdated
Show resolved
Hide resolved
connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/ClientE2ETestSuite.scala
Outdated
Show resolved
Hide resolved
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.
and this feature was not supported previously, but this PR managed to support it
This PR is about testing, correct?
If it tests only, add the tag [TESTS]
@MaxGekk Yes, it is about testing. I accidentally didn't place the link to your PR in that sentence that you quoted. Now its fixed. |
@vladimirg-db Addressed the comments. PTAL. |
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.
LGTM after resolving comments, thanks for working on this!
connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/ClientE2ETestSuite.scala
Outdated
Show resolved
Hide resolved
connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/ClientE2ETestSuite.scala
Outdated
Show resolved
Hide resolved
val temp = spark.sql("SELECT ?", Array(i)) | ||
df = df.union(temp) | ||
} | ||
checkAnswer(df, (0 until 10).map(i => Row(i))) |
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.
This usually comes from extending QueryTest
. @MaxGekk is this a valid usage?
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.
Let's follow the existing convention, and extend QueryTest
in which Spark's session can be bound to a remote Spark session.
val temp = spark.sql("SELECT ?", Array(i)) | ||
df = df.union(temp) | ||
} | ||
checkAnswer(df, (0 until 10).map(i => Row(i))) |
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.
Let's follow the existing convention, and extend QueryTest
in which Spark's session can be bound to a remote Spark session.
connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/ClientE2ETestSuite.scala
Outdated
Show resolved
Hide resolved
Thanks @MaxGekk! Addressed your comment. |
@viktorluc-db Could you resolve conflicts, please. |
@MaxGekk Done. |
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.
Thank you for adding these test coverage. I left a few minor comments. The test body itself looks good to me.
...ctor/connect/client/jvm/src/test/scala/org/apache/spark/sql/connect/ClientE2ETestSuite.scala
Outdated
Show resolved
Hide resolved
...ctor/connect/client/jvm/src/test/scala/org/apache/spark/sql/connect/ClientE2ETestSuite.scala
Outdated
Show resolved
Hide resolved
...ctor/connect/client/jvm/src/test/scala/org/apache/spark/sql/connect/ClientE2ETestSuite.scala
Outdated
Show resolved
Hide resolved
...ctor/connect/client/jvm/src/test/scala/org/apache/spark/sql/connect/ClientE2ETestSuite.scala
Outdated
Show resolved
Hide resolved
...ctor/connect/client/jvm/src/test/scala/org/apache/spark/sql/connect/ClientE2ETestSuite.scala
Outdated
Show resolved
Hide resolved
...ctor/connect/client/jvm/src/test/scala/org/apache/spark/sql/connect/ClientE2ETestSuite.scala
Outdated
Show resolved
Hide resolved
@dongjoon-hyun Addressed your comments. Thanks! |
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. Thank you, @viktorluc-db , @vladimirg-db, @MaxGekk .
Merged to master.
There was a conflict on |
…d queries work on SparkConnect ### What changes were proposed in this pull request? Tests only. This the same PR as [this](#49628). The only difference is that this one is for `branch-4.0`. ### Why are the changes needed? Making sure that having multiple parametrization nodes in the parsed logical plan is handled properly. Multiple parametrization nodes are made by doing a union of different dataframes over SparkConnect, and this feature was not supported previously, but [this](#49442) PR managed to support it, so testing for this feature was needed. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Tests in. `ClientE2ETestSuite`. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #49731 from viktorluc-db/parametrization_nodes. Authored-by: viktorluc-db <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
What changes were proposed in this pull request?
Tests only.
Why are the changes needed?
Making sure that having multiple parametrization nodes in the parsed logical plan is handled properly. Multiple parametrization nodes are made by doing a union of different dataframes over SparkConnect, and this feature was not supported previously, but this PR managed to support it, so testing for this feature was needed.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Tests in
ClientE2ETestSuite
.Was this patch authored or co-authored using generative AI tooling?
No.