Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
JNSimba committed Jul 25, 2024
1 parent 69e9468 commit 4f90d30
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,9 @@ public boolean doConvert(
addValueToRow(rowIndex, dateTime);
} else {
logger.error(
"Unsupported type for DATETIME, minorType {}, vector {}",
"Unsupported type for DATETIME, minorType {}, class is {}",
minorType.name(),
fieldVector);
fieldVector == null ? null : fieldVector.getClass());
return false;
}
break;
Expand All @@ -370,9 +370,9 @@ public boolean doConvert(
addValueToRow(rowIndex, dateTime);
} else {
logger.error(
"Unsupported type for DATETIMEV2, minorType {}, vector {}",
"Unsupported type for DATETIMEV2, minorType {}, class is {}",
minorType.name(),
fieldVector);
fieldVector == null ? null : fieldVector.getClass());
return false;
}
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1333,12 +1333,23 @@ public void testDoConvert() throws Exception {
flag = rowBatch.doConvert(1, 1, Types.MinorType.INT, "DATETIME", null);
Assert.assertFalse(flag);

flag = rowBatch.doConvert(1, 1, Types.MinorType.TIMESTAMPSEC, "DATETIME", null);
Assert.assertFalse(flag);

IntVector intVector1 = new IntVector("test", new RootAllocator(Integer.MAX_VALUE));
intVector1.setNull(0);
flag = rowBatch.doConvert(1, 1, Types.MinorType.TIMESTAMPSEC, "DATETIME", intVector1);
Assert.assertFalse(flag);

flag = rowBatch.doConvert(1, 1, Types.MinorType.INT, "DATETIMEV2", null);
Assert.assertFalse(flag);

flag = rowBatch.doConvert(1, 1, Types.MinorType.TIMESTAMPSEC, "DATETIMEV2", null);
Assert.assertFalse(flag);

flag = rowBatch.doConvert(1, 1, Types.MinorType.TIMESTAMPSEC, "DATETIMEV2", intVector1);
Assert.assertFalse(flag);

flag = rowBatch.doConvert(1, 1, Types.MinorType.INT, "LARGEINT", null);
Assert.assertFalse(flag);

Expand Down

0 comments on commit 4f90d30

Please sign in to comment.