Skip to content
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

bazel,colexec: generate crossjoiner.eg.go within bazel #59056

Merged
merged 1 commit into from
Jan 15, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
bazel,colexec: generate crossjoiner.eg.go within bazel
We broke the bazel build in 52c5f51 when we introduced a new .eg.go
file, without updating the bazel target. We do that here.

Fixes: #59052.

Release note: None
  • Loading branch information
alan-mas committed Jan 15, 2021
commit 651a5376ccd8c9ca98967e25f222445a0a4a6399
1 change: 1 addition & 0 deletions pkg/sql/colexec/COLEXEC.bzl
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@ targets = [
('and_or_projection.eg.go', 'and_or_projection_tmpl.go'),
('cast.eg.go', 'cast_tmpl.go'),
('const.eg.go', 'const_tmpl.go'),
('crossjoiner.eg.go', 'crossjoiner_tmpl.go'),
('default_cmp_expr.eg.go', 'default_cmp_expr_tmpl.go'),
('default_cmp_proj_ops.eg.go', 'default_cmp_proj_ops_tmpl.go'),
('default_cmp_sel_ops.eg.go', 'default_cmp_sel_ops_tmpl.go'),
6 changes: 6 additions & 0 deletions pkg/sql/colexec/crossjoiner.eg.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions pkg/sql/colexec/crossjoiner_tmpl.go
Original file line number Diff line number Diff line change
@@ -23,11 +23,19 @@ import (
"context"

"github.com/cockroachdb/cockroach/pkg/col/coldata"
"github.com/cockroachdb/cockroach/pkg/col/typeconv"
"github.com/cockroachdb/cockroach/pkg/sql/colexec/execgen"
"github.com/cockroachdb/cockroach/pkg/sql/colexecbase/colexecerror"
"github.com/cockroachdb/cockroach/pkg/sql/types"
"github.com/cockroachdb/errors"
)

// Workaround for bazel auto-generated code. goimports does not automatically
// pick up the right packages when run within the bazel sandbox.
var (
_ = typeconv.DatumVecCanonicalTypeFamily
)

// buildFromLeftInput builds part of the output of a cross join that comes from
// the vectors of the left input. The new output tuples are put starting at
// index destStartIdx and will not exceed the capacity of the output batch. It