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

Correlated scalar sub-query with multiple aggregates gives AssertionError

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.12.0
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: