huangmengbin opened a new issue #5989:
URL: https://github.com/apache/incubator-doris/issues/5989


   **Describe the bug**
    - RangePartitionPruner的裁剪结果不合预期。
    - The result of RangePartitionPruner is not as expected.
   
   **To Reproduce**
    1. 创建一张拥有多列Range分区(>=3列)的表,
   <img width="313" alt="create table" 
src="https://user-images.githubusercontent.com/44433515/121052156-adfa3f80-c7ec-11eb-9822-2276187f345c.png";>
   实际上,你填写了范围 LESS THAN('0'),Doris内部会自动帮忙为后面的列填充相应类型的负无穷值。
   <img width="741" alt="help create table" 
src="https://user-images.githubusercontent.com/44433515/121053231-b9019f80-c7ed-11eb-8e5d-f7ecf9c11133.png";>
   
    2. 插入一条数据
   <img width="417" alt="截屏2021-06-07 下午6 51 17" 
src="https://user-images.githubusercontent.com/44433515/121053851-5c52b480-c7ee-11eb-96a1-3dd0c671c293.png";>
   
    3. 查看执行计划,主要涉及 > 和 >= 操作符。可以看到分区已命中
   <img width="376" alt="gt" 
src="https://user-images.githubusercontent.com/44433515/121054788-44c7fb80-c7ef-11eb-8b90-a055b4353f1b.png";>
   <img width="377" alt="ge" 
src="https://user-images.githubusercontent.com/44433515/121054855-56a99e80-c7ef-11eb-86f3-551baccc55a3.png";>
   
   
   **Expected behavior**
   - 预期应该不会命中任何分区,即partitions=0/1
   
   
   **Additional context**
   - 主要原因是:以 a>0 作为过滤条件时,实际上是生成了区间 ( ('0'), (+∞) ) ;以 a>=0 作为过滤条件时,实际上生成了 [ 
('0', -∞), (+∞) )
   - 由于它们的下界的size更小,在大小比较时会小于元组('0', -∞, -∞),因此与某个分区产生了交集。


-- 
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.

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