forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
opt: cast to identical types for set operations
This change makes the optbuilder more strict with respect to set operations. Previously, it would only require types to be `Equivalent` across the two sides. This leads to errors in vectorized execution, when we e.g. try to union a INT8 with an INT4. We now require the types to be `Identical`, and we add casts as necessary. We use the type from the left side in this case. This can lead to questionable behavior when the right side is a "wider" type, but we don't have any facility to robustly determine what the type should be. Fixes cockroachdb#59148. Release note (bug fix): fixed execution errors for some queries that use set operations (UNION / EXCEPT / INTERSECT) where a column has types of different widths on the two sides (e.g. INT4 vs INT8).
- Loading branch information
1 parent
673a257
commit 8795571
Showing
4 changed files
with
143 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters