-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
colexec: add support for remaining binary operators #49463
Comments
Previously, the vectorized engine lacked support for concat binary operator. This commit added this support. I implemented concat for bytes referrering to same operator for row-oriented egine. Since there was already a "getBinOpAssignFunc" implemented for "datumCustomizer", I just registered the output type for Concat operator for datum type, so that Concat operator for datum type would be generated as expected. Resolves: cockroachdb#49466 See also: cockroachdb#49463 Release note (sql change): None
49453: sql: store partial index predicate in index descriptor r=mgartner a=mgartner With this commit, serialized partial index predicates are now stored on index descriptors. Predicates are dequalified so that database and table names are not included in column references. Release note: None 49758: colexec: add support for Concat binary operator r=yuzefovich a=yongyanglai Previously, the vectorized engine lacked support for concat binary operator. This commit added this support. I implemented concat for bytes referrering to same operator for row-oriented egine. Since there was already a "getBinOpAssignFunc" implemented for "datumCustomizer", I just registered the output type for Concat operator for datum type, so that Concat operator for datum type would be generated as expected. Resolves: #49466 See also: #49463 Co-authored-by: Marcus Gartner <[email protected]> Co-authored-by: Yongyang Lai <[email protected]>
Hi there! Thanks for giving a guideline for how one could approach this. I had some trouble finding the aforementioned Since this is my first time looking at the source code, I'm still getting familiar with where things are. Thanks! Kind regards, |
Yes, it should be, my apologies. Thanks for pointing this out! |
This issue tracks adding support for the remaining binary expressions in the vectorized engine. Here is what's left:
The second commit from #49761 can serve as a guideline. Here is a rough outline of what's needed to do for each:
execgen.BinaryOpName
to introduce the binary operatorregisterBinOpOutputTypes
getBinOpAssignFunc
method of appropriate type customizers to support newtree.BinaryOperator
type. This step is the most involved and requires translating the code we have intree/eval.go
to a similar code to be included in the generated code for the vectorized engine. Note that some types (liketypes.Int
) are represented "natively" (i.e. withint64
) whereas others (liketypes.Jsonb
) are represented via datum-backed vectors (i.e. withtree.Datum
).logic_test/vectorize_overloads
.To provide some context on what's happening behind the scenes for the curious: we have defined template files that are used in conjunction with these type customizers in order to generate type-specific code (similar to what generics are for in other languages). If you take a look at
_SET_SINGLE_TUPLE_PROJECTION
inproj_non_const_opt_tmpl.go
, this is where_ASSIGN
(which is a "templated function call") will be replaced by the template code that needs to be added ingetBinOpAssignFunc
. One could look atproj_non_const_ops.eg.go
(oncecockroach
is built) and at the_tmpl
file to get some more insight.Jira issue: CRDB-4225
The text was updated successfully, but these errors were encountered: