package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev

# Functions

AssertTuplesSetsEqual asserts that two sets of tuples are equal.
CreateTestProjectingOperator creates a projecting operator that performs projectingExpr on input that has inputTypes as its output columns.
EncodeWindowFrameOffset returns the given datum offset encoded as bytes, for use in testing window functions in RANGE mode with offsets.
GenerateBatchSize generates somewhat random value to set coldata.BatchSize() to.
GetTupleFromBatch is a helper function that extracts a tuple at index tupleIdx from batch.
MakeInputs is a utility function that populates a slice of colexecargs.OpWithMetaInfo objects based on sources.
MakeRandWindowFrameRangeOffset returns a valid offset of the given type for use in testing window functions in RANGE mode with offsets.
NewChunkingBatchSource returns a new chunkingBatchSource with the given column types, columns, and length.
NewFiniteBatchSource returns a new Operator initialized to return its input batch a specified number of times.
NewFiniteChunksSource returns a new finiteChunksSource.
NewOpFixedSelTestInput returns a new opFixedSelTestInput with the given input tuples and selection vector.
NewOpTestInput returns a new opTestInput with the given input tuples and the given type schema.
NewOpTestOutput returns a new OpTestOutput, initialized with the given input to verify that the output is exactly equal to the expected tuples.
RunTests is a helper that automatically runs your tests with varied batch sizes and with and without a random selection vector.
RunTestsWithFixedSel is a helper that (with a given fixed selection vector) automatically runs your tests with varied batch sizes.
RunTestsWithFn is like RunTests, but the input function is responsible for performing any required tests.
RunTestsWithOrderedCols is a wrapper for RunTestsWithoutAllNullsInjectionWithErrorHandler that has the ability to specify ordered columns.
RunTestsWithoutAllNullsInjection is the same as RunTests, but it skips the all nulls injection test.
RunTestsWithoutAllNullsInjectionWithErrorHandler is the same as RunTestsWithoutAllNullsInjection but takes in an additional argument function that handles any errors encountered during the test run (e.g.
RunTestsWithTyps is the same as RunTests with an ability to specify the types of the input tuples.

# Constants

MinBatchSize is the minimum acceptable size of batches for tests in colexec* packages.
OrderedVerifier compares the input and output tuples, returning an error if they're not identical.
PartialOrderedVerifier compares the input and output tuples as multiple sets according to the order of some specified columns, returning an error if the specified columns are not an order or if the set of tuples for a distinct group of those columns aren't equal by set comparison (irrespective of order).
UnorderedVerifier compares the input and output tuples as sets, returning an error if they aren't equal by set comparison (irrespective of order).

# Variables

OrderedDistinctColsToOperators is a test helper that's aliased to colexecbase.OrderedDistinctColsToOperators.
SkipRandomNullsInjection is an error handler that can be provided to RunTestsWithoutAllNullsInjectionWithErrorHandler when the caller wants to skip "random nulls injection" subtest.

# Structs

CallbackMetadataSource is a utility struct that implements the colexecop.MetadataSource interface by calling a provided callback.
FiniteBatchSource is an Operator that returns the same batch a specified number of times.
MockTypeContext is a mock typing context for the typechecker.
OpTestOutput is a test verification struct that ensures its input batches match some expected output tuples.

# Type aliases

TestRunner is the signature of RunTestsWithTyps that can be used to substitute it with RunTestsWithoutAllNullsInjection when applicable.
Tuple represents a row with any-type columns.
Tuples represents a table with any-type columns.
VerifierType determines how the expected and the actual tuples should be compared.