You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Dawid Wysakowicz (Jira)" <ji...@apache.org> on 2024/03/19 14:58:00 UTC

[jira] [Updated] (FLINK-34745) Parsing temporal table join throws cryptic exceptions

     [ https://issues.apache.org/jira/browse/FLINK-34745?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dawid Wysakowicz updated FLINK-34745:
-------------------------------------
    Description: 
1. Wrong expression type in {{AS OF}}:
{code}
SELECT * " +
      "FROM Orders AS o JOIN " +
      "RatesHistoryWithPK FOR SYSTEM_TIME AS OF 'o.rowtime' AS r " +
      "ON o.currency = r.currency
{code}

throws: 

{code}
java.lang.AssertionError: cannot convert CHAR literal to class org.apache.calcite.util.TimestampString
{code}

2. Not a simple table reference in {{AS OF}}
{code}
SELECT * " +
      "FROM Orders AS o JOIN " +
      "RatesHistoryWithPK FOR SYSTEM_TIME AS OF o.rowtime + INTERVAL '1' SECOND AS r " +
      "ON o.currency = r.currency
{code}

throws:
{code}
java.lang.AssertionError: no unique expression found for {id: o.rowtime, prefix: 1}; count is 0
{code}

  was:
1. Wrong expression type in `AS OF`:
{code}
SELECT * " +
      "FROM Orders AS o JOIN " +
      "RatesHistoryWithPK FOR SYSTEM_TIME AS OF 'o.rowtime' AS r " +
      "ON o.currency = r.currency
{code}

throws: 

{code}
java.lang.AssertionError: cannot convert CHAR literal to class org.apache.calcite.util.TimestampString
{code}

2. Not a table simple table reference
{code}
SELECT * " +
      "FROM Orders AS o JOIN " +
      "RatesHistoryWithPK FOR SYSTEM_TIME AS OF o.rowtime + INTERVAL '1' SECOND AS r " +
      "ON o.currency = r.currency
{code}

throws:
{code}
java.lang.AssertionError: no unique expression found for {id: o.rowtime, prefix: 1}; count is 0
{code}


> Parsing temporal table join throws cryptic exceptions
> -----------------------------------------------------
>
>                 Key: FLINK-34745
>                 URL: https://issues.apache.org/jira/browse/FLINK-34745
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Planner
>    Affects Versions: 1.19.0
>            Reporter: Dawid Wysakowicz
>            Assignee: Dawid Wysakowicz
>            Priority: Major
>             Fix For: 1.20.0
>
>
> 1. Wrong expression type in {{AS OF}}:
> {code}
> SELECT * " +
>       "FROM Orders AS o JOIN " +
>       "RatesHistoryWithPK FOR SYSTEM_TIME AS OF 'o.rowtime' AS r " +
>       "ON o.currency = r.currency
> {code}
> throws: 
> {code}
> java.lang.AssertionError: cannot convert CHAR literal to class org.apache.calcite.util.TimestampString
> {code}
> 2. Not a simple table reference in {{AS OF}}
> {code}
> SELECT * " +
>       "FROM Orders AS o JOIN " +
>       "RatesHistoryWithPK FOR SYSTEM_TIME AS OF o.rowtime + INTERVAL '1' SECOND AS r " +
>       "ON o.currency = r.currency
> {code}
> throws:
> {code}
> java.lang.AssertionError: no unique expression found for {id: o.rowtime, prefix: 1}; count is 0
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)