LiJie20190102 commented on code in PR #10145:
URL: https://github.com/apache/seatunnel/pull/10145#discussion_r2584762756


##########
seatunnel-transforms-v2/src/main/java/org/apache/seatunnel/transform/sql/zeta/functions/NumericFunction.java:
##########
@@ -208,7 +208,7 @@ private static Number round(Number v1, Number v2, 
RoundingMode roundingMode) {
         c:
         switch (t.toUpperCase()) {
             case "INTEGER":
-            case "SHOT":
+            case "SHORT":

Review Comment:
   I suggest changing it to a specific Number subclass, such as 
`Short.class.getSimpleName()` . This can avoid such problems



##########
seatunnel-transforms-v2/src/main/java/org/apache/seatunnel/transform/sql/zeta/functions/StringFunction.java:
##########
@@ -231,6 +231,9 @@ public static String left(List<Object> args) {
             return null;

Review Comment:
   When arg  is a whitespace character, it should also return null, right?



##########
seatunnel-transforms-v2/src/main/java/org/apache/seatunnel/transform/sql/zeta/functions/NumericFunction.java:
##########
@@ -262,10 +262,10 @@ private static Number round(Number v1, Number v2, 
RoundingMode roundingMode) {
     }
 
     private static Number convertTo(String valueType, Number column) {
-        switch (valueType) {
+        switch (valueType.toUpperCase()) {
             case "INTEGER":
                 return column.intValue();
-            case "SHOT":

Review Comment:
   ditto



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