You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/04/27 14:11:49 UTC

[GitHub] [incubator-doris] zenoyang opened a new issue, #9269: [Bug] Query get wrong result when ColumnDict concurrent predicate eval

zenoyang opened a new issue, #9269:
URL: https://github.com/apache/incubator-doris/issues/9269

   ### 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
   
   master b40668448
   
   ### What's Wrong?
   
   Query get wrong result when ColumnDict concurrent predicate eval.
   
   Reproduced on our production data:
   ```sql
   be.conf
   enable_storage_vectorization = true;
   enable_low_cardinality_optimize = true;
   mysql> set enable_vectorized_engine = true;
   
   mysql> SELECT count(distinct v1)
       ->   from tbl1
       ->  where dt='2022-04-13'
       ->    and k1 in ('xxx1','xxx2','xxx3','xxx4','xxx5');
   +-----------------------------+
   | count(DISTINCT `v1`) |
   +-----------------------------+
   |                    70645634 |
   +-----------------------------+
   
   
   mysql> set enable_vectorized_engine = false;
   mysql> SELECT count(distinct v1)   from tbl1  where dt='2022-04-13' and k1 in ('xxx1','xxx2','xxx3','xxx4','xxx5');
   +-----------------------------+
   | count(DISTINCT `v1`) |
   +-----------------------------+
   |                    69672646 |
   +-----------------------------+
   
   
   be.conf
   enable_low_cardinality_optimize = false
   mysql> set enable_vectorized_engine = true;
   
   mysql> SELECT count(distinct v1)   from tbl1  where dt='2022-04-13' and k1 in ('xxx1','xxx2','xxx3','xxx4','xxx5');
   +-----------------------------+
   | count(DISTINCT `v1`) |
   +-----------------------------+
   |                    69672646 |
   +-----------------------------+
   ```
   
   profile:
   ```
   VOLAP_SCAN_NODE  (id=0):(Active:  801.963ms,  %  non-child:  0.78%)
         -  NumScanners:  20
   ```
   
   
   ### What You Expected?
   
   return correct result.
   
   ### How to Reproduce?
   
   _No response_
   
   ### Anything Else?
   
   reason:
   `SegmentIterator` has member variables: `std::vector<ColumnPredicate*> col_predicates;` where `ColumnPredicate` is shared by multiple Scanners.
   The internal member variables of the current Predicate will be modified in the `SegmentIterator::_evaluate_short_circuit_predicate` method, resulting in incorrect results.
   
   ### 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-unsubscribe@doris.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] yiguolei closed issue #9269: [Bug] Query get wrong result when ColumnDict concurrent predicate eval

Posted by GitBox <gi...@apache.org>.
yiguolei closed issue #9269: [Bug] Query get wrong result when ColumnDict concurrent predicate eval
URL: https://github.com/apache/incubator-doris/issues/9269


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org