You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "beliefer (via GitHub)" <gi...@apache.org> on 2025/01/28 12:03:13 UTC
[PR] [SPARK-50666][SQL][FOLLOWUP] Fix some minor issues for JDBC hint support [spark]
beliefer opened a new pull request, #49711:
URL: https://github.com/apache/spark/pull/49711
### What changes were proposed in this pull request?
This PR proposes to fix some minor issues related to https://github.com/apache/spark/pull/49564
### Why are the changes needed?
First, simplify some code.
Second, The JDBC dialects doesn't hint should not override the SQL builder. It's confused.
Third, fix a little incorrect comment.
### Does this PR introduce _any_ user-facing change?
'No'.
New feature.
### How was this patch tested?
GA.
### Was this patch authored or co-authored using generative AI tooling?
'No'.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-50666][SQL][FOLLOWUP] Revise JDBC hint support and remove a typo in comment [spark]
Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on PR #49711:
URL: https://github.com/apache/spark/pull/49711#issuecomment-2619360069
@dongjoon-hyun @wayneguow Thank you!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-50666][SQL][FOLLOWUP] Revise JDBC hint support and remove a typo in comment [spark]
Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on PR #49711:
URL: https://github.com/apache/spark/pull/49711#issuecomment-2619266455
The failed `sparkr` is irrelevant to this PR. Let me merge this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-50666][SQL][FOLLOWUP] Fix some minor issues for JDBC hint support [spark]
Posted by "wayneguow (via GitHub)" <gi...@apache.org>.
wayneguow commented on code in PR #49711:
URL: https://github.com/apache/spark/pull/49711#discussion_r1932085311
##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/DB2Dialect.scala:
##########
@@ -207,7 +207,7 @@ private case class DB2Dialect() extends JdbcDialect with SQLConfHelper with NoLe
val offsetClause = dialect.getOffsetClause(offset)
options.prepareQuery +
- s"SELECT $hintClause$columnList FROM ${options.tableOrQuery} $tableSampleClause" +
Review Comment:
In addition, if `hintClause` is not called in `MySQLSQLQueryBuilder` and `DB2SQLBuilder`, if users set `hint` option when using `MsSqlServerDialect` and `DB2Dialect`, will no error be thrown?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-50666][SQL][FOLLOWUP] Fix some minor issues for JDBC hint support [spark]
Posted by "wayneguow (via GitHub)" <gi...@apache.org>.
wayneguow commented on code in PR #49711:
URL: https://github.com/apache/spark/pull/49711#discussion_r1932085311
##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/DB2Dialect.scala:
##########
@@ -207,7 +207,7 @@ private case class DB2Dialect() extends JdbcDialect with SQLConfHelper with NoLe
val offsetClause = dialect.getOffsetClause(offset)
options.prepareQuery +
- s"SELECT $hintClause$columnList FROM ${options.tableOrQuery} $tableSampleClause" +
Review Comment:
In addition, if `hintClause` is not called in `MySQLSQLQueryBuilder` and `DB2SQLBuilder`, if users set `hint` option when using `MsSqlServerDialect` and `DB2Dialect`, will no error be thrown?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-50666][SQL][FOLLOWUP] Revise JDBC hint support and remove a typo in comment [spark]
Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun closed pull request #49711: [SPARK-50666][SQL][FOLLOWUP] Revise JDBC hint support and remove a typo in comment
URL: https://github.com/apache/spark/pull/49711
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-50666][SQL][FOLLOWUP] Revise JDBC hint support and remove a typo in comment [spark]
Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on code in PR #49711:
URL: https://github.com/apache/spark/pull/49711#discussion_r1932345432
##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/DB2Dialect.scala:
##########
@@ -207,7 +207,7 @@ private case class DB2Dialect() extends JdbcDialect with SQLConfHelper with NoLe
val offsetClause = dialect.getOffsetClause(offset)
options.prepareQuery +
- s"SELECT $hintClause$columnList FROM ${options.tableOrQuery} $tableSampleClause" +
Review Comment:
BTW, that could be an orthogonal topic, @beliefer and @wayneguow . :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-50666][SQL][FOLLOWUP] Revise JDBC hint support and remove a typo in comment [spark]
Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on code in PR #49711:
URL: https://github.com/apache/spark/pull/49711#discussion_r1932340254
##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/DB2Dialect.scala:
##########
@@ -207,7 +207,7 @@ private case class DB2Dialect() extends JdbcDialect with SQLConfHelper with NoLe
val offsetClause = dialect.getOffsetClause(offset)
options.prepareQuery +
- s"SELECT $hintClause$columnList FROM ${options.tableOrQuery} $tableSampleClause" +
Review Comment:
@wayneguow Do you interested in fix it?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-50666][SQL][FOLLOWUP] Fix some minor issues for JDBC hint support [spark]
Posted by "wayneguow (via GitHub)" <gi...@apache.org>.
wayneguow commented on code in PR #49711:
URL: https://github.com/apache/spark/pull/49711#discussion_r1932068274
##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/DB2Dialect.scala:
##########
@@ -207,7 +207,7 @@ private case class DB2Dialect() extends JdbcDialect with SQLConfHelper with NoLe
val offsetClause = dialect.getOffsetClause(offset)
options.prepareQuery +
- s"SELECT $hintClause$columnList FROM ${options.tableOrQuery} $tableSampleClause" +
Review Comment:
I have a little question. For `tableSample`, currently only `DatabricksDialect` and `PostgresDialect` are supported, but I see that the `tableSampleClause` is also added in `MySQLSQLQueryBuilder` and `MsSqlServeSQLQueryBuilder`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-50666][SQL][FOLLOWUP] Revise JDBC hint support and remove a typo in comment [spark]
Posted by "wayneguow (via GitHub)" <gi...@apache.org>.
wayneguow commented on code in PR #49711:
URL: https://github.com/apache/spark/pull/49711#discussion_r1932368886
##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/DB2Dialect.scala:
##########
@@ -207,7 +207,7 @@ private case class DB2Dialect() extends JdbcDialect with SQLConfHelper with NoLe
val offsetClause = dialect.getOffsetClause(offset)
options.prepareQuery +
- s"SELECT $hintClause$columnList FROM ${options.tableOrQuery} $tableSampleClause" +
Review Comment:
@beliefer Yes, I'll submit a PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-50666][SQL][FOLLOWUP] Fix some minor issues for JDBC hint support [spark]
Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on PR #49711:
URL: https://github.com/apache/spark/pull/49711#issuecomment-2618814610
ping @dongjoon-hyun cc @wayneguow
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-50666][SQL][FOLLOWUP] Revise JDBC hint support and remove a typo in comment [spark]
Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on code in PR #49711:
URL: https://github.com/apache/spark/pull/49711#discussion_r1932335212
##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/DB2Dialect.scala:
##########
@@ -207,7 +207,7 @@ private case class DB2Dialect() extends JdbcDialect with SQLConfHelper with NoLe
val offsetClause = dialect.getOffsetClause(offset)
options.prepareQuery +
- s"SELECT $hintClause$columnList FROM ${options.tableOrQuery} $tableSampleClause" +
Review Comment:
Hmm, we need to remove them.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org