Skip to content

Commit 215727f

Browse files
committed
sql: add row count interface for inspect checks
The interface allows checks to expose row counts of a span to other checks. Part of: #155472 Epic: CRDB-55075 Release note: None
1 parent aa92f9c commit 215727f

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

pkg/sql/inspect/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ go_library(
1313
"issue.go",
1414
"log_sink.go",
1515
"progress.go",
16+
"row_count_check.go",
1617
"runner.go",
1718
"span_source.go",
1819
"table_sink.go",

pkg/sql/inspect/row_count_check.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright 2025 The Cockroach Authors.
2+
//
3+
// Use of this software is governed by the CockroachDB Software License
4+
// included in the /LICENSE file.
5+
6+
package inspect
7+
8+
// inspectCheckRowCount defines an inspectCheck that counts rows in addition to
9+
// its primary validation.
10+
type inspectCheckRowCount interface {
11+
inspectCheck
12+
13+
// Rows returns the number of rows counted by the check.
14+
Rows() uint64
15+
}

0 commit comments

Comments
 (0)