[ASTERIXDB-3007][COMP] Fix ConsolidateWindowOperatorsRule
authorDmitry Lychagin <dmitry.lychagin@couchbase.com>
Mon, 31 Jan 2022 22:42:57 +0000 (14:42 -0800)
committerDmitry Lychagin <dmitry.lychagin@couchbase.com>
Tue, 1 Feb 2022 20:08:08 +0000 (20:08 +0000)
commit11a30f10ab84c523cbea10b879bd1c2a245dda00
tree03db8c5a772df1bbd4ef39ef3ad84d555f70c599
parent9e1c416123e7a46458b91ae7d6713751c305b965
 [ASTERIXDB-3007][COMP] Fix ConsolidateWindowOperatorsRule

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Fix ConsolidateWindowOperatorsRule to correclty merge window
  operator with subplans into window operator without subplans
- Fix deep copy visitors for window operator with subplans
- Add compiler sanity check code to verify that each nested tuple
  source operator correctly points to its datasource operator

Change-Id: Ib9077a0331ab57cdd449426be77f05741d0778cc
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/15063
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Dmitry Lychagin <dmitry.lychagin@couchbase.com>
Reviewed-by: Ali Alsuliman <ali.al.solaiman@gmail.com>
asterixdb/asterix-app/src/test/resources/optimizerts/queries/window/win_opt_02/win_opt_02_1.sqlpp [new file with mode: 0644]
asterixdb/asterix-app/src/test/resources/optimizerts/results/window/win_opt_02/win_opt_02_1.plan [new file with mode: 0644]
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/window/win_opt_02/win_opt_02.10.query.sqlpp [new file with mode: 0644]
asterixdb/asterix-app/src/test/resources/runtimets/results/window/win_opt_02/win_opt_02.10.adm [new file with mode: 0644]
hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/visitors/LogicalOperatorDeepCopyWithNewVariablesVisitor.java
hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/visitors/OperatorDeepCopyVisitor.java
hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/plan/PlanStructureVerifier.java
hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/ConsolidateWindowOperatorsRule.java