snuyanzin commented on code in PR #29506:
URL: https://github.com/apache/flink/pull/29506#discussion_r4307447313


##########
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/data/binary/BinaryStringDataUtil.java:
##########
@@ -155,15 +155,15 @@ public static BinaryStringData[] 
splitByWholeSeparatorPreserveAllTokens(
     }
 
     /** Parse a {@link StringData} to boolean. */
-    public static boolean toBoolean(BinaryStringData str) throws 
TableException {
+    public static boolean toBoolean(BinaryStringData str) {
         BinaryStringData lowerCase = str.toLowerCase();
         if (TRUE_STRINGS.contains(lowerCase)) {
             return true;
         }
         if (FALSE_STRINGS.contains(lowerCase)) {
             return false;
         }
-        throw new TableException("Cannot parse '" + str + "' as BOOLEAN.");
+        throw new TableRuntimeException("Cannot cast '" + str + "' as 
BOOLEAN.");

Review Comment:
   if you look at javadoc 
   
https://github.com/apache/flink/blob/298a860634773a9efc7997adaeb3ff8eaf0f960a/flink-table/flink-table-common/src/main/java/org/apache/flink/table/api/TableException.java#L24-L27
   
   it is not the right place for `TableException`



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