[ https://issues.apache.org/jira/browse/CALCITE-4155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17173465#comment-17173465 ]
Julian Hyde commented on CALCITE-4155: -------------------------------------- One more thing. In {{RexProgramTest}}, you chose to call {{rexBuilder.makeCall(SqlStdOperatorTable.EQUALS(...)}} rather than use {{eq(...)}} (and all of the other methods for building expressions). It is worrying that you did not make the code concise and consistent with the other code in that file. As as reviewer I am going to run out of patience if I have to keep pointing these things out. > Simplify IN expression of discrete values > ----------------------------------------- > > Key: CALCITE-4155 > URL: https://issues.apache.org/jira/browse/CALCITE-4155 > Project: Calcite > Issue Type: New Feature > Components: core > Reporter: Liya Fan > Assignee: Liya Fan > Priority: Major > Labels: pull-request-available > Time Spent: 10m > Remaining Estimate: 0h > > For example, given expressions like > {{a in (1, 2, 3, 4, 5)}} > or > {{a = 1 or a = 2 or a = 3 or a = 4 or a = 5}}, > we can simplify it to > {{a >= 1 and a <= 5}} > Such simplification reduces the number of value comparisons from 5 to 2. -- This message was sent by Atlassian Jira (v8.3.4#803005)