Closed bvolpato closed 4 months ago
FYI Check failures are unrelated to the change:
/home/runner/work/substrait-java/substrait-java/core/src/test/java/io/substrait/type/proto/LocalFilesRoundtripTest.java:61: error: switch expressions are not supported in -source 8
return switch (pathTypeCase) {
^
(use -source 14 or higher to enable switch expressions)
/home/runner/work/substrait-java/substrait-java/core/src/test/java/io/substrait/type/proto/LocalFilesRoundtripTest.java:62: error: switch rules are not supported in -source 8
case URI_PATH -> builder.pathType(FileOrFiles.PathType.URI_PATH).path("path");
Thanks for these changes!
I was poking around to add the
conversionHandlesBuiltInSum0CallAddedByRule
test and made some small changes along the way as well.If the code in 6c0c6fd looks good to you, we can merge this in.
It looks good to me! Thanks for all the improvements / suggestions!
Some of the Calcite CoreRules might bring their own functions at a late stage, so I've decided to make the converter flexible enough and handle the superclass types correctly (since we already do a similar conversion to
APPROX_COUNT_DISTINCT
in the same spot).Another alternative would be to improve the matchers and check if names match or if it's an
instanceof
the passing call -- todaysignatures
is anIdentityHashMap
, so it's really strict.