wangbo commented on a change in pull request #6356:
URL: https://github.com/apache/incubator-doris/pull/6356#discussion_r680625964
##########
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:
If value is null, then NPE happens here.
--
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]