You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by ja...@apache.org on 2014/05/12 04:48:24 UTC
[02/10] Add support for RepeatedMapVector,
MapVector and RepeatedListVector.
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/cdc5daed/protocol/src/main/protobuf/SchemaDef.proto
----------------------------------------------------------------------
diff --git a/protocol/src/main/protobuf/SchemaDef.proto b/protocol/src/main/protobuf/SchemaDef.proto
index 2d6575b..206e9d3 100644
--- a/protocol/src/main/protobuf/SchemaDef.proto
+++ b/protocol/src/main/protobuf/SchemaDef.proto
@@ -12,20 +12,3 @@ enum ValueMode {
RLE = 1;
DICT = 2;
}
-
-message NamePart {
- enum Type{
- NAME = 0;
- ARRAY = 1;
- }
-
- optional Type type = 1;
- optional string name = 2; // only required if this is a named type.
-}
-
-message FieldDef {
- repeated NamePart name = 1; // multipart description of entire field name
- optional common.MajorType major_type = 2; // the type associated with this field.
- //repeated FieldDef field = 3; // only in the cases of type == MAP or REPEATMAP
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/cdc5daed/protocol/src/main/protobuf/Types.proto
----------------------------------------------------------------------
diff --git a/protocol/src/main/protobuf/Types.proto b/protocol/src/main/protobuf/Types.proto
index 3871a40..3d5ac38 100644
--- a/protocol/src/main/protobuf/Types.proto
+++ b/protocol/src/main/protobuf/Types.proto
@@ -24,7 +24,7 @@ option optimize_for = SPEED;
enum MinorType {
LATE = 0; // late binding type
MAP = 1; // an empty map column. Useful for conceptual setup. Children listed within here
- REPEATMAP = 2; // a repeated map column (means that multiple children sit below this)
+
TINYINT = 3; // single byte signed integer
SMALLINT = 4; // two byte signed integer
INT = 5; // four byte signed integer
@@ -62,6 +62,7 @@ enum MinorType {
NULL = 37; // a value of unknown type (e.g. a missing reference).
INTERVALYEAR = 38; // Interval type specifying YEAR to MONTH
INTERVALDAY = 39; // Interval type specifying DAY to SECONDS
+ LIST = 40;
}
message MajorType {
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/cdc5daed/protocol/src/main/protobuf/UserBitShared.proto
----------------------------------------------------------------------
diff --git a/protocol/src/main/protobuf/UserBitShared.proto b/protocol/src/main/protobuf/UserBitShared.proto
index 0eaa163..a3a734b 100644
--- a/protocol/src/main/protobuf/UserBitShared.proto
+++ b/protocol/src/main/protobuf/UserBitShared.proto
@@ -4,6 +4,7 @@ option java_package = "org.apache.drill.exec.proto";
option java_outer_classname = "UserBitShared";
option optimize_for = SPEED;
+import "Types.proto";
import "Coordination.proto";
import "SchemaDef.proto";
@@ -38,16 +39,30 @@ message ParsingError{
}
message RecordBatchDef {
- repeated FieldMetadata field = 1;
- optional int32 record_count = 2;
+ optional int32 record_count = 1;
+ repeated SerializedField field = 2;
optional bool is_selection_vector_2 = 3;
}
-message FieldMetadata {
- optional FieldDef def = 1;
- optional int32 value_count = 2;
- optional int32 var_byte_length = 3;
- optional int32 group_count = 4; // number of groups. (number of repeated records)
- optional int32 buffer_length = 5;
- repeated FieldMetadata child = 6;
+message NamePart{
+
+ enum Type{
+ NAME = 0;
+ ARRAY = 1;
+ }
+
+ optional Type type = 1;
+ optional string name = 2;
+ optional NamePart child = 3;
+}
+
+message SerializedField {
+ optional common.MajorType major_type = 1; // the type associated with this field.
+ optional NamePart name_part = 2;
+ repeated SerializedField child = 3; // only in the cases of type == MAP or REPEAT_MAP or REPEATED_LIST
+
+ optional int32 value_count = 4;
+ optional int32 var_byte_length = 5;
+ optional int32 group_count = 6; // number of groups. (number of repeated records)
+ optional int32 buffer_length = 7;
}