You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Quanlong Huang (Jira)" <ji...@apache.org> on 2026/05/07 07:25:00 UTC
[jira] [Created] (IMPALA-14957) IllegalStateException when using unnest() with UNION in inline view
Quanlong Huang created IMPALA-14957:
---------------------------------------
Summary: IllegalStateException when using unnest() with UNION in inline view
Key: IMPALA-14957
URL: https://issues.apache.org/jira/browse/IMPALA-14957
Project: IMPALA
Issue Type: Bug
Components: Frontend
Reporter: Quanlong Huang
Assignee: Quanlong Huang
The following query failed with IllegalStateException
{code:sql}
with l as (
select 1, 2
UNION ALL
SELECT id, unnest(arr1) FROM functional_parquet.complextypes_arrays)
select * from l LIMIT 10;{code}
The error logs:
{noformat}
I20260507 15:19:21.481348 515633 Frontend.java:2443] d24a51e768b3d7fa:cf72dba300000000] OriginalPlanner planner failed: class java.lang.IllegalStateException
I20260507 15:19:21.481555 515633 jni-util.cc:335] d24a51e768b3d7fa:cf72dba300000000] java.lang.RuntimeException: java.lang.IllegalStateException: computeMemLayout not done for slot: arr1 (tid=1 sid=2)
at org.apache.impala.service.Frontend.getTExecRequestWithFallback(Frontend.java:2459)
at org.apache.impala.service.Frontend.createExecRequest(Frontend.java:2126)
at org.apache.impala.service.JniFrontend.createExecRequest(JniFrontend.java:175)
Caused by: java.lang.IllegalStateException: computeMemLayout not done for slot: arr1 (tid=1 sid=2)
at com.google.common.base.Preconditions.checkState(Preconditions.java:601)
at org.apache.impala.analysis.SlotRef.toThrift(SlotRef.java:333)
at org.apache.impala.analysis.Expr.treeToThriftHelper(Expr.java:906)
at org.apache.impala.analysis.Expr.treeToThrift(Expr.java:884)
at org.apache.impala.analysis.Expr.treesToThrift(Expr.java:948)
at org.apache.impala.planner.UnionNode.toThrift(UnionNode.java:363)
at org.apache.impala.planner.PlanNode.treeToThriftHelper(PlanNode.java:592)
at org.apache.impala.planner.PlanNode.treeToThriftHelper(PlanNode.java:599)
at org.apache.impala.planner.PlanNode.treeToThrift(PlanNode.java:523)
at org.apache.impala.planner.PlanFragment.toThrift(PlanFragment.java:656)
at org.apache.impala.service.Frontend.createPlanExecInfo(Frontend.java:2050)
at org.apache.impala.service.Frontend.createExecRequest(Frontend.java:2078)
at org.apache.impala.service.Frontend.getPlannedExecRequest(Frontend.java:3424)
at org.apache.impala.service.Frontend.doCreateExecRequest(Frontend.java:3198)
at org.apache.impala.service.Frontend.getTExecRequest(Frontend.java:2590)
at org.apache.impala.service.Frontend.getTExecRequestWithFallback(Frontend.java:2436)
... 2 more{noformat}
It seems an issue of unnest(). I can workaround the error by not using unnest():
{code:sql}
with l as (
select 1, 2
UNION ALL
SELECT id, a.item FROM functional_parquet.complextypes_arrays t, t.arr1 a)
select * from l LIMIT 10;{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)