You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Yaoxuan Wu (Jira)" <ji...@apache.org> on 2026/10/06 04:21:00 UTC
[jira] [Created] (FLINK-40920) SELECT 1 / (2 + 3) fails with ClassCastException: RexCall cannot be cast to RexLiteral in ExpressionReducer
Yaoxuan Wu created FLINK-40920:
----------------------------------
Summary: SELECT 1 / (2 + 3) fails with ClassCastException: RexCall cannot be cast to RexLiteral in ExpressionReducer
Key: FLINK-40920
URL: https://issues.apache.org/jira/browse/FLINK-40920
Project: Flink
Issue Type: Bug
Components: Table SQL / Planner
Affects Versions: 2.3.0
Reporter: Yaoxuan Wu
{{*SELECT 1 / (2 + 3)*}}
{{*SELECT 1 / (2 * 3)*}}
{{*SELECT 1.0 / (2 * 3)*}}
all fail during optimization:
{code:java}
// code placeholder
{code}
java.lang.ClassCastException: class org.apache.calcite.rex.RexCall cannot be cast to class org.apache.calcite.rex.RexLiteral at org.apache.flink.table.planner.codegen.ExpressionReducer.$anonfun$skipAndValidateExprs$2(ExpressionReducer.scala:289) at org.apache.flink.table.planner.codegen.ExpressionReducer.skipAndValidateExprs(ExpressionReducer.scala:264) at org.apache.flink.table.planner.codegen.ExpressionReducer.reduce(ExpressionReducer.scala:72) at org.apache.calcite.rel.rules.ReduceExpressionsRule.reduceExpressionsInternal(ReduceExpressionsRule.java:774)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)