[
https://issues.apache.org/jira/browse/TAJO-269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14260889#comment-14260889
]
ASF GitHub Bot commented on TAJO-269:
-------------------------------------
Github user jihoonson commented on a diff in the pull request:
https://github.com/apache/tajo/pull/322#discussion_r22341017
--- Diff: tajo-plan/src/main/proto/Plan.proto ---
@@ -26,58 +26,280 @@ import "CatalogProtos.proto";
import "DataTypes.proto";
enum NodeType {
- BST_INDEX_SCAN = 0;
- EXCEPT = 1;
+ SET_SESSION = 0;
+
+ ROOT = 1;
EXPRS = 2;
- DISTINCT_GROUP_BY = 3;
- GROUP_BY = 4;
- HAVING = 5;
- JOIN = 6;
- INSERT = 7;
- INTERSECT = 8;
- LIMIT = 9;
- PARTITIONS_SCAN = 10;
- PROJECTION = 11;
- ROOT = 12;
- SCAN = 13;
- SELECTION = 14;
- SORT = 15;
- STORE = 16;
- TABLE_SUBQUERY = 17;
- UNION = 18;
- WINDOW_AGG = 19;
-
- CREATE_DATABASE = 20;
- DROP_DATABASE = 21;
- CREATE_TABLE = 22;
- DROP_TABLE = 23;
- ALTER_TABLESPACE = 24;
- ALTER_TABLE = 25;
- TRUNCATE_TABLE = 26;
-}
-
-message LogicalPlan {
- required KeyValueSetProto adjacentList = 1;
+ PROJECTION = 3;
+ LIMIT = 4;
+ WINDOW_AGG = 5;
+ SORT = 6;
+ HAVING = 7;
+ GROUP_BY = 8;
+ DISTINCT_GROUP_BY = 9;
+ SELECTION = 10;
+ JOIN = 11;
+ UNION = 12;
+ INTERSECT = 13;
+ EXCEPT = 14;
+ TABLE_SUBQUERY = 15;
+ SCAN = 16;
+ PARTITIONS_SCAN = 17;
+ BST_INDEX_SCAN = 18;
+ STORE = 19;
+ INSERT = 20;
+
+ CREATE_DATABASE = 21;
+ DROP_DATABASE = 22;
+ CREATE_TABLE = 23;
+ DROP_TABLE = 24;
+ ALTER_TABLESPACE = 25;
+ ALTER_TABLE = 26;
+ TRUNCATE_TABLE = 27;
}
-message LogicalNode {
- required int32 pid = 1;
- required NodeType type = 2;
- required SchemaProto in_schema = 3;
- required SchemaProto out_schema = 4;
- required NodeSpec spec = 5;
+message LogicalNodeTree {
+ repeated LogicalNode nodes = 1;
}
-message NodeSpec {
- optional ScanNode scan = 1;
+message LogicalNode {
+ required int32 sid = 1;
--- End diff --
The names of ```sid``` and ```pid``` are hard to guess their meanings.
Would you add some comments?
It would be better if you can change these names to be more expressible.
> Protocol buffer De/Serialization for LogicalNode
> ------------------------------------------------
>
> Key: TAJO-269
> URL: https://issues.apache.org/jira/browse/TAJO-269
> Project: Tajo
> Issue Type: Improvement
> Components: query master, worker
> Reporter: Jihoon Son
> Assignee: Hyunsik Choi
> Fix For: 0.10
>
> Attachments: TAJO-269.patch, TAJO-269_2.patch
>
>
> In the current implementation, the logical plan is serialized into a JSON
> object and sent to each worker.
> However, the transmission of JSON object incurs the high overhead due to its
> large size.
> ProtocolBuffer is a good alternative because its overhead is quite small and
> already used in other modules of Tajo.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)