Skip to content

sql: vectorized engine incorrectly casts UUID to bytes when concatenating with a string #83093

@rytaft

Description

@rytaft

Consider the following difference between the vectorized engine and the row engine:

demo@127.0.0.1:26257/defaultdb> create table t (u uuid);
CREATE TABLE


Time: 5ms total (execution 5ms / network 0ms)

demo@127.0.0.1:26257/defaultdb> insert into t values ('eb64afe6-ade7-40ce-8352-4bb5eec39075');
INSERT 0 1


Time: 5ms total (execution 5ms / network 0ms)

demo@127.0.0.1:26257/defaultdb> select u || 'a' from t;
                     ?column?
--------------------------------------------------
  \xebd\xaf\xe6\xad\xe7@\u0383RK\xb5\xee\u00d0ua
(1 row)


Time: 1ms total (execution 1ms / network 0ms)

demo@127.0.0.1:26257/defaultdb> set vectorize = off;
SET


Time: 0ms total (execution 0ms / network 0ms)

demo@127.0.0.1:26257/defaultdb> select u || 'a' from t;
                ?column?
-----------------------------------------
  eb64afe6-ade7-40ce-8352-4bb5eec39075a
(1 row)

The result with vectorize=off is what is also returned by Postgres.

Jira issue: CRDB-16859

Metadata

Metadata

Labels

C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-sql-queriesSQL Queries Team

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions