goutamadwant commented on code in PR #11937:
URL: https://github.com/apache/seatunnel/pull/11937#discussion_r3836908981


##########
seatunnel-transforms-v2/src/main/java/org/apache/seatunnel/transform/sql/zeta/functions/NumericFunction.java:
##########
@@ -285,23 +307,78 @@ private static Number round(Number v1, Number v2, 
RoundingMode roundingMode) {
                     v1 = t.equals("FLOAT") ? bd.floatValue() : 
bd.doubleValue();
                     break;
                 }
+            default:

Review Comment:
   Could we make this dispatch locale-independent before adding the default? 
`t` is the class simple name, and under a Turkish default locale 
`"BigDecimal".toUpperCase()` becomes `"BİGDECİMAL"`. That now falls into this 
branch, so even `ROUND` on `BigDecimal("1.25")` with scale `2` throws 
`Unsupported arg type java.math.BigDecimal`; on the parent commit it returns 
`1.25`. Using `t.toUpperCase(Locale.ROOT)` with a Turkish-locale regression 
test that restores the previous locale keeps supported `DECIMAL` values out of 
the unhandled-type path.



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

Reply via email to