You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "jibiyr (Jira)" <ji...@apache.org> on 2021/03/10 06:27:00 UTC

[jira] [Comment Edited] (CALCITE-4526) SqlSnapshot unparse problem when tablRef is As-SqlBasicCall

    [ https://issues.apache.org/jira/browse/CALCITE-4526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17298490#comment-17298490 ] 

jibiyr edited comment on CALCITE-4526 at 3/10/21, 6:26 AM:
-----------------------------------------------------------

[~julianhyde] , the problem is happend after validate, and then the tableRef in SqlSnapshot is SqlBasicCall and the Operator is SqlAsOperator. 

we need write the *FOR SYSTEM_TIME AS OF*  and period between the tableId and alias.

 


was (Author: yr):
[~julianhyde] , this problem is happend after SqlIdentifier is validated to SqlBasicCall . how to add test in this case. may I do this change?

> SqlSnapshot unparse problem when tablRef is As-SqlBasicCall
> -----------------------------------------------------------
>
>                 Key: CALCITE-4526
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4526
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.26.0
>            Reporter: jibiyr
>            Priority: Blocker
>
> hi,community. now calcite support SqlSnapshot. 
> when a sql like _*SELECT orders.order_id, products.pro_id, products.product_name*_
> _*FROM default_catalog.default_database.orders AS orders*_
> _*LEFT JOIN default_catalog.default_database.products FOR SYSTEM_TIME AS OF orders.proctime AS products ON orders.product_id = products.pro_id .*_
>  
> _*default_catalog.default_database.products FOR SYSTEM_TIME AS OF orders.proctime AS products*_  parse to SqlSnapshot .however, when unparse. it is _*default_catalog.default_database.products AS products FOR SYSTEM_TIME AS OF orders.proctime.*_ which can not be parsed again.
>  
> if we should consider this condition.
> the same problem when I found in FLINK-19670.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)