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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user