You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Gabor Kaszab (Jira)" <ji...@apache.org> on 2021/08/04 11:17:00 UTC
[jira] [Updated] (IMPALA-10838) Error when struct returned from
WITH() and used in an ORDER BY
[ https://issues.apache.org/jira/browse/IMPALA-10838?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gabor Kaszab updated IMPALA-10838:
----------------------------------
Description:
{code:java}
with sub as (
select id, small_struct
from functional_orc_def.complextypes_structs
where length(small_struct.s) > 5)
select sub.id, sub.small_struct from sub order by sub.small_struct.i desc;
{code}
The above query results an error when trying to run SlotRef.toThrift()
{code:java}
ERROR: IllegalStateException: Illegal reference to non-materialized tuple: debugname=InlineViewRef sub alias=sub tid=2
{code}
If I used e.g. sub.id in the order by the query would succeed as expected so the root cause here is referencing the members of the struct coming from an inline view (WITH()) in the order by.
> Error when struct returned from WITH() and used in an ORDER BY
> --------------------------------------------------------------
>
> Key: IMPALA-10838
> URL: https://issues.apache.org/jira/browse/IMPALA-10838
> Project: IMPALA
> Issue Type: Bug
> Components: Frontend
> Reporter: Gabor Kaszab
> Priority: Major
> Labels: complextype, nested_types
>
> {code:java}
> with sub as (
> select id, small_struct
> from functional_orc_def.complextypes_structs
> where length(small_struct.s) > 5)
> select sub.id, sub.small_struct from sub order by sub.small_struct.i desc;
> {code}
> The above query results an error when trying to run SlotRef.toThrift()
> {code:java}
> ERROR: IllegalStateException: Illegal reference to non-materialized tuple: debugname=InlineViewRef sub alias=sub tid=2
> {code}
> If I used e.g. sub.id in the order by the query would succeed as expected so the root cause here is referencing the members of the struct coming from an inline view (WITH()) in the order by.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org