spaces-X commented on a change in pull request #6356: URL: https://github.com/apache/incubator-doris/pull/6356#discussion_r689552040
########## File path: fe/spark-dpp/src/main/java/org/apache/doris/load/loadv2/dpp/ColumnParser.java ########## @@ -71,14 +71,25 @@ public static ColumnParser create(EtlJobConfig.EtlColumn etlColumn) throws Spark } } - public abstract boolean parse(String value); + public abstract boolean parse(Object value); +} + +class BinaryParser extends ColumnParser{ + @Override + public boolean parse(Object value) { + try{ + return value instanceof byte[]; + }catch (NumberFormatException e) { + return false; + } + } } class TinyIntParser extends ColumnParser { @Override - public boolean parse(String value) { + public boolean parse(Object value) { try { - Byte.parseByte(value); + Byte.parseByte(value.toString()); Review comment: NumberFormatException is included but NPE will not be catched in this situation. -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org