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

Correlated scalar sub-query with multiple aggregates gives AssertionError

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.12.0
    • Component/s: None
    • Labels:
      None

      Description

      Caused by: java.lang.AssertionError at org.apache.calcite.sql2rel.RelDecorrelator.decorrelateRel(RelDecorrelator.java:456)

      The code is:

          final Frame frame = getInvoke(oldInput, rel);
          if (frame == null) {
            // If input has not been rewritten, do not rewrite this rel.
            return null;
          }
          assert !frame.corVarOutputPos.isEmpty();
      

      Seems like it's no need to assert the corVarOutputPos because in some cases, the correlate has been fully rewritten.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                julianhyde Julian Hyde
                Reporter:
                ykt836 Kurt Young
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: