Hi Dev, I'm not sure about the commented code in [1]. I could not produce an expression where it used in a sub-plan and not visible to upper operators? Also, all SQL++ runtime integration tests seem to work just fine.
[1] ExtractCommonExpressionsRule.java#L192 <https://github.com/apache/asterixdb/blob/f2c18aa9646238ab2487ce3a964edfe3e61dd6e1/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/ExtractCommonExpressionsRule.java#L192> -- *Regards,* Wail Alkowaileet
