Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-3850

AssertionError when converts a SQL parse tree into a relational algebra expression

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.21.0
    • 1.22.0
    • core
    • None

    Description

      I execute following sql with calcite 1.21.0 in flink 1.10. When the two conditions of left outer join are like"ON t1.a=t2.a" and "ON t1.a=t3.a ", it execute successfully. However, when the two conditions of left outer join are like "ON IF(t1.a='...',CAST(RAND(123) AS STRING),t1.a)=t2.a" and "ON IF(t1.a='...',CAST(RAND(123) AS STRING),t1.a)=t3.a", it gets a assert error in method getRootField.

      It also can execute successfully with "ON t1.a=t2.a" and "ON IF(t1.a='...',CAST(RAND(123) AS STRING),t1.a)=t3.a".
      But failed with "ON IF(t1.a='...',CAST(RAND(123) AS STRING),t1.a)=t2.a" and "ON t1.a=t3.a"

      SELECT
      ...
      FROM
      (
      SELECT
      ...
      ) t1
      LEFT OUTER JOIN
      (
      SELECT
      ...
      ) t2
      ON ...
      LEFT OUTER JOIN
      (
      SELECT
      ...
      ) t3
      ON ...

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              faaronzheng fa zheng
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: