You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "sadikovi (via GitHub)" <gi...@apache.org> on 2023/01/22 22:22:27 UTC

[GitHub] [spark] sadikovi commented on a diff in pull request #39667: [SPARK-42131][SQL] Extract the function that construct the select statement for JDBC dialect.

sadikovi commented on code in PR #39667:
URL: https://github.com/apache/spark/pull/39667#discussion_r1083555237


##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala:
##########
@@ -551,6 +552,63 @@ abstract class JdbcDialect extends Serializable with Logging {
     if (offset > 0 ) s"OFFSET $offset" else ""
   }
 
+  /**
+   * returns the SQL text for the SELECT statement.
+   *
+   * @param options - JDBC options that contains url, table and other information.
+   * @param columnList - The names of the columns or aggregate columns to SELECT.
+   * @param sample - The pushed down tableSample.
+   * @param predicates - The predicates to include in all WHERE clauses.
+   * @param part - The JDBCPartition specifying partition id and WHERE clause.
+   * @param groupByClause - The group by clause for the SELECT statement.
+   * @param orderByClause - The order by clause for the SELECT statement.
+   * @param limit - The pushed down limit. If the value is 0, it means no limit or limit
+   *                is not pushed down.
+   * @param offset - The pushed down offset. If the value is 0, it means no offset or offset
+   *                 is not pushed down.
+   * @return
+   */
+  def getSQLText(

Review Comment:
   Do we have unit tests that cover it? If not, maybe it is a good time to add them to make sure the string is generated correctly.



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