You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/10/27 11:39:00 UTC

[jira] [Commented] (KYLIN-4762) Optimize join where there is the same shardby partition num on join key

    [ https://issues.apache.org/jira/browse/KYLIN-4762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17221340#comment-17221340 ] 

ASF GitHub Bot commented on KYLIN-4762:
---------------------------------------

zzcclp opened a new pull request #1463:
URL: https://github.com/apache/kylin/pull/1463


   ## Proposed changes
   
   Optimize join where there is the same shardby partition num on join key.
   
   Part I :
   Implement on kylin side
   
   ## Types of changes
   
   What types of changes does your code introduce to Kylin?
   _Put an `x` in the boxes that apply_
   
   - [ ] Bugfix (non-breaking change which fixes an issue)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
   - [ ] Documentation Update (if none of the other choices apply)
   
   ## Checklist
   
   _Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._
   
   - [ ] I have create an issue on [Kylin's jira](https://issues.apache.org/jira/browse/KYLIN), and have described the bug/feature there in detail
   - [ ] Commit messages in my PR start with the related jira ID, like "KYLIN-0000 Make Kylin project open-source"
   - [ ] Compiling and unit tests pass locally with my changes
   - [ ] I have added tests that prove my fix is effective or that my feature works
   - [ ] If this change need a document change, I will prepare another pr against the `document` branch
   - [ ] Any dependent changes have been merged
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at user@kylin or dev@kylin by explaining why you chose the solution you did and what alternatives you considered, etc...
   


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


> Optimize join where there is the same shardby partition num on join key
> -----------------------------------------------------------------------
>
>                 Key: KYLIN-4762
>                 URL: https://issues.apache.org/jira/browse/KYLIN-4762
>             Project: Kylin
>          Issue Type: Improvement
>          Components: Query Engine
>    Affects Versions: v4.0.0-beta
>            Reporter: Zhichao  Zhang
>            Assignee: Zhichao  Zhang
>            Priority: Minor
>         Attachments: shardby_join.png
>
>
> Optimize join by reducing shuffle when there is the same shard by partition number on join key.
> When execute this sql,
> {code:java}
> // code placeholder
> select m.seller_id, m.part_dt, sum(m.price) as s 
> from kylin_sales m 
> left join (
>   select m1.part_dt as pd, count(distinct m1.SELLER_ID) as m1, count(1) as m2  
>   from kylin_sales m1
>   where m1.part_dt = '2012-01-05'
>   group by m1.part_dt 
>   ) j 
>   on m.part_dt = j.pd
>   where m.lstg_format_name = 'FP-GTC' 
>   and m.part_dt = '2012-01-05'
>   group by m.seller_id, m.part_dt limit 100;
> {code}
> the execution plan is shown below:
> !shardby_join.png!
> But the join key part_dt has the same shard by partition number, it can be optimized to reduce shuffle, similar to bucket join.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)