You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/08/03 07:42:04 UTC
[GitHub] [incubator-doris] rufeng97 commented on a change in pull request #6356: Support bitmap(binary) type in hive to import doris
rufeng97 commented on a change in pull request #6356:
URL: https://github.com/apache/incubator-doris/pull/6356#discussion_r681515118
##########
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:
NPE will also occur in the previous code, and NPE has been try catch.
--
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-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org