Csaba Ringhofer created IMPALA-14732:
----------------------------------------
Summary: Precondition hit in partitioned CTAS with Iceberg
Key: IMPALA-14732
URL: https://issues.apache.org/jira/browse/IMPALA-14732
Project: IMPALA
Issue Type: Bug
Components: Frontend
Reporter: Csaba Ringhofer
create table t partitioned by (p) stored as iceberg as select cast(1 as int),
cast(1 as int) p;
2026-02-10 12:29:09 [Exception] ERROR: Query 2d452acd1c8e7564:59dc4e9600000000
failed:
IllegalStateException: null
{code}
I20260210 12:29:09.020195 2760695 jni-util.cc:321]
2d452acd1c8e7564:59dc4e9600000000] java.lang.IllegalStateException
at
com.google.common.base.Preconditions.checkState(Preconditions.java:496)
at
org.apache.impala.analysis.CreateTableStmt.createIcebergPartitionSpecFromPartitionColumns(CreateTableStmt.java:885)
at
org.apache.impala.analysis.CreateTableStmt.analyzeIcebergColumns(CreateTableStmt.java:868)
at
org.apache.impala.analysis.CreateTableStmt.analyze(CreateTableStmt.java:311)
at
org.apache.impala.analysis.CreateTableAsSelectStmt.analyze(CreateTableAsSelectStmt.java:209)
at
org.apache.impala.analysis.AnalysisContext$AnalysisDriverImpl.reAnalyze(AnalysisContext.java:673)
at
org.apache.impala.analysis.AnalysisContext$AnalysisDriverImpl.analyze(AnalysisContext.java:643)
at
org.apache.impala.analysis.AnalysisContext.analyzeAndAuthorize(AnalysisContext.java:496)
at
org.apache.impala.service.Frontend.doCreateExecRequest(Frontend.java:2992)
at
org.apache.impala.service.Frontend.getTExecRequest(Frontend.java:2556)
at
org.apache.impala.service.Frontend.getTExecRequestWithFallback(Frontend.java:2422)
at
org.apache.impala.service.Frontend.createExecRequest(Frontend.java:2109)
at
org.apache.impala.service.JniFrontend.createExecRequest(JniFrontend.java:175)
I20260210 12:29:09.020243 2760695 status.cc:129]
2d452acd1c8e7564:59dc4e9600000000] IllegalStateException: null
{code}
This issue only comes with Iceberg tables when using partitioned by instead of
partitioned by spec. The following statements work as expected:
creating non-Iceberg table:
create table t partitioned by (p) as select cast(1 as int), cast(1 as int) p;
using partitioned by spec instead of partitioned by:
create table t partitioned by spec (p) stored as iceberg as select cast(1 as
int), cast(1 as int) p;
--
This message was sent by Atlassian Jira
(v8.20.10#820010)