package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Functions
DecodeDatum decodes the given bytes slice into a datum of the given type.
DrainAndClose drains and closes the source and then closes the dst too.
GenerateValuesSpec generates a ValuesCoreSpec that encodes the given rows.
GetConnForOutbox is a shared function between the rowexec and colexec outboxes.
GetIndexJoinBatchSize returns the lookup rows batch size hint for the index joins.
GetLeafTxnFinalState returns the txn metadata from a transaction if it is present and the transaction is a leaf transaction.
GetTraceDataAsMetadata returns the trace data as execinfrapb.ProducerMetadata object when called not on the gateway.
GetWorkMemLimit returns the number of bytes determining the amount of RAM available to a single processor or operator.
HasParallelProcessors returns whether flow contains multiple processors in the same stage.
HydrateTypesInDatumInfo hydrates all user-defined types in the provided DatumInfo slice.
IsDynamicQueryHasNoHomeRegionError tests if `err` is a dynamicQueryHasNoHomeRegionError.
LimitHint returns the limit hint to set for a KVFetcher based on the spec's limit hint and the PostProcessSpec.
MakeDistSQLMetrics instantiates the metrics holder for DistSQL monitoring.
MakeLimitHintHelper creates a new LimitHintHelper.
MakeNoMetadataRowSource builds a NoMetadataRowSource.
MaybeGetNonRetryableDynamicQueryHasNoHomeRegionError tests if `err` is a dynamicQueryHasNoHomeRegionError.
MisplannedRanges queries the range cache for all the passed-in spans and returns the list of ranges whose leaseholder is not on the indicated node.
NewDynamicQueryHasNoHomeRegionError returns a dynamic no home region error wrapping the original error.
NewLimitedMonitor is a utility function used by processors to create a new limited memory monitor with the given name and start it.
NewLimitedMonitorNoFlowCtx is the same as NewLimitedMonitor and should be used when the caller doesn't have an access to *FlowCtx.
NewLimitedMonitorWithLowerBound is similar to NewLimitedMonitor but guarantees that the monitor's limit is at least minMemoryLimit bytes.
NewMonitor is a utility function used by processors to create a new memory monitor with the given name and start it.
NewRepeatableRowSource creates a RepeatableRowSource with the given schema and rows.
NewTestDiskMonitor creates and starts a new disk monitor to be used in tests.
NewTestMemMonitor creates and starts a new memory monitor to be used in tests.
ProcessorSpan creates a child span for a processor (if we are doing any tracing).
Run reads records from the source and outputs them to the receiver, properly draining the source of metadata and closing both the source and receiver.
SendTraceData collects the tracing information from the ctx and pushes it to dst when called not on the gateway.
ShouldSwallowReadWithinUncertaintyIntervalError examines meta and returns true if it should be swallowed and not propagated further.
# Constants
ConsumerClosed indicates that the consumer will not process any more data rows or metadata.
64 MiB */.
DrainRequested indicates that the consumer will not process any more data rows, but will accept trailing metadata from the producer.
NeedMoreRows indicates that the consumer is still expecting more rows.
QueryNotRunningInHomeRegionMessagePrefix is the common message prefix for erroring out queries with no home region when the enforce_home_region session flag is set.
RowChannelBufSize is the default buffer size of a RowChannel.
StateDraining is the state in which the processor is forwarding metadata from its input and otherwise ignoring all rows.
StateExhausted is the state of a processor that has no more rows or metadata to produce.
StateRunning is the common state of a processor: it's producing rows for its consumer and forwarding metadata from its input.
StateTrailingMeta is the state in which the processor is outputting final metadata such as the tracing information or the LeafTxnFinalState.
StaticSQLInstanceID is the default Node ID to be used in tests.
SwitchToAnotherPortal indicates that we received exec command for a different portal, and may come back to continue executing the current portal later.
# Variables
IncludeRUEstimateInExplainAnalyze determines whether EXPLAIN ANALYZE should return an estimate for the number of RUs consumed by tenants.
JoinReaderIndexJoinStrategyBatchSize determines the size of input batches used to construct a single lookup KV batch by rowexec.joinReaderIndexJoinStrategy as well as colfetcher.ColIndexJoin.
UseStreamerEnabled determines the default value for the 'streamer_enabled' session variable.
# Structs
DistSQLMetrics contains pointers to the metrics for monitoring DistSQL processing.
FlowCtx encompasses the configuration parameters needed for various flow components.
LimitHintHelper is used for lookup and index joins in order to limit batches of input rows in the presence of hard and soft limits.
NoMetadataRowSource is a wrapper on top of a RowSource that automatically forwards metadata to a RowReceiver.
ProcessorBase is supposed to be embedded by Processors.
ProcessorBaseNoHelper is slightly reduced version of ProcessorBase that should be used by the processors that don't need to handle the post-processing spec.
ProcOutputHelper is a helper type that performs filtering and projection on the output of a processor.
ProcStateOpts contains fields used by the ProcessorBase's family of functions that deal with draining and trailing metadata: the ProcessorBase implements generic useful functionality that needs to call back into the Processor.
RepeatableRowSource is a RowSource used in benchmarks to avoid having to reinitialize a new RowSource every time during multiple passes of the input.
RowChannel is a thin layer over a RowChannelMsg channel, which can be used to transfer rows between goroutines.
RowChannelMsg is the message used in the channels that implement local physical streams (i.e.
ServerConfig encompasses the configuration required to create a DistSQLServer.
SpansWithCopy tracks a set of spans (which can be modified) along with the copy of the original one if needed.
TestingKnobs are the testing knobs.
# Interfaces
BatchReceiver is any component of a flow that receives batches from another component.
Dialer is used for dialing based on node IDs.
DoesNotUseTxn is an interface implemented by some processors to mark that they do not use a txn.
ExecStatsForTraceHijacker is an interface that allows us to hijack ExecStatsForTrace function from the ProcessorBase.
LocalProcessor is a RowSourcedProcessor that needs to be initialized with its processorID and post-processing spec.
Processor is a common interface implemented by all processors, used by the higher-level flow orchestration code.
RowReceiver is any component of a flow that receives rows from another component.
RowSource is any component of a flow that produces rows that can be consumed by another component.
RowSourcedProcessor is the union of RowSource and Processor.
RuntimeStats is an interface through which the rowexec layer can get information about runtime statistics.
# Type aliases
ConsumerStatus is the type returned by RowReceiver.Push(), informing a producer of a consumer's state.
ProcessorConstructor is a function that creates a Processor.