kangkaisen commented on issue #1356: Wrong query result with constant 
URL: 
https://github.com/apache/incubator-doris/issues/1356#issuecomment-504405059
 
 
   why the poi_second_city_id IN (-1) predicate is used to prune partition?
   
   1 poi_second_city_id IN (-1) is -1 in (-1)
   
   2 In `SingleNodePlanner`,    List<Expr> conjuncts = 
analyzer.getUnassignedConjuncts(scanNode), conjuncts will contain  -1 in (-1);
   
   3  In `PartitionColumnFilter keyFilter = createPartitionFilter(slotDesc, 
conjuncts);` -1 in (-1) will set setInPredicate 
`partitionColumnFilter.setInPredicate(inPredicate);`
   
   4 So the `RangePartitionPruner.partitionColumnFilters` will contain -1 in 
(-1) inPredicate.
   
   I think the root cause is  -1 in (-1) shouldn't be contained 
analyzer.getUnassignedConjuncts(scanNode). So I think simplify -1 in (-1)  to 
BoolLiteral(true) will fix this issue and reasonable.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@doris.apache.org
For additional commands, e-mail: dev-h...@doris.apache.org

Reply via email to