feat: add type extension for column (#122)

* feat: decimal128 proto

* chore: make all

* chore: empty line

* refactor: remove precision and scale

* chore: cr comment

Co-authored-by: Yingwen <realevenyag@gmail.com>

---------

Co-authored-by: Yingwen <realevenyag@gmail.com>
This commit is contained in:
Wei
2023-11-24 10:40:50 +08:00
committed by GitHub
parent 2ffdcae9f9
commit a11efce55d
20 changed files with 6320 additions and 494 deletions
+19
View File
@@ -97,6 +97,7 @@ enum ColumnDataType {
DURATION_MILLISECOND = 27;
DURATION_MICROSECOND = 28;
DURATION_NANOSECOND = 29;
DECIMAL128 = 30;
}
message IntervalMonthDayNano {
@@ -104,3 +105,21 @@ message IntervalMonthDayNano {
int32 days = 2;
int64 nanoseconds = 3;
}
// (hi: high 64 bits, lo: low 64 bits) are used to keep the decimal128 value.
message Decimal128 {
int64 hi = 1;
int64 lo = 2;
}
// Type extension for some complex types
message ColumnDataTypeExtension {
oneof type_ext {
DecimalTypeExtension decimal_type = 1;
}
}
message DecimalTypeExtension {
int32 precision = 1;
int32 scale = 2;
}