chore: add json type (#194)

This commit is contained in:
Weny Xu
2024-10-30 04:12:24 +08:00
committed by GitHub
parent fc45ac4cce
commit 86ed051dfd
5 changed files with 39 additions and 22 deletions
+8 -6
View File
@@ -561,7 +561,7 @@ const char descriptor_table_protodef_greptime_2fv1_2fcommon_2eproto[] PROTOBUF_S
"Options.OptionsEntry\032.\n\014OptionsEntry\022\013\n\003"
"key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001*1\n\014Semantic"
"Type\022\007\n\003TAG\020\000\022\t\n\005FIELD\020\001\022\r\n\tTIMESTAMP\020\002*"
"\326\003\n\016ColumnDataType\022\013\n\007BOOLEAN\020\000\022\010\n\004INT8\020"
"\340\003\n\016ColumnDataType\022\013\n\007BOOLEAN\020\000\022\010\n\004INT8\020"
"\001\022\t\n\005INT16\020\002\022\t\n\005INT32\020\003\022\t\n\005INT64\020\004\022\t\n\005UI"
"NT8\020\005\022\n\n\006UINT16\020\006\022\n\n\006UINT32\020\007\022\n\n\006UINT64\020"
"\010\022\013\n\007FLOAT32\020\t\022\013\n\007FLOAT64\020\n\022\n\n\006BINARY\020\013\022"
@@ -572,14 +572,15 @@ const char descriptor_table_protodef_greptime_2fv1_2fcommon_2eproto[] PROTOBUF_S
"ME_MILLISECOND\020\024\022\024\n\020TIME_MICROSECOND\020\025\022\023"
"\n\017TIME_NANOSECOND\020\026\022\027\n\023INTERVAL_YEAR_MON"
"TH\020\027\022\025\n\021INTERVAL_DAY_TIME\020\030\022\033\n\027INTERVAL_"
"MONTH_DAY_NANO\020\031\022\016\n\nDECIMAL128\020\036*$\n\021Json"
"TypeExtension\022\017\n\013JSON_BINARY\020\000BO\n\016io.gre"
"ptime.v1B\006CommonZ5github.com/GreptimeTea"
"m/greptime-proto/go/greptime/v1b\006proto3"
"MONTH_DAY_NANO\020\031\022\016\n\nDECIMAL128\020\036\022\010\n\004JSON"
"\020\037*$\n\021JsonTypeExtension\022\017\n\013JSON_BINARY\020\000"
"BO\n\016io.greptime.v1B\006CommonZ5github.com/G"
"reptimeTeam/greptime-proto/go/greptime/v"
"1b\006proto3"
;
static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fcommon_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fcommon_2eproto = {
false, false, 2159, descriptor_table_protodef_greptime_2fv1_2fcommon_2eproto,
false, false, 2169, descriptor_table_protodef_greptime_2fv1_2fcommon_2eproto,
"greptime/v1/common.proto",
&descriptor_table_greptime_2fv1_2fcommon_2eproto_once, nullptr, 0, 20,
schemas, file_default_instances, TableStruct_greptime_2fv1_2fcommon_2eproto::offsets,
@@ -642,6 +643,7 @@ bool ColumnDataType_IsValid(int value) {
case 24:
case 25:
case 30:
case 31:
return true;
default:
return false;
+2 -1
View File
@@ -191,12 +191,13 @@ enum ColumnDataType : int {
INTERVAL_DAY_TIME = 24,
INTERVAL_MONTH_DAY_NANO = 25,
DECIMAL128 = 30,
JSON = 31,
ColumnDataType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(),
ColumnDataType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max()
};
bool ColumnDataType_IsValid(int value);
constexpr ColumnDataType ColumnDataType_MIN = BOOLEAN;
constexpr ColumnDataType ColumnDataType_MAX = DECIMAL128;
constexpr ColumnDataType ColumnDataType_MAX = JSON;
constexpr int ColumnDataType_ARRAYSIZE = ColumnDataType_MAX + 1;
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ColumnDataType_descriptor();
+13 -10
View File
@@ -113,6 +113,7 @@ const (
ColumnDataType_INTERVAL_DAY_TIME ColumnDataType = 24
ColumnDataType_INTERVAL_MONTH_DAY_NANO ColumnDataType = 25
ColumnDataType_DECIMAL128 ColumnDataType = 30
ColumnDataType_JSON ColumnDataType = 31
)
// Enum value maps for ColumnDataType.
@@ -145,6 +146,7 @@ var (
24: "INTERVAL_DAY_TIME",
25: "INTERVAL_MONTH_DAY_NANO",
30: "DECIMAL128",
31: "JSON",
}
ColumnDataType_value = map[string]int32{
"BOOLEAN": 0,
@@ -174,6 +176,7 @@ var (
"INTERVAL_DAY_TIME": 24,
"INTERVAL_MONTH_DAY_NANO": 25,
"DECIMAL128": 30,
"JSON": 31,
}
)
@@ -1415,7 +1418,7 @@ var file_greptime_v1_common_proto_rawDesc = []byte{
0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0x31, 0x0a, 0x0c, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74,
0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x41, 0x47, 0x10, 0x00, 0x12,
0x09, 0x0a, 0x05, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x49,
0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x10, 0x02, 0x2a, 0xd6, 0x03, 0x0a, 0x0e, 0x43, 0x6f,
0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x10, 0x02, 0x2a, 0xe0, 0x03, 0x0a, 0x0e, 0x43, 0x6f,
0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07,
0x42, 0x4f, 0x4f, 0x4c, 0x45, 0x41, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x4e, 0x54,
0x38, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x31, 0x36, 0x10, 0x02, 0x12, 0x09,
@@ -1445,15 +1448,15 @@ var file_greptime_v1_common_proto_rawDesc = []byte{
0x49, 0x4d, 0x45, 0x10, 0x18, 0x12, 0x1b, 0x0a, 0x17, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41,
0x4c, 0x5f, 0x4d, 0x4f, 0x4e, 0x54, 0x48, 0x5f, 0x44, 0x41, 0x59, 0x5f, 0x4e, 0x41, 0x4e, 0x4f,
0x10, 0x19, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x45, 0x43, 0x49, 0x4d, 0x41, 0x4c, 0x31, 0x32, 0x38,
0x10, 0x1e, 0x2a, 0x24, 0x0a, 0x11, 0x4a, 0x73, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x45, 0x78,
0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0f, 0x0a, 0x0b, 0x4a, 0x53, 0x4f, 0x4e, 0x5f,
0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x00, 0x42, 0x4f, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67,
0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x06, 0x43, 0x6f, 0x6d, 0x6d,
0x6f, 0x6e, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47,
0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70,
0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72,
0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
0x10, 0x1e, 0x12, 0x08, 0x0a, 0x04, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x1f, 0x2a, 0x24, 0x0a, 0x11,
0x4a, 0x73, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
0x6e, 0x12, 0x0f, 0x0a, 0x0b, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59,
0x10, 0x00, 0x42, 0x4f, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d,
0x65, 0x2e, 0x76, 0x31, 0x42, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5a, 0x35, 0x67, 0x69,
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d,
0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65,
0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
+15 -5
View File
@@ -244,6 +244,10 @@ public final class Common {
* <code>DECIMAL128 = 30;</code>
*/
DECIMAL128(30),
/**
* <code>JSON = 31;</code>
*/
JSON(31),
UNRECOGNIZED(-1),
;
@@ -355,6 +359,10 @@ public final class Common {
* <code>DECIMAL128 = 30;</code>
*/
public static final int DECIMAL128_VALUE = 30;
/**
* <code>JSON = 31;</code>
*/
public static final int JSON_VALUE = 31;
public final int getNumber() {
@@ -408,6 +416,7 @@ public final class Common {
case 24: return INTERVAL_DAY_TIME;
case 25: return INTERVAL_MONTH_DAY_NANO;
case 30: return DECIMAL128;
case 31: return JSON;
default: return null;
}
}
@@ -14231,7 +14240,7 @@ java.lang.String defaultValue);
"Options.OptionsEntry\032.\n\014OptionsEntry\022\013\n\003" +
"key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001*1\n\014Semantic" +
"Type\022\007\n\003TAG\020\000\022\t\n\005FIELD\020\001\022\r\n\tTIMESTAMP\020\002*" +
"\326\003\n\016ColumnDataType\022\013\n\007BOOLEAN\020\000\022\010\n\004INT8\020" +
"\340\003\n\016ColumnDataType\022\013\n\007BOOLEAN\020\000\022\010\n\004INT8\020" +
"\001\022\t\n\005INT16\020\002\022\t\n\005INT32\020\003\022\t\n\005INT64\020\004\022\t\n\005UI" +
"NT8\020\005\022\n\n\006UINT16\020\006\022\n\n\006UINT32\020\007\022\n\n\006UINT64\020" +
"\010\022\013\n\007FLOAT32\020\t\022\013\n\007FLOAT64\020\n\022\n\n\006BINARY\020\013\022" +
@@ -14242,10 +14251,11 @@ java.lang.String defaultValue);
"ME_MILLISECOND\020\024\022\024\n\020TIME_MICROSECOND\020\025\022\023" +
"\n\017TIME_NANOSECOND\020\026\022\027\n\023INTERVAL_YEAR_MON" +
"TH\020\027\022\025\n\021INTERVAL_DAY_TIME\020\030\022\033\n\027INTERVAL_" +
"MONTH_DAY_NANO\020\031\022\016\n\nDECIMAL128\020\036*$\n\021Json" +
"TypeExtension\022\017\n\013JSON_BINARY\020\000BO\n\016io.gre" +
"ptime.v1B\006CommonZ5github.com/GreptimeTea" +
"m/greptime-proto/go/greptime/v1b\006proto3"
"MONTH_DAY_NANO\020\031\022\016\n\nDECIMAL128\020\036\022\010\n\004JSON" +
"\020\037*$\n\021JsonTypeExtension\022\017\n\013JSON_BINARY\020\000" +
"BO\n\016io.greptime.v1B\006CommonZ5github.com/G" +
"reptimeTeam/greptime-proto/go/greptime/v" +
"1b\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
+1
View File
@@ -117,6 +117,7 @@ enum ColumnDataType {
INTERVAL_DAY_TIME = 24;
INTERVAL_MONTH_DAY_NANO = 25;
DECIMAL128 = 30;
JSON = 31;
}
message IntervalMonthDayNano {