(t *testing.T)
| 501 | } |
| 502 | |
| 503 | func TestNodeString(t *testing.T) { |
| 504 | for _, test := range []struct { |
| 505 | title string |
| 506 | node *Node |
| 507 | want string |
| 508 | }{ |
| 509 | { |
| 510 | "Distributed Union with call_type=Local", |
| 511 | &Node{PlanNode: &spanner.PlanNode{ |
| 512 | DisplayName: "Distributed Union", |
| 513 | Metadata: mustNewStruct(map[string]interface{}{ |
| 514 | "call_type": "Local", |
| 515 | "subquery_cluster_node": "4", |
| 516 | }), |
| 517 | }}, "Local Distributed Union", |
| 518 | }, |
| 519 | { |
| 520 | "Scan with scan_type=IndexScan and Full scan=true", |
| 521 | &Node{PlanNode: &spanner.PlanNode{ |
| 522 | DisplayName: "Scan", |
| 523 | Metadata: mustNewStruct(map[string]interface{}{ |
| 524 | "scan_type": "IndexScan", |
| 525 | "scan_target": "SongsBySongName", |
| 526 | "Full scan": "true", |
| 527 | }), |
| 528 | }}, "Index Scan (Full scan: true, Index: SongsBySongName)", |
| 529 | }, |
| 530 | { |
| 531 | "Scan with scan_type=TableScan", |
| 532 | &Node{PlanNode: &spanner.PlanNode{ |
| 533 | DisplayName: "Scan", |
| 534 | Metadata: mustNewStruct(map[string]interface{}{ |
| 535 | "scan_type": "TableScan", |
| 536 | "scan_target": "Songs", |
| 537 | }), |
| 538 | }}, "Table Scan (Table: Songs)", |
| 539 | }, |
| 540 | { |
| 541 | "Scan with scan_type=BatchScan", |
| 542 | &Node{PlanNode: &spanner.PlanNode{ |
| 543 | DisplayName: "Scan", |
| 544 | Metadata: mustNewStruct(map[string]interface{}{ |
| 545 | "scan_type": "BatchScan", |
| 546 | "scan_target": "$v2", |
| 547 | }), |
| 548 | }}, "Batch Scan (Batch: $v2)", |
| 549 | }, |
| 550 | { |
| 551 | "Sort Limit with call_type=Local", |
| 552 | &Node{PlanNode: &spanner.PlanNode{ |
| 553 | DisplayName: "Sort Limit", |
| 554 | Metadata: mustNewStruct(map[string]interface{}{ |
| 555 | "call_type": "Local", |
| 556 | }), |
| 557 | }}, "Local Sort Limit", |
| 558 | }, |
| 559 | { |
| 560 | "Sort Limit with call_type=Global", |
nothing calls this directly
no test coverage detected