You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "FrankZhang996 (via GitHub)" <gi...@apache.org> on 2024/01/18 09:42:55 UTC
[I] doris对select中的字段进行了常量折叠 对于grouping中和grouping sets中的字段没有进行常量折叠 [Bug] [doris]
FrankZhang996 opened a new issue, #30109:
URL: https://github.com/apache/doris/issues/30109
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues.
### Version
1.2.5-rc01
### What's Wrong?
doris对select中的字段进行了常量折叠 对于grouping中和grouping sets中的字段没有进行常量折叠 [Bug]
以下语法会报错:
SELECT
(
CASE
WHEN to_date ( DAY ) <= CURRENT_DATE ()- 1 AND to_date ( DAY ) >= CURRENT_DATE ()- 7 THEN
'本周'
WHEN to_date ( DAY ) <= CURRENT_DATE ()- 8 AND to_date ( DAY ) >= CURRENT_DATE ()- 14 THEN
'上周'
END
),
grouping (
CASE
WHEN to_date ( DAY ) <= CURRENT_DATE ()- 1 AND to_date ( DAY ) >= CURRENT_DATE ()- 7 THEN
'本周'
WHEN to_date ( DAY ) <= CURRENT_DATE ()- 8 AND to_date ( DAY ) >= CURRENT_DATE ()- 14 THEN
'上周'
END
),
count( `apv_apply_no` )
FROM
bolt_202401041830aa9462b1be4dd8a02fa65ab1bbcd78
GROUP BY
grouping sets ((
CASE
WHEN to_date ( DAY ) <= CURRENT_DATE ()- 1 AND to_date ( DAY ) >= CURRENT_DATE ()- 7 THEN
'本周'
WHEN to_date ( DAY ) <= CURRENT_DATE ()- 8 AND to_date ( DAY ) >= CURRENT_DATE ()- 14 THEN
'上周'
END
),())
报错信息
detailMessage = select list expression not produced by aggregation output (missing from GROUP BY clause?): (CASE WHEN to_date(`DAY`) <= '2024-01-17 00:00:00' AND to_date(`DAY`) >= '2024-01-11 00:00:00' THEN '本周' WHEN to_date(`DAY`) <= '2024-01-10 00:00:00' AND to_date(`DAY`) >= '2024-01-04 00:00:00' THEN '上周' END)
### What You Expected?
grouping中和grouping sets中的字段也进行常量折叠
### How to Reproduce?
_No response_
### 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: 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
Re: [I] doris对select中的字段进行了常量折叠 对于grouping中和grouping sets中的字段没有进行常量折叠 [Bug] [doris]
Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman closed issue #30109: doris对select中的字段进行了常量折叠 对于grouping中和grouping sets中的字段没有进行常量折叠 [Bug]
URL: https://github.com/apache/doris/issues/30109
--
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
Re: [I] doris对select中的字段进行了常量折叠 对于grouping中和grouping sets中的字段没有进行常量折叠 [Bug] [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #30109:
URL: https://github.com/apache/doris/issues/30109#issuecomment-3287227134
We're closing this issue because it hasn't been updated in a while.
If you'd like to revive this issue, please reopen it and feel free a maintainer to remove the Stale tag!
--
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