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/12/31 07:51:01 UTC

[GitHub] [incubator-doris] hwwxg opened a new issue #5184: 同一个表应该天然支持cocolate join

hwwxg opened a new issue #5184:
URL: https://github.com/apache/incubator-doris/issues/5184


   **Is your feature request related to a problem? Please describe.**
   同一个表包含聚合函数的查询时,也必须要join,但是却不是cocolate join,总是报"colocate: false, reason: Node type not match",为什么会这样,能优化吗?
   select count() from (select user_id from t_event where  event_name = 'AppOpen' group by user_id having count() > 5) t1 where user_id in (select user_id from t_event where  event_name = 'Buy' group by user_id having count() > 3)
   
   


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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] hwwxg edited a comment on issue #5184: 同一个表应该天然支持cocolate join

Posted by GitBox <gi...@apache.org>.
hwwxg edited a comment on issue #5184:
URL: https://github.com/apache/incubator-doris/issues/5184#issuecomment-752882882


   我发现和是不是同一个表没关系,而是只要条件中带了函数,就会报"colocate: false, reason: Node type not match",比如
   select count() from (select user_id from t_event where event_name = 'AppOpen' group by user_id having count() > 3) t1 where user_id in (select user_id from t_tag where tag_1 ='male') 
   select count() from (select user_id from t_event where event_name = 'AppOpen' ) t1 where user_id in (select distinct(user_id) from t_tag where tag_1 ='male') 
   
   如果没带函数,就可以走cocolate join,如
   select count() from (select user_id from t_event where event_name = 'AppOpen' ) t1 where user_id in (select user_id from t_tag where tag_1 ='male') 


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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] HappenLee commented on issue #5184: 同一个表应该天然支持cocolate join

Posted by GitBox <gi...@apache.org>.
HappenLee commented on issue #5184:
URL: https://github.com/apache/incubator-doris/issues/5184#issuecomment-752886518


   Yes, It seems not the colocate join problem. It's the problem of `group by` should know the data distribution of colocate table and the normal table. In this case, no need two layer aggregation operation. 
   
   Doris should condiser to do optimization of this case.


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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman closed issue #5184: cocolate join在查询中带函数的情况下会失效

Posted by GitBox <gi...@apache.org>.
morningman closed issue #5184:
URL: https://github.com/apache/incubator-doris/issues/5184


   


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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] hwwxg commented on issue #5184: 同一个表应该天然支持cocolate join

Posted by GitBox <gi...@apache.org>.
hwwxg commented on issue #5184:
URL: https://github.com/apache/incubator-doris/issues/5184#issuecomment-752896543


   not only 'group by', but also 'distinct' and other functions


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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] HappenLee commented on issue #5184: 同一个表应该天然支持cocolate join

Posted by GitBox <gi...@apache.org>.
HappenLee commented on issue #5184:
URL: https://github.com/apache/incubator-doris/issues/5184#issuecomment-752880177


   This feature already support in Doris. If you query do not support colocate join, Please check the query and principle of colocate join.


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



---------------------------------------------------------------------
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 #5184: cocolate join在查询中带函数的情况下会失效

Posted by GitBox <gi...@apache.org>.
EmmyMiao87 commented on issue #5184:
URL: https://github.com/apache/incubator-doris/issues/5184#issuecomment-789486526


   This is indeed a point that can be optimized. 
   When the partitioning method of the upper plan node is the same as that of the lower layer, Doris can use colocate.
   I can be responsible for this function.


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



---------------------------------------------------------------------
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 #5184: cocolate join在查询中带函数的情况下会失效

Posted by GitBox <gi...@apache.org>.
EmmyMiao87 commented on issue #5184:
URL: https://github.com/apache/incubator-doris/issues/5184#issuecomment-799282890


   This pr resolved this problem #5521 @hwwxg 


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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] hwwxg commented on issue #5184: 同一个表应该天然支持cocolate join

Posted by GitBox <gi...@apache.org>.
hwwxg commented on issue #5184:
URL: https://github.com/apache/incubator-doris/issues/5184#issuecomment-752882882


   我发现和是不是同一个表没关系,而是只要条件中带了聚合函数,就会报"colocate: false, reason: Node type not match",比如
   select count() from (select user_id from t_event where event_name = 'AppOpen' group by user_id having count() > 3) t1 where user_id in (select user_id from t_tag where tag_1 ='male') 
   
   如果没带聚合函数,就可以走cocolate join,如
   select count() from (select user_id from t_event where event_name = 'AppOpen' ) t1 where user_id in (select user_id from t_tag where tag_1 ='male') 


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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org