wayneguow commented on code in PR #49564:
URL: https://github.com/apache/spark/pull/49564#discussion_r1929755875
##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcSQLQueryBuilder.scala:
##########
@@ -67,6 +68,18 @@ class JdbcSQLQueryBuilder(dialect: JdbcDialect, options:
JDBCOptions) {
*/
protected var tableSampleClause: String = ""
+ /**
+ * A hint sample clause representing query hints.
+ */
+ protected val hintClause: String = {
+ if (options.hint == "" || dialect.supportsHint) {
+ options.hint
+ } else {
+ throw QueryExecutionErrors.hintUnsupportedForJdbcDialectError(
Review Comment:
@beliefer I made a check here, and I think the string judgment of the url in
`JDBCOptions` is hard-coded.
In the current way, if we want to add a new JDBCDialect to support hint, we
only need to rewrite the `supportsHint` attribute.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]