pan3793 commented on code in PR #56092:
URL: https://github.com/apache/spark/pull/56092#discussion_r3295012816


##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcSQLQueryBuilder.scala:
##########
@@ -170,10 +169,10 @@ class JdbcSQLQueryBuilder(dialect: JdbcDialect, options: 
JDBCOptions) {
   }
 
   /**
-   * Constructs the table sample clause that following dialect's SQL syntax.
+   * Sets a pre-compiled table sample clause directly.
    */
-  def withTableSample(sample: TableSampleInfo): JdbcSQLQueryBuilder = {
-    tableSampleClause = dialect.getTableSample(sample)
+  def withTableSampleClause(clause: String): JdbcSQLQueryBuilder = {

Review Comment:
   MIMA complains about it - this changes the propagation from the uncompiled 
`TableSampleInfo` to the compiled `TABLESAMPLE ...` clause, to avoid calling 
the `JdbcDialect.compileTableSample` again at the end.



-- 
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]

Reply via email to