nextdreamblue opened a new issue, #34056: URL: https://github.com/apache/doris/issues/34056
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues. ### Version master ### What's Wrong? CREATE TABLE IF NOT EXISTS compaction_uniq_keys_row_store_regression_test1 ( `user_id` int NOT NULL COMMENT "用户id", `date` DATE NOT NULL COMMENT "数据灌入日期时间", `datev2` DATEV2 NOT NULL COMMENT "数据灌入日期时间", `datetimev2_1` DATETIMEV2(3) NOT NULL COMMENT "数据灌入日期时间", `datetimev2_2` DATETIMEV2(6) NOT NULL COMMENT "数据灌入日期时间", `city` VARCHAR(20) COMMENT "用户所在城市", `age` SMALLINT COMMENT "用户年龄", `sex` TINYINT COMMENT "用户性别", `last_visit_date` DATETIME DEFAULT "1970-01-01 00:00:00" COMMENT "用户最后一次访问时间", `last_update_date` DATETIME DEFAULT "1970-01-01 00:00:00" COMMENT "用户最后一次更新时间", `datetime_val1` DATETIMEV2(3) DEFAULT "1970-01-01 00:00:00.111" COMMENT "用户最后一次访问时间", `datetime_val2` DATETIME(6) DEFAULT "1970-01-01 00:00:00" COMMENT "用户最后一次更新时间", `last_visit_date_not_null` DATETIME NOT NULL DEFAULT "1970-01-01 00:00:00" COMMENT "用户最后一次访问时间", `cost` BIGINT DEFAULT "0" COMMENT "用户总消费", `max_dwell_time` INT DEFAULT "0" COMMENT "用户最大停留时间", `min_dwell_time` INT DEFAULT "99999" COMMENT "用户最小停留时间") UNIQUE KEY(`user_id`, `date`, `datev2`, `datetimev2_1`, `datetimev2_2`, `city`, `age`, `sex`) DISTRIBUTED BY HASH(`user_id`) PROPERTIES ( "replication_num" = "1", "enable_unique_key_merge_on_write" = "true", "light_schema_change" = "true", "store_row_column" = "true"); INSERT INTO compaction_uniq_keys_row_store_regression_test VALUES (3, '2017-10-01', '2017-10-01', '2017-10-01 11:11:11.027', '2017-10-01 11:11:11.017', 'Beijing', 10, 1, NULL, NULL, NULL, NULL, '2020-01-05', 1, 34, 20); ``` MySQL [test]> SELECT last_visit_date FROM compaction_uniq_keys_row_store_regression_test t where user_id = 3 and date = '2017-10-01' and datev2 = '2017-10-01' and datetimev2_1 = '2017-10-01 11:11:11.027' and datetimev2_2 = '2017-10-01 11:11:11.017' and city = 'Beijing' and age = 10 and sex = 1; +-----------------+ | last_visit_date | +-----------------+ | NULL | +-----------------+ 1 row in set (0.05 sec) MySQL [test]> SELECT last_visit_date FROM compaction_uniq_keys_row_store_regression_test t where user_id = 3 and date = '2017-10-01' and datev2 = '2017-10-01' and datetimev2_1 = '2017-10-01 11:11:11.027' and datetimev2_2 = '2017-10-01 11:11:11.017' and city = 'Beijing' and age = 10; +-----------------+ | last_visit_date | +-----------------+ | NULL | +-----------------+ 1 row in set (0.04 sec) MySQL [test]> set experimental_enable_nereids_planner = false; Query OK, 0 rows affected (0.00 sec) MySQL [test]> SELECT last_visit_date FROM compaction_uniq_keys_row_store_regression_test t where user_id = 3 and date = '2017-10-01' and datev2 = '2017-10-01' and datetimev2_1 = '2017-10-01 11:11:11.027' and datetimev2_2 = '2017-10-01 11:11:11.017' and city = 'Beijing' and age = 10 and sex = 1; +---------------------+ | last_visit_date | +---------------------+ | 1970-01-01 00:00:00 | +---------------------+ 1 row in set (0.01 sec) MySQL [test]> SELECT last_visit_date FROM compaction_uniq_keys_row_store_regression_test t where user_id = 3 and date = '2017-10-01' and datev2 = '2017-10-01' and datetimev2_1 = '2017-10-01 11:11:11.027' and datetimev2_2 = '2017-10-01 11:11:11.017' and city = 'Beijing' and age = 10; +-----------------+ | last_visit_date | +-----------------+ | NULL | +-----------------+ 1 row in set (0.07 sec) MySQL [test]> ``` ### What You Expected? return null ### How to Reproduce? _No response_ ### Anything Else? _No response_ ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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.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