From 04a80b609e6e3e98cb092c8b6b95c37b326e64c6 Mon Sep 17 00:00:00 2001 From: Alanmas Date: Fri, 15 Jan 2021 11:59:27 -0600 Subject: [PATCH] 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 --- pkg/sql/colexec/COLEXEC.bzl | 1 + pkg/sql/colexec/crossjoiner.eg.go | 7 +++++++ pkg/sql/colexec/crossjoiner_tmpl.go | 9 +++++++++ 3 files changed, 17 insertions(+) diff --git a/pkg/sql/colexec/COLEXEC.bzl b/pkg/sql/colexec/COLEXEC.bzl index 7c2fecbe1968..18e754e97cf5 100644 --- a/pkg/sql/colexec/COLEXEC.bzl +++ b/pkg/sql/colexec/COLEXEC.bzl @@ -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'), diff --git a/pkg/sql/colexec/crossjoiner.eg.go b/pkg/sql/colexec/crossjoiner.eg.go index c63c352aafba..c239036ad098 100644 --- a/pkg/sql/colexec/crossjoiner.eg.go +++ b/pkg/sql/colexec/crossjoiner.eg.go @@ -19,6 +19,13 @@ import ( "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 diff --git a/pkg/sql/colexec/crossjoiner_tmpl.go b/pkg/sql/colexec/crossjoiner_tmpl.go index 7107e7a93437..e459f8611cb5 100644 --- a/pkg/sql/colexec/crossjoiner_tmpl.go +++ b/pkg/sql/colexec/crossjoiner_tmpl.go @@ -23,11 +23,20 @@ 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