Skip to content

[SPARK-51022][SQL] Remove unused tableSampleClause in build() method of MsSqlServerSQLQueryBuilder and DB2SQLQueryBuilder#49714

Closed
wayneguow wants to merge 2 commits into
apache:masterfrom
wayneguow:jdbc_tablesample
Closed

[SPARK-51022][SQL] Remove unused tableSampleClause in build() method of MsSqlServerSQLQueryBuilder and DB2SQLQueryBuilder#49714
wayneguow wants to merge 2 commits into
apache:masterfrom
wayneguow:jdbc_tablesample

Conversation

@wayneguow
Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

This PR aims to remove unused tableSampleClause in build() method of MsSqlServerSQLQueryBuilder and DB2SQLBuilder.

From the discussion here: #49711 (comment)

Why are the changes needed?

Currently, MsSqlServerDialect and DB2Dialect don't support tableSample (default value of supportsTableSample is false), so tableSampleClause is unnecessary when building sql in the build() method.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Updated a related test case and passed GA.

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

No.

@github-actions github-actions Bot added the SQL label Jan 28, 2025
@dongjoon-hyun
Copy link
Copy Markdown
Member

cc @beliefer

@wayneguow wayneguow marked this pull request as ready for review January 29, 2025 03:55
Copy link
Copy Markdown
Contributor

@beliefer beliefer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@wayneguow wayneguow changed the title [SPARK-51022][SQL] Remove unused tableSampleClause in build() method of MsSqlServerSQLQueryBuilder and DB2SQLBuilder [SPARK-51022][SQL] Remove unused tableSampleClause in build() method of MsSqlServerSQLQueryBuilder and DB2SQLQueryBuilder Jan 29, 2025
@beliefer beliefer closed this in 840f74a Jan 29, 2025
beliefer pushed a commit that referenced this pull request Jan 29, 2025
…hod of `MsSqlServerSQLQueryBuilder` and `DB2SQLQueryBuilder`

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

This PR aims to remove unused `tableSampleClause` in `build()` method of `MsSqlServerSQLQueryBuilder` and `DB2SQLBuilder`.

From the discussion here: #49711 (comment)

### Why are the changes needed?

Currently, `MsSqlServerDialect` and `DB2Dialect` don't support `tableSample` (default value of `supportsTableSample` is `false`), so `tableSampleClause` is unnecessary when building sql in the `build()` method.

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

No.

### How was this patch tested?

Updated a  related test case and passed GA.

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

No.

Closes #49714 from wayneguow/jdbc_tablesample.

Authored-by: Wei Guo <guow93@gmail.com>
Signed-off-by: beliefer <beliefer@163.com>
(cherry picked from commit 840f74a)
Signed-off-by: beliefer <beliefer@163.com>
@beliefer
Copy link
Copy Markdown
Contributor

Merged into master/branch-4.0 Thank you all! @wayneguow @dongjoon-hyun

@dongjoon-hyun
Copy link
Copy Markdown
Member

Thank you, @wayneguow and @beliefer .

@wayneguow wayneguow deleted the jdbc_tablesample branch February 11, 2025 04:25
zifeif2 pushed a commit to zifeif2/spark that referenced this pull request Nov 14, 2025
…hod of `MsSqlServerSQLQueryBuilder` and `DB2SQLQueryBuilder`

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

This PR aims to remove unused `tableSampleClause` in `build()` method of `MsSqlServerSQLQueryBuilder` and `DB2SQLBuilder`.

From the discussion here: apache#49711 (comment)

### Why are the changes needed?

Currently, `MsSqlServerDialect` and `DB2Dialect` don't support `tableSample` (default value of `supportsTableSample` is `false`), so `tableSampleClause` is unnecessary when building sql in the `build()` method.

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

No.

### How was this patch tested?

Updated a  related test case and passed GA.

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

No.

Closes apache#49714 from wayneguow/jdbc_tablesample.

Authored-by: Wei Guo <guow93@gmail.com>
Signed-off-by: beliefer <beliefer@163.com>
(cherry picked from commit ba0ec11)
Signed-off-by: beliefer <beliefer@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants