feat: add struct and list data type (#277)

* feat: add struct and list data type

* type extensions

* feat: extend column type

* chore: rename fields

* add value enum item

* feat: add value

* refactor: item->items

* feat: use single ListValue/StructValue for Row and Column
This commit is contained in:
Ning Sun
2025-10-09 11:07:20 +08:00
committed by GitHub
parent 3e821d0d40
commit d75496d5d0
16 changed files with 10013 additions and 444 deletions
+19
View File
@@ -151,6 +151,8 @@ enum ColumnDataType {
DECIMAL128 = 30;
JSON = 31;
VECTOR = 32;
LIST = 40;
STRUCT = 41;
}
message IntervalMonthDayNano {
@@ -185,6 +187,12 @@ message Decimal128 {
int64 lo = 2;
}
message StructField {
string name = 1;
ColumnDataType datatype = 2;
ColumnDataTypeExtension datatype_extension = 3;
}
// Type extension for some complex types
message ColumnDataTypeExtension {
oneof type_ext {
@@ -192,6 +200,8 @@ message ColumnDataTypeExtension {
// Marks the binary column in proto is actually a JSON column.
JsonTypeExtension json_type = 2;
VectorTypeExtension vector_type = 3;
ListTypeExtension list_type = 4;
StructTypeExtension struct_type = 5;
}
}
@@ -208,6 +218,15 @@ message VectorTypeExtension {
uint32 dim = 1;
}
message ListTypeExtension {
ColumnDataType datatype = 1;
ColumnDataTypeExtension datatype_extension = 2;
}
message StructTypeExtension {
repeated StructField fields = 1;
}
// Additional options for the column.
message ColumnOptions {
// Supported keys: