ajantha-bhat commented on a change in pull request #3757:
URL: https://github.com/apache/iceberg/pull/3757#discussion_r771770609



##########
File path: 
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/procedures/RewriteDataFilesProcedure.java
##########
@@ -109,21 +106,20 @@ public StructType outputType() {
       }
 
       String where = args.isNullAt(4) ? null : args.getString(4);
-      action = checkAndApplyFilter(action, where);
+      action = checkAndApplyFilter(action, where, table.name());
 
       RewriteDataFiles.Result result = action.execute();
 
       return toOutputRows(result);
     });
   }
 
-  private RewriteDataFiles checkAndApplyFilter(RewriteDataFiles action, String 
where) {
+  private RewriteDataFiles checkAndApplyFilter(RewriteDataFiles action, String 
where, String tableName) {
     if (where != null) {
-      ParserInterface sqlParser = spark().sessionState().sqlParser();
       try {
-        Expression expression = sqlParser.parseExpression(where);
-        return 
action.filter(SparkExpressionConverter.convertToIcebergExpression(expression));
-      } catch (ParseException e) {
+        return 
action.filter(SparkExpressionConverter.convertToIcebergExpression(
+            SparkExpressionConverter.collectResolvedSparkExpression(spark(), 
tableName, where)));

Review comment:
       done




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to