mihaibudiu commented on code in PR #3890:
URL: https://github.com/apache/calcite/pull/3890#discussion_r1697299634
##########
arrow/src/test/java/org/apache/calcite/adapter/arrow/ArrowAdapterTest.java:
##########
@@ -518,6 +518,56 @@ static void initializeArrowState(@TempDir Path
sharedTempDir) throws IOException
.explainContains(plan);
}
+ @Test void testDecimalProject() {
+ String sql = "select SAL from EMP";
+ String plan = "PLAN=ArrowToEnumerableConverter\n"
+ + " ArrowProject(SAL=[$5])\n"
+ + " ArrowTableScan(table=[[ARROW, EMP]], fields=[[0, 1, 2, 3, 4, 5,
6, 7]])\n\n";
+ String result = "SAL=800.00\n"
+ + "SAL=1600.00\n"
+ + "SAL=1250.00\n";
+ CalciteAssert.that()
+ .with(arrow)
+ .query(sql)
+ .limit(3)
+ .returns(result)
+ .explainContains(plan);
+ }
+
+ @Test void testCastDecimalToSmallInt() {
Review Comment:
If you really want to test the functionality of the cast you should test a
case where the value is too large for the target type.
--
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]