diff --git a/pkg/sql/execinfrapb/flow_diagram.go b/pkg/sql/execinfrapb/flow_diagram.go index b05e466dd930..599ccb231aba 100644 --- a/pkg/sql/execinfrapb/flow_diagram.go +++ b/pkg/sql/execinfrapb/flow_diagram.go @@ -513,6 +513,16 @@ func (post *PostProcessSpec) summary() []string { return res } +func (c *RestoreDataSpec) summary() (string, []string) { + return "RestoreDataSpec", []string{} +} + +// summary implements the diagramCellType interface. +func (c *SplitAndScatterSpec) summary() (string, []string) { + detail := fmt.Sprintf("%d chunks", len(c.Chunks)) + return "SplitAndScatterSpec", []string{detail} +} + // summary implements the diagramCellType interface. func (c *ReadImportDataSpec) summary() (string, []string) { ss := make([]string, 0, len(c.Uri)) @@ -522,6 +532,21 @@ func (c *ReadImportDataSpec) summary() (string, []string) { return "ReadImportData", ss } +// summary implements the diagramCellType interface. +func (s *StreamIngestionDataSpec) summary() (string, []string) { + return "StreamIngestionData", []string{} +} + +// summary implements the diagramCellType interface. +func (s *StreamIngestionFrontierSpec) summary() (string, []string) { + return "StreamIngestionFrontier", []string{} +} + +// summary implements the diagramCellType interface. +func (s *IndexBackfillMergerSpec) summary() (string, []string) { + return "IndexBackfillMerger", []string{} +} + // summary implements the diagramCellType interface. func (s *ExportSpec) summary() (string, []string) { return "Exporter", []string{s.Destination} diff --git a/pkg/sql/execinfrapb/flow_diagram_test.go b/pkg/sql/execinfrapb/flow_diagram_test.go index 68162133bd3e..31751826f32a 100644 --- a/pkg/sql/execinfrapb/flow_diagram_test.go +++ b/pkg/sql/execinfrapb/flow_diagram_test.go @@ -20,6 +20,7 @@ import ( "github.com/cockroachdb/cockroach/pkg/base" "github.com/cockroachdb/cockroach/pkg/sql/catalog/descpb" "github.com/cockroachdb/cockroach/pkg/util/leaktest" + "github.com/stretchr/testify/require" ) // compareDiagrams verifies that two JSON strings decode to equal diagramData @@ -404,3 +405,10 @@ func TestPlanDiagramJoin(t *testing.T) { compareDiagrams(t, s, expected) } + +func TestProcessorsImplementDiagramCellType(t *testing.T) { + pcu := reflect.ValueOf(ProcessorCoreUnion{}) + for i := 0; i < pcu.NumField(); i++ { + require.Implements(t, (*diagramCellType)(nil), pcu.Field(i).Interface()) + } +}