wasabii commented on code in PR #5150:
URL: https://github.com/apache/calcite/pull/5150#discussion_r3716936189
##########
server/src/test/java/org/apache/calcite/test/ServerTest.java:
##########
@@ -241,6 +241,63 @@ static Connection connect() throws SQLException {
}
}
+ /** Tests that DELETE works on a single-column table.
+ *
+ * <p>A single-column table has SCALAR physical row format, so its Java row
+ * type is a primitive. The generated sink key extractor must not cast
+ * Object to that primitive directly: Java allows such a cast but Janino,
+ * which compiles the generated code, does not implement it. */
+ @Test void testDeleteSingleColumn() throws Exception {
Review Comment:
Added `testDeleteSingleObjectColumn`, a single `VARCHAR NOT NULL` column,
where the Java row type is already a reference and `Primitive.box` is a no-op.
I tried `INT ARRAY` first and it fails, but for an unrelated reason: `class
SqlFunctions$TransformingList cannot be cast to class [Ljava.lang.Object;` at
runtime, rather than a compile error. It fails the same way on main without
this patch, so it is pre-existing and not something this change touches. Happy
to file it separately if you agree it is a real problem.
--
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]