danny0405 commented on a change in pull request #1381: [CALCITE-3245]
CompileException in Janino when a query contains a division between a Double
and a BigDecimal
URL: https://github.com/apache/calcite/pull/1381#discussion_r322169357
##########
File path: core/src/test/java/org/apache/calcite/test/ReflectiveSchemaTest.java
##########
@@ -589,6 +592,14 @@ private void check(ResultSetMetaData metaData, String
columnName,
.returns("C=null\n");
}
+ @Test public void testDivideDoubleBigDecimal() {
+ final CalciteAssert.AssertThat with =
+ CalciteAssert.that().withSchema("s", CATCHALL);
+ with.query("select \"wrapperDouble\" / \"bigDecimal\" as c\n"
+ + " from \"s\".\"everyTypes\"")
+ .runs();
Review comment:
Well, this exception is not expected, personally, i think the proper place
to throw is:
1. The type checker: if we do not allow null literal operands for DIVIDE
2. The execution runtime, if we do not support a `number/null` pattern
expression(we should do it if we already allows the pattern in the type checker)
Fire another issue is a more proper way to go, thanks.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services