snuyanzin opened a new pull request, #4882:
URL: https://github.com/apache/calcite/pull/4882

   ## Jira Link
   
   [CALCITE-7471](https://issues.apache.org/jira/browse/CALCITE-7471)
   
   in case of toggled `identifierExpansion` and missed alias for table there 
should be generated one.
   However in case of `MATCH_RECOGNIZE` it is missed (the PR is going to fix it)
   example of query
   ```sql
   SELECT *
   FROM emp
   MATCH_RECOGNIZE (
     MEASURES
        FINAL COUNT(A.deptno) AS deptno
     PATTERN (A B)
     DEFINE
       A AS A.empno = 123
   )
   ```
   unparsed query (there is `EXPR$0` in `SELECT` however it is not defined 
anywhere)
   ```sql
   SELECT `EXPR$0`.`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)
   ```


-- 
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]

Reply via email to