[ 
https://issues.apache.org/jira/browse/IMPALA-12319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17749049#comment-17749049
 ] 

ASF subversion and git services commented on IMPALA-12319:
----------------------------------------------------------

Commit e38bc96b49d05a15464d174336ea6b21ffb04f5e in impala's branch 
refs/heads/master from stiga-huang
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=e38bc96b4 ]

IMPALA-12319: Fix NullPointerException in UnnestExpr.isBoundByTupleIds()

UnnestExpr can be used in a sort tuple which won't have a resolved path.
In such case, there is no parent tuple id so we should not check it in
UnnestExpr.isBoundByTupleIds(). This fixes the NullPointerException.

Tests
 - Added fe and e2e tests for sorting columns come from unnest().
 - Move test_zipping_unnest_from_view to a dedicated class that only has
   the parquet file_format dimension to make sure it also runs in "core"
   exploration strategy. Before this it only runs in "exhaustive"
   strategy.

Change-Id: I43e1ef0467edfb8a4a23047a439426053c93ad72
Reviewed-on: http://gerrit.cloudera.org:8080/20274
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>


> NullPointerException in UnnestExpr.isBoundByTupleIds()
> ------------------------------------------------------
>
>                 Key: IMPALA-12319
>                 URL: https://issues.apache.org/jira/browse/IMPALA-12319
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Frontend
>    Affects Versions: Impala 4.1.0, Impala 4.2.0, Impala 4.1.1, Impala 4.1.2
>            Reporter: Quanlong Huang
>            Assignee: Quanlong Huang
>            Priority: Critical
>
> Create a table with the array type:
> {code:sql}
> create table array_test(
>   col1 string,
>   col2 string,
>   names array<string>)
> stored as parquet;{code}
> The following query failed by NullPointerException:
> {code:sql}
> select
>   col1,
>   row_number() over(partition by col1 order by name) as rn
> from (
>   select
>     col1,
>     col2,
>     unnest(names) as name
>   from array_test
> ) m1;{code}
> Stacktrace of the exception:
> {code}
> I0727 14:16:09.869918 30463 Frontend.java:2344] 
> db4ea476341c34b5:717cbd2400000000] Analysis and authorization finished.
> I0727 14:16:09.922134 30463 jni-util.cc:288] 
> db4ea476341c34b5:717cbd2400000000] java.lang.NullPointerException
>         at 
> org.apache.impala.analysis.UnnestExpr.isBoundByTupleIds(UnnestExpr.java:246)
>         at org.apache.impala.analysis.Expr.isBound(Expr.java:1408)
>         at 
> org.apache.impala.analysis.SortInfo.checkConsistency(SortInfo.java:177)
>         at 
> org.apache.impala.analysis.SortInfo.createSortTupleInfo(SortInfo.java:244)
>         at 
> org.apache.impala.planner.AnalyticPlanner.createSortInfo(AnalyticPlanner.java:358)
>         at 
> org.apache.impala.planner.AnalyticPlanner.createSortInfo(AnalyticPlanner.java:320)
>         at 
> org.apache.impala.planner.AnalyticPlanner.createSortGroupPlan(AnalyticPlanner.java:426)
>         at 
> org.apache.impala.planner.AnalyticPlanner.createSingleNodePlan(AnalyticPlanner.java:143)
>         at 
> org.apache.impala.planner.SingleNodePlanner.createQueryPlan(SingleNodePlanner.java:296)
>         at 
> org.apache.impala.planner.SingleNodePlanner.createSingleNodePlan(SingleNodePlanner.java:171)
>         at 
> org.apache.impala.planner.Planner.createPlanFragments(Planner.java:127)
>         at org.apache.impala.planner.Planner.createPlans(Planner.java:280)
>         at 
> org.apache.impala.service.Frontend.createExecRequest(Frontend.java:1801)
>         at 
> org.apache.impala.service.Frontend.getPlannedExecRequest(Frontend.java:2677)
>         at 
> org.apache.impala.service.Frontend.doCreateExecRequest(Frontend.java:2472)
>         at 
> org.apache.impala.service.Frontend.getTExecRequest(Frontend.java:2089)
>         at 
> org.apache.impala.service.Frontend.createExecRequest(Frontend.java:1860)
>         at 
> org.apache.impala.service.JniFrontend.createExecRequest(JniFrontend.java:165)
> {code}



--
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