vlsi commented on a change in pull request #2098:
URL: https://github.com/apache/calcite/pull/2098#discussion_r468449904
##########
File path: core/src/test/java/org/apache/calcite/rex/RexProgramTest.java
##########
@@ -2634,6 +2634,86 @@ private static String getString(ImmutableMap<RexNode,
RexNode> map) {
assertThat(simplifiedExpr, is(origExpr));
}
+ @Test void testSimplifyInValues() {
+ RexNode a = vIntNotNull(1);
+ RexNode literal1 = literal(1);
+ RexNode literal2 = literal(2);
+ RexNode literal3 = literal(3);
+ RexNode literal4 = literal(4);
+ RexNode literal5 = literal(5);
+ RexNode literal6 = literal(6);
+
+ // expr: a in (1, 2, 3, 4, 5)
+ RexNode expr = in(a, literal1, literal2, literal3, literal4, literal5);
Review comment:
It might be ok, however, I would use `n1`, `n2`, ... `n5` naming to
avoid repeating `literal` again and again.
----------------------------------------------------------------
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]