Skip to content

Commit

Permalink
feat: remove duration types
Browse files Browse the repository at this point in the history
  • Loading branch information
fengjiachun committed Jan 30, 2024
1 parent d74918e commit 1c0861d
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 25 deletions.
12 changes: 0 additions & 12 deletions ingester-protocol/src/main/java/io/greptime/models/DataType.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ public enum DataType {
IntervalYearMonth, //
IntervalDayTime, //
IntervalMonthDayNano, //
DurationSecond, //
DurationMillisecond, //
DurationMicrosecond, //
DurationNanosecond, //
Decimal128, //
;

Expand Down Expand Up @@ -111,14 +107,6 @@ public Common.ColumnDataType toProtoValue() {
return Common.ColumnDataType.INTERVAL_DAY_TIME;
case IntervalMonthDayNano:
return Common.ColumnDataType.INTERVAL_MONTH_DAY_NANO;
case DurationSecond:
return Common.ColumnDataType.DURATION_SECOND;
case DurationMillisecond:
return Common.ColumnDataType.DURATION_MILLISECOND;
case DurationMicrosecond:
return Common.ColumnDataType.DURATION_MICROSECOND;
case DurationNanosecond:
return Common.ColumnDataType.DURATION_NANOSECOND;
case Decimal128:
return Common.ColumnDataType.DECIMAL128;
default:
Expand Down
12 changes: 0 additions & 12 deletions ingester-protocol/src/main/java/io/greptime/models/RowHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,18 +112,6 @@ public static void addValue(RowData.Row.Builder builder, //
case INTERVAL_MONTH_DAY_NANO:
valueBuilder.setIntervalMonthDayNanoValue(Util.getIntervalMonthDayNanoValue(value));
break;
case DURATION_SECOND:
valueBuilder.setDurationSecondValue(Util.getLongValue(value));
break;
case DURATION_MILLISECOND:
valueBuilder.setDurationMillisecondValue(Util.getLongValue(value));
break;
case DURATION_MICROSECOND:
valueBuilder.setDurationMicrosecondValue(Util.getLongValue(value));
break;
case DURATION_NANOSECOND:
valueBuilder.setDurationNanosecondValue(Util.getLongValue(value));
break;
case DECIMAL128:
valueBuilder.setDecimal128Value(Util.getDecimal128Value(dataTypeExtension, value));
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.runners.MockitoJUnitRunner;
import java.util.Collections;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ForkJoinPool;
import static io.greptime.models.SemanticType.Field;
Expand Down

0 comments on commit 1c0861d

Please sign in to comment.