pvary commented on a change in pull request #1326:
URL: https://github.com/apache/iceberg/pull/1326#discussion_r475196226
##########
File path:
mr/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergInputFormat.java
##########
@@ -36,6 +43,16 @@
@Override
public InputSplit[] getSplits(JobConf job, int numSplits) throws IOException
{
+ //Convert Hive filter to Iceberg filter
+ String hiveFilter = job.get(TableScanDesc.FILTER_EXPR_CONF_STR);
+ if (hiveFilter != null) {
+ ExprNodeGenericFuncDesc exprNodeDesc = SerializationUtilities
+ .deserializeObject(hiveFilter, ExprNodeGenericFuncDesc.class);
+ SearchArgument sarg = ConvertAstToSearchArg.create(job, exprNodeDesc);
+ Expression filter =
HiveIcebergFilterFactory.generateFilterExpression(sarg);
Review comment:
HiveIcebergFilterFactory.generateFilterExpression might throw
UnsupportedOperationException.
Maybe it would be good to catch the exception and continue without filters
in case if there is an error.
Hive runs the filters later anyway, so it will not cause issue.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]