wangsheng has uploaded this change for review. ( http://gerrit.cloudera.org:8080/18061
Change subject: IMPALA-11040: Remove unnecessary reset() method in class 'UnionStmt' ...................................................................... IMPALA-11040: Remove unnecessary reset() method in class 'UnionStmt' When query contains multiple nested union stmt, more than twenty or thirty, and needs 'reAnalyze', such as rewrite expr. Query would execute slowly, even failed due to 'reset' method called in class 'UnionStmt' and 'SetOperationStmt'. 'SetOperationStmt' is added in IMPALA-9943 and IMPALA-4974. Multiple nested union stmt will lead to 'reset' called numbers to grow exponentially. Since 'operands_' will be reset in two class' reset() method, and handle with their children recursively. Too many nested union stmt will caused depth nesting. UnionStmt.reset() content is almost same as SetOperationStmt.reset(). This patch removed this method in 'UnionStmt'. After this, the original query would execute quickly. An example already add in file 'union.test', without this patch, the example query will execute slowly, maybe be failed. Testing: - Added new test case in 'union.test' Change-Id: I408a396d40d9622f2ae6c459f49cbfcc19affd14 --- M fe/src/main/java/org/apache/impala/analysis/UnionStmt.java M testdata/workloads/functional-query/queries/QueryTest/union.test 2 files changed, 129 insertions(+), 20 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/61/18061/1 -- To view, visit http://gerrit.cloudera.org:8080/18061 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I408a396d40d9622f2ae6c459f49cbfcc19affd14 Gerrit-Change-Number: 18061 Gerrit-PatchSet: 1 Gerrit-Owner: wangsheng <sky...@163.com>