soumyava commented on code in PR #16464:
URL: https://github.com/apache/druid/pull/16464#discussion_r1604007017
##########
sql/src/test/java/org/apache/druid/sql/calcite/CalciteQueryTest.java:
##########
@@ -602,6 +602,35 @@ public void testSafeDivide()
);
}
+ @Test
+ public void testDiv()
+ {
+ cannotVectorize();
+ final Map<String, Object> context = new HashMap<>(QUERY_CONTEXT_DEFAULT);
+
+ testQuery(
+ "select m1, div(m1, 2) from foo",
+ context,
+ ImmutableList.of(
+ newScanQueryBuilder()
+ .dataSource(CalciteTests.DATASOURCE1)
+ .intervals(querySegmentSpec(Filtration.eternity()))
+ .virtualColumns(expressionVirtualColumn("v0", "div(\"m1\",2)",
ColumnType.LONG))
Review Comment:
Can we add one more test with `div(expression,expression)` just for sakr of
sanity. Rest LGTM
--
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]