Skip to content

Commit

Permalink
Pipe: fix NPE in SessionUtils Binary/Date value serialization called …
Browse files Browse the repository at this point in the history
…by TsFileInsertionScanDataContainer (#13654)

Co-authored-by: Steve Yurong Su <[email protected]>
  • Loading branch information
luoluoyuyu and SteveYurongSu authored Sep 30, 2024
1 parent 8fca51a commit b488a79
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@

public class TsFileInsertionScanDataContainer extends TsFileInsertionDataContainer {

private static final LocalDate EMPTY_DATE = LocalDate.of(1000, 1, 1);

private final long startTime;
private final long endTime;
private final Filter filter;
Expand Down Expand Up @@ -266,6 +268,13 @@ private void putValueToColumns(final BatchData data, final Tablet tablet, final
final TsPrimitiveType primitiveType = data.getVector()[i];
if (Objects.isNull(primitiveType)) {
tablet.bitMaps[i].mark(rowIndex);
final TSDataType type = tablet.getSchemas().get(i).getType();
if (type == TSDataType.TEXT || type == TSDataType.BLOB || type == TSDataType.STRING) {
((Binary[]) columns[i])[rowIndex] = Binary.EMPTY_VALUE;
}
if (type == TSDataType.DATE) {
((LocalDate[]) columns[i])[rowIndex] = EMPTY_DATE;
}
continue;
}
switch (tablet.getSchemas().get(i).getType()) {
Expand Down

0 comments on commit b488a79

Please sign in to comment.