fix(sync): 优化TypeConverterV2的空值判断逻辑
This commit is contained in:
@@ -20,7 +20,11 @@ import org.apache.hudi.org.apache.avro.Schema;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import static org.apache.hudi.org.apache.avro.Schema.*;
|
import static org.apache.hudi.org.apache.avro.Schema.Field;
|
||||||
|
import static org.apache.hudi.org.apache.avro.Schema.Type;
|
||||||
|
import static org.apache.hudi.org.apache.avro.Schema.create;
|
||||||
|
import static org.apache.hudi.org.apache.avro.Schema.createFixed;
|
||||||
|
import static org.apache.hudi.org.apache.avro.Schema.createUnion;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 类型转换第二版本
|
* 类型转换第二版本
|
||||||
@@ -184,6 +188,6 @@ public class TypeConverterV2 implements TypeConverter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean isNullValue(Object value) {
|
private boolean isNullValue(Object value) {
|
||||||
return StrUtil.isBlankIfStr(value) || ObjectUtil.equals("null", value);
|
return StrUtil.isBlankIfStr(value) || (value instanceof String ? "null".equalsIgnoreCase((String) value) : value == null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user