-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
56206: sql: make SupportsVectorized check light-weight r=yuzefovich a=yuzefovich **colexec: pool allocations of some objects in the read path** This commit pools the allocations of some objects that are created on the simplest read path in the vectorized engine - when we have a ColBatchScan connected with a Materializer. Release note: None **colbuilder: fix casting behavior for actual types mismatch** We have recently merged a change that enforces that the colbuilder produces an operator chain that outputs batches with the desired type schema. This is enforced by planning casts when there is a mismatch. Previously, we would only try planning a vectorized cast because the assumption was that only integers of different widths will need to be cast in some cases, but as it turns out types of string family also might need to be cast (e.g. `string` and `"char"` aren't identical). This is now fixed by falling back to row-execution casting when a vectorized cast isn't supported. Release note: None **sql: make SupportsVectorized check light-weight** Previously, in order to determine whether we supported the vectorization of a flow, we would run a pretty expensive SupportsVectorized check that performs a "fake flow setup" by actually creating all of the components without running them. This has non-negligible performance impact on KV-like workloads, so it has been optimized away in favor of a more light-weight check that simply inspects the processor specs for the fact whether the processor core can be vectorized (either natively or by wrapping row-execution processor). All processor cores have been audited to separate out all that we currently cannot wrap (usually because they don't implement RowSource interface). Note that if a new processor core is introduced and `canWrap` check is not updated, we defensively assume that it cannot be wrapped and emit an assertion failed error that - hopefully - should surface the fact that we need to update the check. Addresses: #53893. Release note: None Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com>
- Loading branch information
Showing
14 changed files
with
460 additions
and
331 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.