yuxiqian commented on code in PR #3285:
URL: https://github.com/apache/flink-cdc/pull/3285#discussion_r1597350940


##########
flink-cdc-runtime/src/main/java/org/apache/flink/cdc/runtime/parser/TransformParser.java:
##########
@@ -384,10 +481,73 @@ public static SqlSelect parseFilterExpression(String 
filterExpression) {
         StringBuilder statement = new StringBuilder();
         statement.append("SELECT * FROM ");
         statement.append(DEFAULT_TABLE);
-        if (!StringUtils.isNullOrWhitespaceOnly(filterExpression)) {
+        if (!isNullOrWhitespaceOnly(filterExpression)) {
             statement.append(" WHERE ");
             statement.append(filterExpression);
         }
         return parseSelect(statement.toString());
     }
+
+    public static SqlNode rewriteExpression(SqlNode sqlNode, Map<String, 
SqlNode> replaceMap) {
+        if (sqlNode instanceof SqlBasicCall) {
+            SqlBasicCall sqlBasicCall = (SqlBasicCall) sqlNode;

Review Comment:
   Replace `SqlCall` instead of `SqlBaseCall` to cover `SqlCase`.



##########
flink-cdc-runtime/src/main/java/org/apache/flink/cdc/runtime/parser/TransformParser.java:
##########
@@ -384,10 +481,73 @@ public static SqlSelect parseFilterExpression(String 
filterExpression) {
         StringBuilder statement = new StringBuilder();
         statement.append("SELECT * FROM ");
         statement.append(DEFAULT_TABLE);
-        if (!StringUtils.isNullOrWhitespaceOnly(filterExpression)) {
+        if (!isNullOrWhitespaceOnly(filterExpression)) {
             statement.append(" WHERE ");
             statement.append(filterExpression);
         }
         return parseSelect(statement.toString());
     }
+
+    public static SqlNode rewriteExpression(SqlNode sqlNode, Map<String, 
SqlNode> replaceMap) {
+        if (sqlNode instanceof SqlBasicCall) {
+            SqlBasicCall sqlBasicCall = (SqlBasicCall) sqlNode;

Review Comment:
   Check `SqlCall` instead of `SqlBaseCall` to cover `SqlCase`.



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

Reply via email to