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/06/29 08:04:10 UTC
[GitHub] [doris] stalary opened a new issue, #10489: [Bug] Unsupported correlated subquery: SELECT
stalary opened a new issue, #10489:
URL: https://github.com/apache/doris/issues/10489
### 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
### What's Wrong?
Error: (1105, "errCode = 2, detailMessage = Unsupported correlated subquery: SELECT `wind_code` AS `wind_code` FROM `default_cluster:dim`.`dim_enterprise_tags` WHERE `first_tag` = 'xx' AND `second_tag` = 'xxx'")
but in 0.15.5 not error.
### What You Expected?
success query.
### How to Reproduce?
select '药物发现' as 赛道, 年份, percentile(人均收入, 0.5) as 中位数
from (
SELECT a.wind_code as 万得代码,
a.enterprise_alias as 公司简称,
year(b.data_time) as 年份,
b.data_time as 所属日期,
b.employee as 员工数,
b.oper_rev as 运营收入,
b.net_profit_is as 净利润,
b.oper_rev / b.employee as 人均收入,
b.net_profit_is / b.employee as 人均利润
FROM dim.dim_enterprise_info as a
right join ods.ods_enterprise_info_q as b
on a.wind_code = b.wind_code
where (month(b.data_time) = 12 and year(b.data_time) <= 2021 and year(b.data_time) >= 2020)
and a.wind_code in
(select wind_code from dim.dim_enterprise_tags where first_tag = 'xx' and second_tag = 'xxx')
)
as com
group by 年份
union
select '临床CRO' as 赛道, 年份, percentile(人均收入, 0.5) as 中位数
from (
SELECT a.wind_code as 万得代码,
a.enterprise_alias as 公司简称,
year(b.data_time) as 年份,
b.data_time as 所属日期,
b.employee as 员工数,
b.oper_rev as 运营收入,
b.net_profit_is as 净利润,
b.oper_rev / b.employee as 人均收入,
b.net_profit_is / b.employee as 人均利润
FROM dim.dim_enterprise_info as a
right join ods.ods_enterprise_info_q as b
on a.wind_code = b.wind_code
where (month(b.data_time) = 12 and year(b.data_time) <= 2021 and year(b.data_time) >= 2020)
and a.wind_code in
(select wind_code from dim.dim_enterprise_tags where first_tag = 'xx' and second_tag = 'xxx')
)
as com
group by 年份
union
select '临床前CRO' as 赛道, 年份, percentile(人均收入, 0.5) as 中位数
from (
SELECT a.wind_code as 万得代码,
a.enterprise_alias as 公司简称,
year(b.data_time) as 年份,
b.data_time as 所属日期,
b.employee as 员工数,
b.oper_rev as 运营收入,
b.net_profit_is as 净利润,
b.oper_rev / b.employee as 人均收入,
b.net_profit_is / b.employee as 人均利润
FROM dim.dim_enterprise_info as a
right join ods.ods_enterprise_info_q as b
on a.wind_code = b.wind_code
where (month(b.data_time) = 12 and year(b.data_time) <= 2021 and year(b.data_time) >= 2020)
and a.wind_code in
(select wind_code from dim.dim_enterprise_tags where first_tag = 'xxx' and second_tag = 'xxx')
)
as com
group by 年份
### 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
[GitHub] [doris] stalary commented on issue #10489: [Bug] Unsupported correlated subquery: SELECT
Posted by GitBox <gi...@apache.org>.
stalary commented on issue #10489:
URL: https://github.com/apache/doris/issues/10489#issuecomment-1171843098
> bug was introduced by [#7357](https://github.com/apache/doris/pull/7357). disable predicate infer by `set enable_infer_predicate = false;` should work.
ok, thanks.
--
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] morrySnow commented on issue #10489: [Bug] Unsupported correlated subquery: SELECT
Posted by GitBox <gi...@apache.org>.
morrySnow commented on issue #10489:
URL: https://github.com/apache/doris/issues/10489#issuecomment-1170858543
This issue is caused by using incorrect scope when resolve names under union. u can get around this problem by naming each table by a union alias temporarily. I will fix it later.
--
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] morningman closed issue #10489: [Bug] Unsupported correlated subquery: SELECT
Posted by GitBox <gi...@apache.org>.
morningman closed issue #10489: [Bug] Unsupported correlated subquery: SELECT
URL: https://github.com/apache/doris/issues/10489
--
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] morrySnow commented on issue #10489: [Bug] Unsupported correlated subquery: SELECT
Posted by GitBox <gi...@apache.org>.
morrySnow commented on issue #10489:
URL: https://github.com/apache/doris/issues/10489#issuecomment-1170894776
bug was introduced by [#7357](https://github.com/apache/doris/pull/7357). disable predicate infer by `set enable_infer_predicate = false;` should work.
--
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