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

IndexOutOfBoundsException when pushing simplifed filter to view

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.21.0
    • 1.22.0
    • core

    Description

      It can be reproduced by the following test.

      // MaterializationTest.java
      @Test public void testAggregate7() {
        try (TryThreadLocal.Memo ignored = Prepare.THREAD_TRIM.push(true)) {
          MaterializationService.setThreadLocal();
          CalciteAssert.that()
              .withMaterializations(
                  HR_FKUK_MODEL,
                  "m0",
                  "select 11 as \"empno\", 22 as \"sal\", count(*) from \"emps\" group by 11, 22")
              .query(
                  "select * from\n"
                      + "(select 11 as \"empno\", 22 as \"sal\", count(*)\n"
                      + "from \"emps\" group by 11, 22) tmp\n"
                      + "where \"sal\" = 33")
              .enableMaterializations(true)
              .explainContains("EnumerableValues(tuples=[[]])");
        }
      }
      

      Attachments

        Issue Links

          Activity

            People

              Chunwei Lei Chunwei Lei
              Chunwei Lei Chunwei Lei
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 0.5h
                  0.5h