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

Jesus Camacho Rodriguez commented on HIVE-11954:
------------------------------------------------

[~jpullokkaran], thanks for your comments. I have updated the patch.

I reply to your remarks below:
1. This is taken care of in lines 592-597.
{noformat}
         if (inputSize/buckets > maxSize) {
{noformat}
The original logic of the method remains unchanged, it will work properly.
2. I will do that then; I didn't use the abstract class because then we were 
getting some additional warnings.
3. Good catch, I didn't realize.

> Extend logic to choose side table in MapJoin Conversion algorithm
> -----------------------------------------------------------------
>
>                 Key: HIVE-11954
>                 URL: https://issues.apache.org/jira/browse/HIVE-11954
>             Project: Hive
>          Issue Type: Bug
>          Components: Physical Optimizer
>    Affects Versions: 2.0.0
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Jesus Camacho Rodriguez
>         Attachments: HIVE-11954.01.patch, HIVE-11954.02.patch, 
> HIVE-11954.03.patch, HIVE-11954.04.patch, HIVE-11954.05.patch, 
> HIVE-11954.06.patch, HIVE-11954.patch, HIVE-11954.patch
>
>
> Selection of side table (in memory/hash table) in MapJoin Conversion 
> algorithm needs to be more sophisticated.
> In an N way Map Join, Hive should pick an input stream as side table (in 
> memory table) that has least cost in producing relation (like TS(FIL|Proj)*).
> Cost based choice needs extended cost model; without return path its going to 
> be hard to do this.
> For the time being we could employ a modified cost based algorithm for side 
> table selection.
> New algorithm is described below:
> 1. Identify the candidate set of inputs for side table (in memory/hash table) 
> from the inputs (based on conditional task size)
> 2. For each of the input identify its cost, memory requirement. Cost is 1 for 
> each heavy weight relation op (Join, GB, PTF/Windowing, TF, etc.). Cost for 
> an input is the total no of heavy weight ops in its branch.
> 3. Order set from #1 on cost & memory req (ascending order)
> 4. Pick the first element from #3 as the side table.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to