liaoxin01 opened a new pull request, #31456: URL: https://github.com/apache/doris/pull/31456
## Proposed changes Issue Number: close #xxx case: create table test_unique_key_range_tbl ( k1 date not null, k2 bigint not null, v1 int null, v2 int not null ) UNIQUE KEY(`k1`, `k2`) DISTRIBUTED BY HASH(`k2`) BUCKETS 30 PROPERTIES ( "replication_allocation" = "tag.location.default: 1", "enable_unique_key_merge_on_write" = "true" ); insert into test_unique_key_range_tbl values ( '2024-02-18' , 9019386549208004184 , -10 , 5 ), ( '2024-02-18' , 9208781524087970597 , 0 , 5 ); select k1, v1, v2 from test_unique_key_range_tbl where k1 = '2024-02-18' order by 1, 2, 3; +------------+------+------+ | k1 | v1 | v2 | +------------+------+------+ | 2024-02-18 | -10 | 5 | +------------+------+------+ 1 row in set (0.14 sec) MySQL [test]> select k1,k2, v1, v2 from test_unique_key_range_tbl where k1 = '2024-02-18' order by 1, 2, 3; +------------+---------------------+------+------+ | k1 | k2 | v1 | v2 | +------------+---------------------+------+------+ | 2024-02-18 | 9019386549208004184 | -10 | 5 | | 2024-02-18 | 9208781524087970597 | 0 | 5 | +------------+---------------------+------+------+ which introduce by:#21770 solution: when filed is null,we encode a value greater than the KEY_NORMAL_MARKER by 1. <!--Describe your changes.--> ## Further comments If this is a relatively large or complex change, kick off the discussion at [d...@doris.apache.org](mailto:d...@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc... -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org