[
https://issues.apache.org/jira/browse/IMPALA-12580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Peter Rozsa resolved IMPALA-12580.
----------------------------------
Fix Version/s: Impala 4.3.0
Resolution: Fixed
> Iceberg predicate filtering fails with UnsupportedOperationException
> --------------------------------------------------------------------
>
> Key: IMPALA-12580
> URL: https://issues.apache.org/jira/browse/IMPALA-12580
> Project: IMPALA
> Issue Type: Improvement
> Components: fe
> Affects Versions: Impala 4.3.0
> Reporter: Peter Rozsa
> Assignee: Peter Rozsa
> Priority: Major
> Labels: iceberg
> Fix For: Impala 4.3.0
>
>
> If a SELECT contains a predicate that is a candidate for propagation like "a
> = 10 and b = a", the optimizer replaces these predicates with a new one,
> where the id of the predicate is null.
> There's a check in the Expr's hashCode implementation, if the id of the
> expression is null, we throw an UnsupportedOperationException.
> The problem surfaced after IMPALA-12089, to fixthis problem, proper cloning
> and id generation should be used for every expression.
> ([https://github.com/apache/impala/blob/6e90dafcf4b8528061c5ae20933e112c355da834/fe/src/main/java/org/apache/impala/analysis/Analyzer.java#L2519)]
> To avoid this problem for Iceberg expression, a quick fix can be applied by
> replacing the collection of expressions from toSet() to toList()
>
> Minimal reproducible example:
> {code:java}
> create table i1(a int, b int, c int) partitioned by spec(a, b) stored as
> iceberg;
> insert into i1(a, b, c) values (1, 1, 1);
> select * from i1 where a = 1 and b = a and c = 1;{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]