Skip to content

fix bug: panic in order by uuid column #21776

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pkg/partition/partition.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ func Partition(sels []int64, diffs []bool, partitions []int64, vec *vector.Vecto
return genericPartition[float32](sels, diffs, partitions, vec)
case types.T_float64:
return genericPartition[float64](sels, diffs, partitions, vec)
case types.T_uuid:
return genericPartition[types.Uuid](sels, diffs, partitions, vec)
case types.T_date:
return genericPartition[types.Date](sels, diffs, partitions, vec)
case types.T_datetime:
Expand Down
6 changes: 6 additions & 0 deletions test/distributed/cases/dtype/uuid.result
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,9 @@ select * from t3 where a = 50;
a b
50 e5c8314e-2ea7-11ed-8ec0-000c29847904
drop table t3;
create table t4(a int, b uuid);
insert into t4 values(1, uuid()),(2, uuid());
select a from t4 order by b, a;
a
1
2
5 changes: 4 additions & 1 deletion test/distributed/cases/dtype/uuid.sql
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,7 @@ select * from t3;
-- test update statement with uuid type
update t3 set b = 'e5c8314e-2ea7-11ed-8ec0-000c29847904' where a = 50;
select * from t3 where a = 50;
drop table t3;
drop table t3;
create table t4(a int, b uuid);
insert into t4 values(1, uuid()),(2, uuid());
select a from t4 order by b, a;
Loading