JiajunBernoulli commented on code in PR #3289:
URL: https://github.com/apache/calcite/pull/3289#discussion_r1249076667
##########
core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java:
##########
@@ -223,6 +224,38 @@ private static boolean skipItem(RexNode expr) {
&& "item".equalsIgnoreCase(((RexCall) expr).getOperator().getName());
}
+ @Test void testRepeat() {
+ HepProgramBuilder builder = new HepProgramBuilder();
+ builder.addRuleClass(ReduceExpressionsRule.class);
+ HepPlanner hepPlanner = new HepPlanner(builder.build());
+ hepPlanner.addRule(CoreRules.PROJECT_REDUCE_EXPRESSIONS);
+
+ final String sql = "select REPEAT('abc', 2)";
+ fixture()
+ .withOperatorTable(
Review Comment:
Can you use
[withFactory](https://github.com/apache/calcite/blob/301f770a66ef3d26c9d4e8d274eae0f92a819e00/core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java#L558)?
For example
```
sql(sql)
.withFactory(t ->
t.withOperatorTable(opTab ->
SqlValidatorTest.operatorTableFor(SqlLibrary.ORACLE)))
```
--
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]