You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/12/15 18:04:10 UTC

[GitHub] [iceberg] ajantha-bhat opened a new issue #3756: In-filter throws exception for rewrite_data_files procedure.

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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] jackye1995 closed issue #3756: In-filter throws exception for rewrite_data_files procedure.

Posted by GitBox <gi...@apache.org>.
jackye1995 closed issue #3756:
URL: https://github.com/apache/iceberg/issues/3756


   


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org