Skip to content

Conversation

@cloud-fan
Copy link
Contributor

What changes were proposed in this pull request?

Improve SparkConnectJdbcDataTypeSuite to reuse the statement instances in withExecuteQuery if possible

Why are the changes needed?

use less resources in tests

Does this PR introduce any user-facing change?

no

How was this patch tested?

existing tests

Was this patch authored or co-authored using generative AI tooling?

cursor 2.1.50

@cloud-fan
Copy link
Contributor Author

cc @pan3793 @dongjoon-hyun

@pan3793
Copy link
Member

pan3793 commented Dec 8, 2025

LGTM, but you may want to merge this one after #53371, from a new contributor, suppose the author can quickly address the comments

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a 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, @cloud-fan and @pan3793 .

I'm going to land this first. Pending CIs.

@dongjoon-hyun
Copy link
Member

To @cloud-fan , please fix the linter failure.

Scalastyle checks failed at following occurrences:
[error] /__w/spark/spark/sql/connect/client/jdbc/src/test/scala/org/apache/spark/sql/connect/client/jdbc/SparkConnectJdbcDataTypeSuite.scala:318: File line length exceeds 100 characters
[error] /__w/spark/spark/sql/connect/client/jdbc/src/test/scala/org/apache/spark/sql/connect/client/jdbc/SparkConnectJdbcDataTypeSuite.scala:651: File line length exceeds 100 characters
[error] /__w/spark/spark/sql/connect/client/jdbc/src/test/scala/org/apache/spark/sql/connect/client/jdbc/SparkConnectJdbcDataTypeSuite.scala:727: File line length exceeds 100 characters
[error] Total time: 62 s (0:01:02.0), completed Dec 8, 2025, 3:33:58 PM

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-54638][SQL][TEST] reuse statement instaces if possible in SparkConnectJdbcDataTypeSuite [SPARK-54638][SQL][TEST] Reuse statement instance if possible in SparkConnectJdbcDataTypeSuite Dec 8, 2025
@dongjoon-hyun dongjoon-hyun changed the title [SPARK-54638][SQL][TEST] Reuse statement instance if possible in SparkConnectJdbcDataTypeSuite [SPARK-54638][SQL][TEST] Reuse statement instances if possible in SparkConnectJdbcDataTypeSuite Dec 8, 2025
dongjoon-hyun pushed a commit that referenced this pull request Dec 8, 2025
…arkConnectJdbcDataTypeSuite`

### What changes were proposed in this pull request?

Improve `SparkConnectJdbcDataTypeSuite` to reuse the statement instances in `withExecuteQuery` if possible

### Why are the changes needed?

use less resources in tests

### Does this PR introduce _any_ user-facing change?

no

### How was this patch tested?

existing tests

### Was this patch authored or co-authored using generative AI tooling?

cursor 2.1.50

Closes #53385 from cloud-fan/test.

Lead-authored-by: Wenchen Fan <wenchen@databricks.com>
Co-authored-by: Wenchen Fan <cloud0fan@gmail.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit ce9dcab)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
@dongjoon-hyun
Copy link
Member

Merged to master/4.1 for Apache Spark 4.1.0.

xu20160924 pushed a commit to xu20160924/spark that referenced this pull request Dec 9, 2025
…arkConnectJdbcDataTypeSuite`

Improve `SparkConnectJdbcDataTypeSuite` to reuse the statement instances in `withExecuteQuery` if possible

use less resources in tests

no

existing tests

cursor 2.1.50

Closes apache#53385 from cloud-fan/test.

Lead-authored-by: Wenchen Fan <wenchen@databricks.com>
Co-authored-by: Wenchen Fan <cloud0fan@gmail.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants