Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-10783

ZetaSQL failed on WITH queries because wrong ref column index calculated in JoinScanWithRefConverter

Details

    • Bug
    • Status: Resolved
    • P2
    • Resolution: Fixed
    • None
    • 2.25.0
    • dsl-sql-zetasql
    • None

    Description

      Some WITH queries, like:

      WITH t1 AS (select 1 AS k), t2 AS (select 1 AS k), t3 AS (select 1 AS k)
      SELECT COUNT(*)
      FROM t1 JOIN t3 USING (k)

      failed on ZetaSQL because how column index is calculated in JoinScanWithRefConverter is not correct.

       

      In fact, the other converter responsible for JOINs, JoinScanConverter, has the correct implementation, and that works fine for JOINs that has reference to WITH queries. So I believe we should delete the incorrect JoinScanWithRefConverter class and move to the other one.

      Attachments

        Issue Links

          Activity

            People

              robinyqiu Robin Qiu
              robinyqiu Robin Qiu
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m