Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-34745

Parsing temporal table join throws cryptic exceptions

    XMLWordPrintableJSON

Details

    Description

      1. Wrong expression type in AS OF:

      SELECT * " +
            "FROM Orders AS o JOIN " +
            "RatesHistoryWithPK FOR SYSTEM_TIME AS OF 'o.rowtime' AS r " +
            "ON o.currency = r.currency
      

      throws:

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

      2. Not a simple table reference in AS OF

      SELECT * " +
            "FROM Orders AS o JOIN " +
            "RatesHistoryWithPK FOR SYSTEM_TIME AS OF o.rowtime + INTERVAL '1' SECOND AS r " +
            "ON o.currency = r.currency
      

      throws:

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

      Attachments

        Issue Links

          Activity

            People

              dwysakowicz Dawid Wysakowicz
              dwysakowicz Dawid Wysakowicz
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: