eskabetxe commented on code in PR #160:
URL: 
https://github.com/apache/flink-connector-jdbc/pull/160#discussion_r2052134266


##########
flink-connector-jdbc-core/src/main/java/org/apache/flink/connector/jdbc/core/database/dialect/JdbcDialect.java:
##########
@@ -58,6 +58,16 @@ public interface JdbcDialect extends Serializable {
      */
     String getLimitClause(long limit);
 
+    /**
+     * Get the way of add limit clause. the default way of append by origin 
sql end.
+     * @param query origin query sql
+     * @param limit number of row to emit. The value of the parameter should 
be non-negative.
+     * @return the entire sql after adding limit clause.
+     */
+    default String addLimitClause(String query, long limit) {

Review Comment:
   Should we add this default implementation to AbstractJdbcDialect and leave 
the interface without an implementation?



##########
flink-connector-jdbc-core/src/main/java/org/apache/flink/connector/jdbc/core/database/dialect/JdbcDialect.java:
##########
@@ -58,6 +58,16 @@ public interface JdbcDialect extends Serializable {
      */
     String getLimitClause(long limit);
 
+    /**
+     * Get the way of add limit clause. the default way of append by origin 
sql end.
+     * @param query origin query sql
+     * @param limit number of row to emit. The value of the parameter should 
be non-negative.
+     * @return the entire sql after adding limit clause.
+     */
+    default String addLimitClause(String query, long limit) {

Review Comment:
   Should we add this default implementation to AbstractDialect and leave the 
interface without an implementation?



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to