Chunwei Lei created CALCITE-3569:
------------------------------------

             Summary: IndexOutOfBoundsException when pushing FALSE filter to 
view
                 Key: CALCITE-3569
                 URL: https://issues.apache.org/jira/browse/CALCITE-3569
             Project: Calcite
          Issue Type: Improvement
          Components: core
    Affects Versions: 1.21.0
            Reporter: Chunwei Lei
            Assignee: Chunwei Lei


It can be reproduced by the following test.
{code:java}
// 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=[[]])");
  }
}
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to