wud-if commented on code in PR #13412:
URL: https://github.com/apache/gluten/pull/13412#discussion_r4411795560


##########
gluten-flink/planner/src/main/java/org/apache/gluten/rexnode/functions/RexCallConverterFactory.java:
##########
@@ -119,6 +120,14 @@ public class RexCallConverterFactory {
           // substring returns an empty string. Start semantics (0 counts as 1,
           // negative counts from the end) already match Flink.
           Map.entry("SUBSTRING", Arrays.asList(() -> new 
SubstringRexCallConverter())),
+          // Offload targets implemented in velox's flinksql namespace. ABS/
+          // FLOOR/CEIL/ROUND arrive upper-cased from the operator table;
+          // unary minus arrives as a one-operand "-" (see above).
+          Map.entry("ABS", Arrays.asList(() -> new 
DefaultRexCallConverter("abs"))),
+          Map.entry("FLOOR", Arrays.asList(() -> new 
DefaultRexCallConverter("floor"))),

Review Comment:
   Thanks for the sharp catch! Fixed in 9540c8e: FLOOR/CEIL now use a 
NumericOnlyRexCallConverter and unary minus adds a numeric-operand guard on top 
of the arity check, so FLOOR(ts TO DAY) and interval unary minus go back to 
being clean planning-time rejections ("No suitable converter"), exactly as 
before the PR. Additionally, getConverter now counts a converter that throws 
while probing operand types (e.g. toType on an interval) as not-suitable 
instead of propagating the exception, so the rejection can never degrade into a 
hard failure. Covered by testFloorDatetimeFormRejectedAtPlanning / 
testUnaryMinusIntervalRejectedAtPlanning (6/6 green locally).



-- 
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]

Reply via email to