Skip to content

Commit

Permalink
execgen: add overloads for INTERVAL / INT4 and INTERVAL / INT2
Browse files Browse the repository at this point in the history
Vectorized overloads for `INTERVAL / INT4` and `INTERVAL / INT2`
expressions have been added. The omission of these overloads caused
errors only in rare cases because usually these expressions are retyped
to `INTERVAL / INT8` by the optimizer
[here](https://github.com/cockroachdb/cockroach/blob/583efd3cd9c7198bac935bb81a7a598e5849a269/pkg/sql/opt/optbuilder/scalar.go#L218).

Fixes #70738

Release note (bug fix): A bug has been fixed which caused errors in rare
cases when trying to divide `INTERVAL` values by `INT4` or `INT2`
values.
  • Loading branch information
mgartner committed Jan 19, 2022
1 parent 42e7e51 commit 1cf698d
Show file tree
Hide file tree
Showing 5 changed files with 748 additions and 1 deletion.
238 changes: 238 additions & 0 deletions pkg/sql/colexec/colexecproj/proj_const_left_ops.eg.go

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

Loading

0 comments on commit 1cf698d

Please sign in to comment.