ludlows commented on code in PR #6760:
URL: https://github.com/apache/iceberg/pull/6760#discussion_r1133170280
##########
spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/procedures/RewriteDataFilesProcedure.java:
##########
@@ -129,13 +129,14 @@ public InternalRow[] call(InternalRow args) {
private RewriteDataFiles checkAndApplyFilter(
RewriteDataFiles action, String where, String tableName) {
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);
+ Option<Expression> expressionOption =
+
SparkExpressionConverter.collectResolvedSparkExpressionOption(spark(),
tableName, where);
+ if (expressionOption.isEmpty()) {
+ return action.filter(Expressions.alwaysFalse());
Review Comment:
thanks for your sugesstion.
the code at this
[commit](https://github.com/apache/iceberg/pull/6760/commits/24bdd88e88536642a65d59b2bae0e9c0f58178f8)
now gives a more precise comment.
--
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]