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


   ### 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
   
   0.15.1-rc09
   
   ### What's Wrong?
   
   A query sql like this: 
   
   ```sql
   select count(*) from table_name where id>1234
   ```
   If the `id` column with index, the query result  does not meet the 
expectation. 
   
   ### What You Expected?
   
   got the right count number.
   
   ### How to Reproduce?
   
   1. create a table, sql like this:
   ```sql
   CREATE TABLE `table1` (
     `_i_create_time` datetime NULL COMMENT "",
     `_i_random_val` smallint(6) NULL COMMENT "",
     `_src_id` varchar(64) NULL COMMENT "",
     `name` varchar(128) NULL COMMENT "",
     `country` varchar(128) NULL COMMENT "",
     `city` varchar(128) NULL COMMENT "",
     `_id` bigint(20) NULL COMMENT "联系人id",
     `_create_time` datetime NULL COMMENT "",
     `_update_time` datetime NULL COMMENT "",
     `_id_init` bigint(20) NULL COMMENT "",
     INDEX idx__i_create_time (`_i_create_time`) USING BITMAP COMMENT '',
     INDEX idx__i_random_val (`_i_random_val`) USING BITMAP COMMENT '',
     INDEX idx__src_id (`_src_id`) USING BITMAP COMMENT '',
     INDEX idx_name (`name`) USING BITMAP COMMENT '',
     INDEX idx_country (`country`) USING BITMAP COMMENT '',
     INDEX idx_city (`city`) USING BITMAP COMMENT '',
     INDEX idx__id (`_id`) USING BITMAP COMMENT '',
     INDEX idx__create_time (`_create_time`) USING BITMAP COMMENT '',
     INDEX idx__update_time (`_update_time`) USING BITMAP COMMENT '',
     INDEX idx__id_init (`_id_init`) USING BITMAP COMMENT ''
   ) ENGINE=OLAP
   DISTRIBUTED BY HASH(`_src_id`) BUCKETS 10
   ```
   
   2. import 100 million data to the table. 
   
   3. confirm the total without any conditions, 
   ```sql
   select count(_id) from table1
   ```
   it will return the right number, 100000000
   
   But, if the query based on `id` column , 
   ```sql
   select count(*) from table_name where id>1234
   ```
   the result  does not meet the expectation, and every time is different.
   
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] 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