czy006 commented on code in PR #3426:
URL: https://github.com/apache/amoro/pull/3426#discussion_r1986686461


##########
amoro-format-iceberg/src/main/java/org/apache/amoro/utils/ExpressionUtil.java:
##########
@@ -79,4 +108,169 @@ public static Expression convertPartitionDataToDataFilter(
     }
     return filter;
   }
+
+  /**
+   * Convert SQL filter to Iceberg {@link Expression}.
+   *
+   * @param sqlFilter the SQL filter
+   * @param tableColumns the list of table columns
+   * @return the Iceberg {@link Expression}
+   */
+  public static Expression convertSqlFilterToIcebergExpression(
+      String sqlFilter, List<Types.NestedField> tableColumns) {
+    if (sqlFilter == null) {
+      return Expressions.alwaysTrue();
+    }
+
+    try {
+      Select statement = (Select) CCJSqlParserUtil.parse("SELECT * FROM dummy 
WHERE " + sqlFilter);

Review Comment:
   thank you for your explanation.



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