Jackie-Jiang commented on code in PR #19767:
URL: https://github.com/apache/pinot/pull/19767#discussion_r4200676589


##########
pinot-query-planner/src/test/java/org/apache/pinot/query/planner/logical/RexExpressionUtilsTest.java:
##########
@@ -71,6 +71,24 @@ public void testUuidLiteralRoundTrip() {
     Assert.assertEquals(roundTrip.getValue(), uuid);
   }
 
+  @Test
+  public void testSqlKindFunctionNames() {
+    // Plan nodes name most standard operators by SqlKind, e.g. DIVIDE for "/" 
and SUM0 for "$SUM0"
+    RelBuilder relBuilder = 
RelBuilder.create(Frameworks.newConfigBuilder().build()).values(new 
String[]{"a"}, 1.0);
+    RexExpression input = new RexExpression.InputRef(0);
+    List<RexExpression> inOperands = List.of(input, new 
RexExpression.Literal(ColumnDataType.DOUBLE, 1.0),
+        new RexExpression.Literal(ColumnDataType.DOUBLE, 2.0));
+    for (RexExpression call : List.of(
+        new RexExpression.FunctionCall(ColumnDataType.DOUBLE, 
SqlKind.DIVIDE.name(), List.of(input, input)),
+        new RexExpression.FunctionCall(ColumnDataType.BOOLEAN, 
SqlKind.IN.name(), inOperands),
+        new RexExpression.FunctionCall(ColumnDataType.BOOLEAN, 
SqlKind.NOT_IN.name(), inOperands))) {
+      
Assert.assertEquals(RexExpressionUtils.fromRexNode(RexExpressionUtils.toRexNode(relBuilder,
 call)), call);

Review Comment:
   Nit (nonblocking, inherited from #19766): Please use static imports for 
`assertEquals` and `assertSame` in this new test, per the repository 
conventions.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to