You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the vectorized engine, each projecting operator is responsible for
appending its output vector to the batch. Previously, we had a bug in an
edge case where we have a "typed" NULL constant vector. Namely, we would
create the VectorTypeEnforcer helper with `types.Unknown`, yet we would
include the actual type of the NULL column (by appending the actual output
type to `typs` in `execplan.go`), which would lead to problems down the
line. The fix is simple - use the actual type for the vector even if
we're going to mark all values in it as NULL.
I struggled to come up with a scenario where we would hit this without
disabling some folding optimizations, so the regression test added here
disables the "always null" short-circuiting logic during type checking
in test builds, via a testing knob.
Release note (bug fix): Previously, CockroachDB could encounter an
internal error "trying to add a column of UNKNOWN type at ..." in rare
cases when handling CASE or OR operations. The bug has been present
since 20.2 version and is now fixed.
0 commit comments