Fix ASTERIXDB-1205: cleanup union related rules.
-fixed EliminateSubplanWithInputCardinalityOneRule for general cases;
-fixed the type inference invocation in PushAssignBelowUnionAllRule;
-factored out ITypingContext and IVariableContext so that the operator deep copy
visitor can also be used in the language translator without types;
-added a rule to remove Cartesian product with an ETS input.
Change-Id: I7ad982108a4dc119249222c8ebb9e5897d93783c
Reviewed-on: https://asterix-gerrit.ics.uci.edu/628
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <tillw@apache.org>
16 files changed