Arnab Karmakar created IMPALA-15454:
---------------------------------------
Summary: NOT in Iceberg partition filters throws
NullPointerException in SHOW FILES, SHOW PARTITIONS WHERE and DROP PARTITION
Key: IMPALA-15454
URL: https://issues.apache.org/jira/browse/IMPALA-15454
Project: IMPALA
Issue Type: Bug
Components: Frontend
Reporter: Arnab Karmakar
Any Iceberg partition filter containing NOT fails with an internal error:
{code:java}
RuntimeException: java.lang.NullPointerException: Cannot invoke
"org.apache.impala.analysis.Expr.toSql()" because "expr" is null
CAUSED BY: NullPointerException: Cannot invoke
"org.apache.impala.analysis.Expr.toSql()" because "expr" is null
{code}
Repro (any identity-partitioned Iceberg table):
{code:sql}
create table ice2 (i int, s string) partitioned by spec (i) stored as iceberg;
insert into ice2 values (1,'a'),(2,'b');
show files in ice2 partition (not i = 2); -- NPE
show files in ice2 partition (not (i = 2)); -- NPE
show partitions ice2 where not i = 2; -- NPE
alter table ice2 drop partition (not i = 2); -- NPE
show files in ice2 partition (i = 2 and not s = 'x') -- NPE
The equivalent i != 2 and i NOT IN (2) work.
{code}
Stack:
{code:java}
at
IcebergPartitionExpressionRewriter.rewrite(IcebergPartitionExpressionRewriter.java:96)
at
IcebergPartitionExpressionRewriter.rewrite(IcebergPartitionExpressionRewriter.java:207)
at
IcebergPartitionExpressionRewriter.rewrite(IcebergPartitionExpressionRewriter.java:73)
at ShowFilesStmt.analyzeIceberg(ShowFilesStmt.java:167)
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)