Skip to content

Commit 3aa72c8

Browse files
committed
Updated logic
1 parent 84b5321 commit 3aa72c8

File tree

1 file changed

+8
-3
lines changed
  • data-loader/core/src/main/java/com/scalar/db/dataloader/core/util

1 file changed

+8
-3
lines changed

data-loader/core/src/main/java/com/scalar/db/dataloader/core/util/ColumnUtils.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,14 @@ public static Column<?> createColumnFromValue(
8383
DataType dataType, ColumnInfo columnInfo, @Nullable String value)
8484
throws ColumnParsingException {
8585
String columnName = columnInfo.getColumnName();
86-
if (value != null && (!dataType.equals(DataType.TEXT) && value.equalsIgnoreCase("null"))
87-
|| (dataType.equals(DataType.TEXT) && "\\N".equals(value))) {
88-
value = null;
86+
if (value != null) {
87+
if (dataType.equals(DataType.TEXT)) {
88+
if ("\\N".equals(value)) {
89+
value = null;
90+
}
91+
} else if (value.equalsIgnoreCase("null")) {
92+
value = null;
93+
}
8994
}
9095
try {
9196
switch (dataType) {

0 commit comments

Comments
 (0)