You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "Lif0820 (via GitHub)" <gi...@apache.org> on 2024/03/18 03:18:10 UTC
[I] [Bug] partition prune error when partition condition value has some function [doris]
Lif0820 opened a new issue, #32363:
URL: https://github.com/apache/doris/issues/32363
### 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
2.0.3 2.0.5
### What's Wrong?
partition prune error when partition condition value with has function, such as:
where time_key = substr('20240301000000', 1, 8)
### What You Expected?
fix
### How to Reproduce?
CREATE TABLE `test_event_log` (
`device_id` bigint(20) NULL,
`v1` double NULL,
`v2` double NULL,
`time_key` int(11) NULL COMMENT 'yyyyMMdd',
) ENGINE=OLAP
DUPLICATE KEY(`device_id`)
COMMENT 'OLAP'
PARTITION BY RANGE(`time_key`)
(
PARTITION p202401 VALUES [("20240101"), ("20240201")),
PARTITION p202402 VALUES [("20240201"), ("20240301")),
PARTITION p202403 VALUES [("20240301"), ("20240401")),
PARTITION p202404 VALUES [("20240401"), ("20240501")))
DISTRIBUTED BY HASH(`device_id`) BUCKETS 16
PROPERTIES (
"replication_allocation" = "tag.location.default: 3",
"enable_single_replica_compaction" = "false"
);
insert into test_event_log VALUES (1, 1, 1, 20240101);
insert into test_event_log VALUES (2, 2, 2, 20240201);
insert into test_event_log VALUES (3, 3, 2, 20240301);
explain
select count(*) from test_event_log
where time_key = substr('20240301000000', 1, 8) -- can not partition prune
-- where time_key = cast('20240301' as bigint) -- can not partition prune
-- where time_key = '20240301'; -- ok
### 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
Re: [I] [Bug] partition prune error when partition condition value has some function [doris]
Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman closed issue #32363: [Bug] partition prune error when partition condition value has some function
URL: https://github.com/apache/doris/issues/32363
--
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] [Bug] partition prune error when partition condition value has some function [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #32363:
URL: https://github.com/apache/doris/issues/32363#issuecomment-3288991858
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
Re: [I] [Bug] partition prune error when partition condition value has some function [doris]
Posted by "Lif0820 (via GitHub)" <gi...@apache.org>.
Lif0820 commented on issue #32363:
URL: https://github.com/apache/doris/issues/32363#issuecomment-2002992510
this issue happens when partition column is not a data/datatime type, such as bigint
--
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