cloud-fan commented on a change in pull request #34451: URL: https://github.com/apache/spark/pull/34451#discussion_r740226173
########## File path: sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala ########## @@ -370,6 +371,10 @@ abstract class JdbcDialect extends Serializable with Logging{ * returns whether the dialect supports limit or not */ def supportsLimit(): Boolean = true + + def supportsTableSample: Boolean = false + + def getTableSample(sample: Option[TableSample]): String = "" Review comment: why the input is an `Option`? I think we should only call this API if we do have a table sample gets pushed down. ########## File path: sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala ########## @@ -370,6 +371,10 @@ abstract class JdbcDialect extends Serializable with Logging{ * returns whether the dialect supports limit or not */ def supportsLimit(): Boolean = true + + def supportsTableSample: Boolean = false + + def getTableSample(sample: Option[TableSample]): String = "" Review comment: why the input is an `Option`? I think we should only call this API if we do have a table sample got pushed down. -- 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-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org