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 2023/02/22 02:01:26 UTC
[GitHub] [spark] beliefer commented on a diff in pull request #39954: [SPARK-42289][SQL] DS V2 pushdown could let JDBC dialect decide to push down offset and limit
beliefer commented on code in PR #39954:
URL: https://github.com/apache/spark/pull/39954#discussion_r1113748723
##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala:
##########
@@ -557,6 +557,20 @@ abstract class JdbcDialect extends Serializable with Logging {
def getJdbcSQLQueryBuilder(options: JDBCOptions): JdbcSQLQueryBuilder =
new JdbcSQLQueryBuilder(this, options)
+ /**
+ * Returns ture if dialect supports LIMIT clause.
+ *
+ * Note: Some build-in dialect supports LIMIT clause with some trick, please see:
+ * {@link OracleDialect.OracleSQLQueryBuilder} and
+ * {@link MsSqlServerDialect.MsSqlServerSQLQueryBuilder}.
+ */
+ def supportsLimit: Boolean = true
+
+ /**
+ * Returns ture if dialect supports OFFSET clause.
+ */
+ def supportsOffset: Boolean = true
Review Comment:
Most databases can directly or indirectly support offset. so I think we should keep true here.
--
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