Skip to content

Commit

Permalink
Spark: Improve rewrite_data_files exception handling for where clause (
Browse files Browse the repository at this point in the history
  • Loading branch information
szehon-ho authored Aug 15, 2023
1 parent 34b6058 commit ff3fa2b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ private RewriteDataFiles checkAndApplyFilter(
SparkExpressionConverter.collectResolvedSparkExpression(spark(), tableName, where);
return action.filter(SparkExpressionConverter.convertToIcebergExpression(expression));
} catch (AnalysisException e) {
throw new IllegalArgumentException("Cannot parse predicates in where option: " + where);
throw new IllegalArgumentException("Cannot parse predicates in where option: " + where, e);
}
}
return action;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ private RewriteDataFiles checkAndApplyFilter(
SparkExpressionConverter.collectResolvedSparkExpression(spark(), tableName, where);
return action.filter(SparkExpressionConverter.convertToIcebergExpression(expression));
} catch (AnalysisException e) {
throw new IllegalArgumentException("Cannot parse predicates in where option: " + where);
throw new IllegalArgumentException("Cannot parse predicates in where option: " + where, e);
}
}
return action;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ private RewriteDataFiles checkAndApplyFilter(
SparkExpressionConverter.collectResolvedSparkExpression(spark(), tableName, where);
return action.filter(SparkExpressionConverter.convertToIcebergExpression(expression));
} catch (AnalysisException e) {
throw new IllegalArgumentException("Cannot parse predicates in where option: " + where);
throw new IllegalArgumentException("Cannot parse predicates in where option: " + where, e);
}
}
return action;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ private RewriteDataFiles checkAndApplyFilter(
SparkExpressionConverter.collectResolvedSparkExpression(spark(), tableName, where);
return action.filter(SparkExpressionConverter.convertToIcebergExpression(expression));
} catch (AnalysisException e) {
throw new IllegalArgumentException("Cannot parse predicates in where option: " + where);
throw new IllegalArgumentException("Cannot parse predicates in where option: " + where, e);
}
}
return action;
Expand Down

0 comments on commit ff3fa2b

Please sign in to comment.