spaces-X opened a new issue, #9135:
URL: https://github.com/apache/incubator-doris/issues/9135

   ### 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
   
   From 0.13 to the latest.
   
   ### What's Wrong?
   
   The bucket id is incorrect when distributed keys contains `string type` in 
spark load etl.
   
   ### What You Expected?
   
   The bucket id is correct when distributed keys contains `string type` in 
spark load etl.
   
   ### How to Reproduce?
   
   First, create a table whose all distributed keys are string type.
   ```
   CREATE TABLE `table_destribute_by_string` (
     `dt` int(11) NULL COMMENT "日期分区字段,格式为datekey(yyyymmdd)",
     `phone_hash` varchar(512) NULL COMMENT "电话",
     `file_name` varchar(512) NULL COMMENT "文件名称",
     `stripe_index` varchar(10) NULL COMMENT "stripe下标",
     `row_index` varchar(10) NULL COMMENT "行下标"
   ) ENGINE=OLAP
   DUPLICATE KEY(`dt`, `phone_hash`)
   COMMENT "回归测试"
   PARTITION BY RANGE(`dt`)
   (PARTITION p20220412 VALUES [("19700101"), ("20220412")),
   PARTITION p20220413 VALUES [("20220412"), ("20220413")))
   DISTRIBUTED BY HASH(`phone_hash`) BUCKETS 100
   PROPERTIES (
   "replication_num" = "3",
   "in_memory" = "false",
   "storage_format" = "V2"
   );
   ```
   
   Then, start spark load of the created table.
   Finally, you will find that there is only one task running to write the hdfs 
file
   
   <img width="1567" alt="image" 
src="https://user-images.githubusercontent.com/21240668/164206325-5d67431c-fd2b-448c-91fc-2059120b9dc2.png";>
   
   
   
   ### 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to