colexec: fix mixed type comparison between Timestamp and TimestampTZ #44770
Labels
C-cleanup
Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.
T-sql-queries
SQL Queries Team
I believe currently there is an issue when comparing values of
Timestamp
type againstTimestampTZ
type. In the vectorized engine both are mapped tocoltypes.Timestamp
, so the generated code doesn't know that there are some differences.Timestamp
value needs to be "shifted" into the time zone of the evaluation context before comparison whereasTimestampTZ
value doesn't need to, but currently we're comparing the values as if both wereTimestampTZ
. This issue should fixed as part of #43559.If we don't fix it before the release, we need to have some fallback mechanism - either remove the support for one of the types or plumb through logical types in all operators and prohibit specifically such mixed type comparison.
Jira issue: CRDB-5204
The text was updated successfully, but these errors were encountered: