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/07/15 07:41:22 UTC

[GitHub] [doris] kkfnui opened a new issue, #10881: [Bug] With `in` in select smt and group by will cause `missing from GROUP BY `

kkfnui opened a new issue, #10881:
URL: https://github.com/apache/doris/issues/10881

   ### 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
   
   1.1.0
   
   ### What's Wrong?
   
    select list expression not produced by aggregation output (missing from GROUP BY clause?): sum(if(`stat_type` IN (1), 1, 0))
   
   ### What You Expected?
   
   No error
   
   ### How to Reproduce?
   
   **create a test table**
   
   ```
   CREATE TABLE `test_doris_11_log` (
       `date` date NOT NULL COMMENT "",
       `uid` varchar(64) NOT NULL,
       `stat_type` int(11) NOT NULL COMMENT "",
   
       `price` varchar(255) NULL COMMENT "price"
   )
   DUPLICATE KEY(`date`, `uid`, `stat_type`)
   COMMENT "OLAP"
   PARTITION BY RANGE(`date`)()
   DISTRIBUTED BY HASH(`uid`) BUCKETS 8
   PROPERTIES (
   "replication_allocation" = "tag.location.default: 3",
   "dynamic_partition.enable" = "true",
   "dynamic_partition.time_unit" = "DAY",
   "dynamic_partition.end" = "2",
   "dynamic_partition.prefix" = "p",
   "dynamic_partition.replication_allocation" = "tag.location.default: 3",
   "dynamic_partition.buckets" = "8",
   "dynamic_partition.create_history_partition" = "true",
   "dynamic_partition.history_partition_num" = "2",
   "dynamic_partition.hot_partition_num" = "2",
   "storage_format" = "V2"
   );
   ```
   
   **insert test data**
   
   
   ```
   insert into test_doris_11_log values ('2022-07-15', '2222', 1, NULL), ('2022-07-15', 'ddddd', 2, '0.5');
   ```
   
   **Try some times to reproduce error**
   
   ```
   select date, sum(if(stat_type in (1), 1, 0)) from  test_doris_11_log group by date ;
   ```
   
   
   ### 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: 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] [doris] Kikyou1997 commented on issue #10881: [Bug] With `in` in select smt and group by will cause `missing from GROUP BY `

Posted by GitBox <gi...@apache.org>.
Kikyou1997 commented on issue #10881:
URL: https://github.com/apache/doris/issues/10881#issuecomment-1186191238

   I can't reproduce this bug on my local machine....


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


[GitHub] [doris] yiguolei closed issue #10881: [Bug] With `in` in select smt and group by will cause `missing from GROUP BY `

Posted by GitBox <gi...@apache.org>.
yiguolei closed issue #10881: [Bug] With  `in` in select smt and  group by will cause `missing from GROUP BY `
URL: https://github.com/apache/doris/issues/10881


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