Noémi Pap-Takács created IMPALA-14013:
-----------------------------------------

             Summary: DROP INCREMENTAL STATS throws NullPointerException for 
Iceberg tables
                 Key: IMPALA-14013
                 URL: https://issues.apache.org/jira/browse/IMPALA-14013
             Project: IMPALA
          Issue Type: Bug
          Components: Frontend
            Reporter: Noémi Pap-Takács


Create the table and insert values so that there will be at least 1 partition

 
{code:java}
> create table ice_t (i int) partitioned by (j int, s string) stored by iceberg;
> insert into ice_t select 20, 1, '2012'; {code}
 

 

Compute incremental stats for the table.
{code:java}
> compute incremental stats ice_t;
Query: compute incremental stats ice_t
+-----------------------------------------+
| summary                                 |
+-----------------------------------------+
| Updated 1 partition(s) and 3 column(s). |
+-----------------------------------------+
Fetched 1 row(s) in 0.20s

{code}
 

We must specify the partition if we want to drop the incremental stats:
{code:java}
> drop incremental stats ice_t;
[Exception]  ERROR: Query bc41297c26b997b2:3c2750b400000000 failed:
ParseException: Syntax error in line 1:
drop incremental stats ice_t
                            ^
Encountered: EOF
Expected: PARTITION
CAUSED BY: Exception: Syntax error {code}
 

Specifying the partition (correctly) produces a NullPointerException:
{code:java}
> drop incremental stats ice_t partition (j=1, s='2012');
[Exception]  ERROR: Query 2b4dcbe0b140a566:8844a7c600000000 failed: 
NullPointerException: null {code}
 

 

The partitions of Iceberg tables are handled by the Iceberg library. Impala 
does not have an internal representation of them, it handles Iceberg tables as 
if they had only 1 HDFS partition, similarly to an unpartitioned HDFS table. 
This might explain why we get an exception.

We should throw an AnalysisException with explanation if we cannot handle 
incremental stats for Iceberg tables.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to