Aaaaaaron commented on a change in pull request #2253:
URL: https://github.com/apache/calcite/pull/2253#discussion_r519519774
##########
File path: core/src/test/java/org/apache/calcite/rex/RexProgramTest.java
##########
@@ -3109,4 +3110,59 @@ private SqlSpecialOperatorWithPolicy(String name,
SqlKind kind, int prec, boolea
@Test void testSimplifyVarbinary() {
checkSimplifyUnchanged(cast(cast(vInt(), tVarchar(true, 100)),
tVarbinary(true)));
}
+
+ @Test public void testSimplifyBoolean() {
+ final RelDataType intType = typeFactory.createSqlType(SqlTypeName.INTEGER);
+ final RelDataType rowType = typeFactory.builder()
+ .add("a", intType)
+ .add("b", intType)
+ .add("c", intType)
+ .add("d", intType)
+ .build();
+ final RexDynamicParam range = rexBuilder.makeDynamicParam(rowType, 0);
+ final RexNode aRef = rexBuilder.makeFieldAccess(range, 0);
+ final RexNode bRef = rexBuilder.makeFieldAccess(range, 1);
+ final RexNode cRef = rexBuilder.makeFieldAccess(range, 2);
+ final RexNode dRef = rexBuilder.makeFieldAccess(range, 3);
Review comment:
There are full of aRef in this test, do we need refactor them all in a
new JIRA?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]