beliefer commented on code in PR #39660: URL: https://github.com/apache/spark/pull/39660#discussion_r1083729512
########## sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala: ########## @@ -544,6 +544,14 @@ abstract class JdbcDialect extends Serializable with Logging { if (limit > 0 ) s"LIMIT $limit" else "" } + /** + * MS SQL Server version of `getLimitClause`. + * This is only supported by SQL Server as it uses TOP (N) instead. + */ + def getTopExpression(limit: Integer): String = { Review Comment: I think we should define the different syntax by dialect themself. I exact the API getSQLText so as some dialect could implement it in special way. ########## sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala: ########## @@ -544,6 +544,14 @@ abstract class JdbcDialect extends Serializable with Logging { if (limit > 0 ) s"LIMIT $limit" else "" } + /** + * MS SQL Server version of `getLimitClause`. + * This is only supported by SQL Server as it uses TOP (N) instead. + */ + def getTopExpression(limit: Integer): String = { Review Comment: I think we should define the different syntax by dialect themself. I exact the API `getSQLText` so as some dialect could implement it in special way. -- 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