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

Ashutosh Chauhan commented on HIVE-8651:
----------------------------------------

[~jcamachorodriguez] I am not sure if plan indeed is correct. Per test case, 
bucket column should be value and sort column should indeed be key, otherwise 
it may end up inserting wrong data in target table. It seems we need to 
instruct Calcite to pay attention to these traits while reordering joins.

> CBO: sort column changed in infer_bucket_sort test
> --------------------------------------------------
>
>                 Key: HIVE-8651
>                 URL: https://issues.apache.org/jira/browse/HIVE-8651
>             Project: Hive
>          Issue Type: Sub-task
>          Components: CBO
>            Reporter: Sergey Shelukhin
>             Fix For: 0.15.0
>
>
> {noformat}
> -Bucket Columns:        [value]                  
> -Sort Columns:          [Order(col:value, order:1)]      
> +Bucket Columns:        [key]                    
> +Sort Columns:          [Order(col:key, order:1)]        
> {noformat}
> That is in the case for "Test join on three tables on different keys, should 
> be bucketed and sorted by latter key"; the sort changed to the first key 
> instead



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

Reply via email to