snuyanzin opened a new pull request, #4876: URL: https://github.com/apache/calcite/pull/4876
## Jira Link [CALCITE-7467](https://issues.apache.org/jira/browse/CALCITE-7467) ## Changes Proposed The issue is that from one side Calcite doesn't support aliases (before `MATCH_RECOGNIZE`) like ```sql SELECT `T`.`DEPTNO` FROM `CATALOG`.`SALES`.`EMP` AS `EMP` MATCH_RECOGNIZE( MEASURES FINAL COUNT(`A`.`DEPTNO`) AS `DEPTNO` PATTERN (`A` `B`) DEFINE `A` AS (PREV(`A`.`EMPNO`, 0) = 123 AS `A`)) AS `T` ``` From another side Calcite produces such unsupported SQL while unparsing (in case of `SqlValidator.Config#identifierExpansion` is toggled) So there are 2 ways: either support it or disable identifier expansion for this case. I checked against Oracle and it also doesn't support it, so I picked the second option -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
