Xianqing He has uploaded a new patch set (#4). ( http://gerrit.cloudera.org:8080/17688 )
Change subject: IMPALA-10799: Analysis slowdown with inline views and thousands of column ...................................................................... IMPALA-10799: Analysis slowdown with inline views and thousands of column If there are thousands of columns in the inlineview, it‘s very slow in analysis. Most of the cost is in the get() calls used to find expressions in the local substitution map when checking if the column is ambiguous. The fix is to 1.Use LinkedHashMap to search and check if we have already seen the alias. 2.Remove the check of checkComposedFrom() since the codes have been mature for a while Testing: Performance testing with a query with 10000 expressions of the following form: with a as (select c1 c1, c1 c2, c1 c3, ... from t) select c1, c2, c3, ... from a; repro query analysis went from 7.5 sec to less than 1 sec. Change-Id: I43da47dddfdb3db6d0e2073ae974a0a4d1b3ad7c --- M fe/src/main/java/org/apache/impala/analysis/InlineViewRef.java M fe/src/main/java/org/apache/impala/analysis/SelectStmt.java 2 files changed, 8 insertions(+), 2 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/88/17688/4 -- To view, visit http://gerrit.cloudera.org:8080/17688 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I43da47dddfdb3db6d0e2073ae974a0a4d1b3ad7c Gerrit-Change-Number: 17688 Gerrit-PatchSet: 4 Gerrit-Owner: Xianqing He <hexianqing...@126.com> Gerrit-Reviewer: Aman Sinha <amsi...@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Quanlong Huang <huangquanl...@gmail.com> Gerrit-Reviewer: Xianqing He <hexianqing...@126.com>