ConeyLiu commented on code in PR #8560:
URL: https://github.com/apache/iceberg/pull/8560#discussion_r1325962585
##########
spark/v3.4/spark/src/main/java/org/apache/iceberg/spark/procedures/RewriteDataFilesProcedure.java:
##########
@@ -129,15 +124,10 @@ public InternalRow[] call(InternalRow args) {
}
private RewriteDataFiles checkAndApplyFilter(
- RewriteDataFiles action, String where, String tableName) {
+ RewriteDataFiles action, String where, Identifier ident) {
if (where != null) {
- try {
- Expression expression =
- SparkExpressionConverter.collectResolvedSparkExpression(spark(),
tableName, where);
- return
action.filter(SparkExpressionConverter.convertToIcebergExpression(expression));
- } catch (AnalysisException e) {
- throw new IllegalArgumentException("Cannot parse predicates in where
option: " + where, e);
- }
+ Expression expression = filterExpression(ident, where);
Review Comment:
Thanks for the code reuse and cleaning.
--
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]