cloud-fan commented on code in PR #36295:
URL: https://github.com/apache/spark/pull/36295#discussion_r874586232
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JDBCRDD.scala:
##########
@@ -304,10 +307,11 @@ private[jdbc] class JDBCRDD(
}
val myLimitClause: String = dialect.getLimitClause(limit)
+ val myOffsetClause: String = dialect.getOffsetClause(offset)
val sqlText = options.prepareQuery +
s"SELECT $columnList FROM ${options.tableOrQuery} $myTableSampleClause" +
- s" $myWhereClause $getGroupByClause $getOrderByClause $myLimitClause"
+ s" $myWhereClause $getGroupByClause $getOrderByClause $myLimitClause
$myOffsetClause"
Review Comment:
We need to be careful here. The semantic of pushdown is LIMIT first, then
OFFSET, while `LIMIT a OFFSET b` means OFFSET first in SQL spec.
--
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]