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


##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/DatabricksDialect.scala:
##########
@@ -71,10 +73,10 @@ private case class DatabricksDialect() extends JdbcDialect 
with NoLegacyJDBCErro
 
   override def supportsOffset: Boolean = true
 
-  override def supportsTableSample: Boolean = true
-
-  override def getTableSample(sample: TableSampleInfo): String = {
-    s"TABLESAMPLE (${(sample.upperBound - sample.lowerBound) * 100}) 
REPEATABLE (${sample.seed})"
+  override def compileTableSample(sample: TableSampleInfo): Option[String] = {
+    if (sample.withReplacement || sample.sampleMethod == SampleMethod.System) 
return None

Review Comment:
   according to 
https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-qry-select-sampling,
 Databricks SQL does not support `TABLESAMPLE SYSTEM`



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