Description
In extremely rare cases, if we build relation tree ourselves through RelBuilder.
relBuilder.push( LogicalProject.create(relBuilder.peek(), Lists.newArrayList(relBuilder.alias(relBuilder.literal(true), "_c0")), Lists.newArrayList("_c0")))
Then we may have AS(true, $1) in the expressions, and AS(true, $1) can satisfy ReduceExpressionRule, but AS call do not exist in RexImpTable.INSTANCE, so it throws this :
java.lang.RuntimeException: cannot translate call AS($t0, $t1) at org.apache.calcite.adapter.enumerable.RexToLixTranslator.translateCall(RexToLixTranslator.java:533) at org.apache.calcite.adapter.enumerable.RexToLixTranslator.translate0(RexToLixTranslator.java:507) at org.apache.calcite.adapter.enumerable.RexToLixTranslator.translate(RexToLixTranslator.java:219) at org.apache.calcite.adapter.enumerable.RexToLixTranslator.translate0(RexToLixTranslator.java:472) at org.apache.calcite.adapter.enumerable.RexToLixTranslator.translate(RexToLixTranslator.java:219) at org.apache.calcite.adapter.enumerable.RexToLixTranslator.translate(RexToLixTranslator.java:214) at org.apache.calcite.adapter.enumerable.RexToLixTranslator.translateList(RexToLixTranslator.java:700) at org.apache.calcite.adapter.enumerable.RexToLixTranslator.translateProjects(RexToLixTranslator.java:189) at org.apache.calcite.rex.RexExecutorImpl.compile(RexExecutorImpl.java:80) at org.apache.calcite.rex.RexExecutorImpl.compile(RexExecutorImpl.java:59) at org.apache.calcite.rex.RexExecutorImpl.reduce(RexExecutorImpl.java:118) at org.apache.calcite.rel.rules.ReduceExpressionsRule.reduceExpressionsInternal(ReduceExpressionsRule.java:544) at org.apache.calcite.rel.rules.ReduceExpressionsRule.reduceExpressions(ReduceExpressionsRule.java:455) at org.apache.calcite.rel.rules.ReduceExpressionsRule.reduceExpressions(ReduceExpressionsRule.java:438) {
}