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 2020/04/16 07:07:40 UTC
[GitHub] [incubator-doris] kangpinghuang opened a new issue #3331: query
against view failed when the view contains union
kangpinghuang opened a new issue #3331: query against view failed when the view contains union
URL: https://github.com/apache/incubator-doris/issues/3331
there is a view like this:
CREATE VIEW `view_oppd_pmc_baiduapp_overview_all_plus` AS SELECT `t1`.`event_day` AS `event_day`, `product` AS `product`, 'kpi_roll_dau' AS `type`, CAST(sum(`kpi_dau`) AS DOUBLE) AS `value` FROM (SELECT DISTINCT `event_day` AS `event_day` FROM `default_cluster:muse_db`.`oppd_pmc_baiduapp_overview_all` WHERE `type` = 'kpi_dau') t1 INNER JOIN (SELECT `event_day` AS `event_day`, `product` AS `product`, `value` AS `kpi_dau` FROM `default_cluster:muse_db`.`oppd_pmc_baiduapp_overview_all` WHERE `type` = 'kpi_dau') t2 ON (((`t1`.`event_day` >= `t2`.`event_day`)) AND ((date_sub(`t1`.`event_day`, 29) <= `t2`.`event_day`))) GROUP BY `t1`.`event_day`, `product` UNION ALL SELECT `event_day` AS `event_day`, `product` AS `product`, 'kpi_duration' AS `type`, CAST(`duration` AS DOUBLE) AS `value` FROM `default_cluster:muse_db`.`baiduapp_overview_kpi_baiduboxapp_duration` UNION ALL SELECT `event_day` AS `event_day`, `product` AS `product`, 'kpi_dau_login' AS `type`, CAST(`kpi_dau_load` AS DOUBLE) AS `value` FROM `default_cluster:muse_db`.`baiduapp_overview_kpi_login_rate` UNION ALL SELECT `event_day` AS `event_day`, `product` AS `product`, 'kpi_feed_dau' AS `type`, CAST(`feed_dau` AS DOUBLE) AS `value` FROM `default_cluster:muse_db`.`baiduapp_overview_kpi_feed_dau`;
and query:
select type from view_oppd_pmc_baiduapp_overview_all_plus group by type;
failed.
the failed reason is:
failed to build storage scanner, no materialized slot
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [incubator-doris] EmmyMiao87 commented on issue #3331: query
against view failed when the view contains union
Posted by GitBox <gi...@apache.org>.
EmmyMiao87 commented on issue #3331: query against view failed when the view contains union
URL: https://github.com/apache/incubator-doris/issues/3331#issuecomment-614457934
If the view include both union and constant, the query will thrown exception when it includes view.
```
mysql> create view test as
-> SELECT event_day, 'kpi_duration' AS `type` FROM `default_cluster:muse_db`.`test`
-> UNION ALL
-> SELECT event_day, 'kpi_dau_login' AS `type` FROM `default_cluster:muse_db`.`test` ;
Query OK, 0 rows affected (0.02 sec)
mysql> select type from test;
ERROR 1064 (HY000): failed to build storage scanner, no materialized slot!
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org