-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Combine metadata fields #63
Combine metadata fields #63
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for implementation. Can you add some tests?
I have added basic test cases from the examples. |
This reverts commit 20aa681.
It seems better to use |
query_plan.go
Outdated
fields = append(fields, fmt.Sprintf("%s: %s", k, v.GetStringValue())) | ||
for k, v := range metadata { | ||
switch k { | ||
case "call_type", "iterator_type": // Skip because it is displayed in node title |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like implementations of getNodeTitle() and getAllMetadataString() are coupled with each other.
(getAllMetadataString() depends on the implementation of getNodeTitle()).
How about merging them into a single function?
func (n *Node) String() string {
// assemble operator
...
// assemble metadata
...
return operator + metadata
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 8d7a1b4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
scan_type
andscan_target
call_type
,iterator_type
,scan_type
into node titlesubquery_cluster_node
becausespanner-cli
doesn't display node idDiscussed in #57 (comment)
Examples
Example 1 Distributed Cross Apply(Back Join)
Before
After
Example 2 Aggregation and Sort Limit
Before
After