Gabor Kaszab created IMPALA-10977:
-------------------------------------
Summary: Make zipping unnest work with absolute paths
Key: IMPALA-10977
URL: https://issues.apache.org/jira/browse/IMPALA-10977
Project: IMPALA
Issue Type: Improvement
Components: Frontend
Affects Versions: Impala 4.1.0
Reporter: Gabor Kaszab
[IMPALA-10920|https://issues.apache.org/jira/browse/IMPALA-10920] introduced
zipping unnest that has the following syntax:
{code:java}
SELECT arr1.item, arr2.item FROM tbl t, UNNEST(t.arr1, t.arr2)
{code}
However, If the arrays are given with absolute path then the query doesn't work:
{code:java}
SELECT arr1.item, arr2.item FROM UNNEST(tbl.arr1, tbl.arr2)
{code}
The reason partly is because in [SingleNodePlanner.createTableRefNode()|
https://github.com/apache/impala/blob/cd902d8c22d22ea8ebdb85e31ddc143ee0d0bf69/fe/src/main/java/org/apache/impala/planner/SingleNodePlanner.java#L2138]
the UNNEST node is only created when relative path is provided. As a result
the memory layout for the tuples related to the unnest won't be computed and a
check will fail.
But even if we create an UNNEST node even for absolute paths the plan tree will
be wrong as there won't be any SUBPLAN and SCAN nodes, so in this case it
should be handled separately to also add that part into the tree not just the
UNNEST node.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)