[ASTERIXDB-2412][COMP] ExtractCommonExpressionsRule fix - user model changes: no - storage format changes: no - interface changes: no
Details: ExtractCommonExpressionsRule should not be applied to JOIN by using Cartesian Product + SELECT since it will add extract overhead. Also, blindly adding SELECT without checking GROUP-BY and other possible OPs in between could cause type inference error.
[ASTERIXDB-2366][TEST] Optimizer tests cleanup for SQL++ - user model changes: no - storage format changes: no - interface changes: no
Details: The current optimizerTest actually doesn't use the SQL++ test cases. The existed test cases for SQLPP also have various issues. This patch cleans part of the test cases which failed at variable names changes in the result query plan.