ajantha-bhat opened a new issue #3756:
URL: https://github.com/apache/iceberg/issues/3756
call stack:
```
Invalid call to dataType on unresolved object
org.apache.spark.sql.catalyst.analysis.UnresolvedException: Invalid call to
dataType on unresolved object
at
app//org.apache.spark.sql.catalyst.analysis.UnresolvedAttribute.dataType(unresolved.scala:160)
at
app//org.apache.spark.sql.execution.datasources.DataSourceStrategy$.translateLeafNodeFilter(DataSourceStrategy.scala:533)
at
app//org.apache.spark.sql.execution.datasources.DataSourceStrategy$.translateFilterWithMapping(DataSourceStrategy.scala:614)
at
app//org.apache.spark.sql.execution.datasources.DataSourceStrategy$.translateFilter(DataSourceStrategy.scala:565)
at
app//org.apache.spark.sql.execution.datasources.SparkExpressionConverter$.convertToIcebergExpression(SparkExpressionConverter.scala:31)
at
app//org.apache.spark.sql.execution.datasources.SparkExpressionConverter.convertToIcebergExpression(SparkExpressionConverter.scala)
at
app//org.apache.iceberg.spark.procedures.RewriteDataFilesProcedure.checkAndApplyFilter(RewriteDataFilesProcedure.java:125)
at
app//org.apache.iceberg.spark.procedures.RewriteDataFilesProcedure.lambda$call$0(RewriteDataFilesProcedure.java:112)
```
Cause:
sqlParser.parseExpression(where) gives unresolved expression. Most of the
filters doesn't need it to be resolved. Some special filter like In-filter
needs resolved type because based on datatype it creates HashSet.
Solution:
Use a resolved expression.
I found a hacky sparkish way to achieve it. Will raise a PR for the same.
cc: @RussellSpitzer , @jackye1995
--
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]