yongjinhou opened a new issue, #12989:
URL: https://github.com/apache/doris/issues/12989

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### Version
   
   47797ad7e8a238bbf1d6a07395eac0df51078056
   
   ### What's Wrong?
   
   ```
   CREATE DATABASE test_sys_load_func_strict_test_md5sum_db;
   CREATE TABLE 
test_sys_load_func_strict_test_md5sum_db.test_sys_load_func_strict_test_md5sum_tb_s
 ( k1 BIGINT NULL, k2 BIGINT NULL, k3 BIGINT NULL, k4 BIGINT NULL, k5 CHAR(64) 
NULL ) DUPLICATE KEY(k1, k2, k3) PARTITION BY RANGE(k1) ( PARTITION partition_a 
VALUES LESS THAN ("100000"), PARTITION partition_b VALUES LESS THAN 
("1000000000"), PARTITION partition_c VALUES LESS THAN ("10000000000"), 
PARTITION partition_d VALUES LESS THAN MAXVALUE ) DISTRIBUTED BY HASH(k1) 
BUCKETS 13;
   LOAD LABEL 
test_sys_load_func_strict_test_md5sum_db.label_13_03_51_28_096733_745838664 ( 
DATA INFILE("hdfs://IP:Port/xxx/timestamp_load_file") INTO TABLE 
`test_sys_load_func_strict_test_md5sum_tb_s` PARTITION (partition_a, 
partition_b, partition_c, partition_d) COLUMNS TERMINATED BY "," (`k1`, `k2`, 
`k3`, `k4`) SET(k5 = md5sum(k1))) WITH BROKER "xxx" ("username"="xxx", 
"password"="xxx") PROPERTIES( "max_filter_ratio"="0.05", "strict_mode"="True" );
   SELECT * FROM 
test_sys_load_func_strict_test_md5sum_db.test_sys_load_func_strict_test_md5sum_tb_s;
   ```
   When above SQL is executed to import data through broker, if k1 is NULL, we 
expect k5 is NULL, otherwise, k5 is "d41d8cd98f00b204e9800998ecf8427e".
   
   When select md5sum(NULL) is executed, it does not enter the MD5sum function, 
instead, it returns NULL based on the parameter value NULL.  When you run 
select md5sum (NULL, '111') or select md5sum ('111',NULL), it also does not 
enter the MD5sum function, If NULL is contained in the parameter list,NULL is 
directly returned.
   
   When data is imported through the broker, a NULL value is passed inside the 
md5sum function, resulting in an undesired value
   
   ### What You Expected?
   
   When above SQL is executed to import data through broker, if k1 is NULL, we 
expect k5 is NULL.
   
   ### How to Reproduce?
   
   _No response_
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] 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

Reply via email to