godfreyhe commented on a change in pull request #17311:
URL: https://github.com/apache/flink/pull/17311#discussion_r713572846
##########
File path:
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/plan/utils/FlinkRexUtilTest.scala
##########
@@ -458,9 +461,64 @@ class FlinkRexUtilTest {
OR,
rexBuilder.makeCall(GREATER_THAN_OR_EQUAL, c, intLiteral(0)),
predicate18Search)
- val newPredicate20 = FlinkRexUtil.simplify(rexBuilder, predicate20)
+ val newPredicate20 = simplify(rexBuilder, predicate20)
assertEquals(predicate20.toString, newPredicate20.toString)
+
+ //CAST(1 AS BOOLEAN)
+ val predicate21CastFromData = intLiteral(1)
+ val predicate21CastToType = new BasicSqlType(typeFactory.getTypeSystem,
SqlTypeName.BOOLEAN)
+ val predicate21 = rexBuilder.makeCall(
+ predicate21CastToType,
+ CAST,
+ Collections.singletonList(predicate21CastFromData.asInstanceOf[RexNode]))
Review comment:
please extract a method to create cast
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]