Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ public static TsPrimitiveType getByType(TSDataType dataType) {
case BOOLEAN:
return new TsPrimitiveType.TsBoolean();
case INT32:
case DATE:
return new TsPrimitiveType.TsInt();
case DATE:
return new TsPrimitiveType.TsInt(TSDataType.DATE);
case INT64:
case TIMESTAMP:
return new TsPrimitiveType.TsLong();
Expand Down Expand Up @@ -69,8 +70,9 @@ public static TsPrimitiveType getByType(TSDataType dataType, Object v) {
case BOOLEAN:
return new TsPrimitiveType.TsBoolean((boolean) v);
case INT32:
case DATE:
return new TsPrimitiveType.TsInt((int) v);
case DATE:
return new TsPrimitiveType.TsInt((int) v, TSDataType.DATE);
case INT64:
case TIMESTAMP:
return new TsPrimitiveType.TsLong((long) v);
Expand Down Expand Up @@ -260,12 +262,23 @@ public static class TsInt extends TsPrimitiveType {

private int value;

private TSDataType dataType = TSDataType.INT32;

public TsInt() {}

public TsInt(int value) {
this.value = value;
}

public TsInt(TSDataType dataType) {
this.dataType = dataType;
}

public TsInt(int value, TSDataType dataType) {
this.value = value;
this.dataType = dataType;
}

@Override
public int getInt() {
return value;
Expand Down Expand Up @@ -327,7 +340,7 @@ public String getStringValue() {

@Override
public TSDataType getDataType() {
return TSDataType.INT32;
return dataType;
}

@Override
Expand Down
Loading
Loading