[ https://issues.apache.org/jira/browse/PHOENIX-2274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14877143#comment-14877143 ]
James Taylor commented on PHOENIX-2274: --------------------------------------- +1. Thanks south for the patch, [~maryannxue]. Please commit to master and 4.x branches. > Sort-merge join could not optimize out the sort on the right table > ------------------------------------------------------------------ > > Key: PHOENIX-2274 > URL: https://issues.apache.org/jira/browse/PHOENIX-2274 > Project: Phoenix > Issue Type: Bug > Affects Versions: 4.5.2 > Reporter: Maryann Xue > Assignee: Maryann Xue > Priority: Minor > Attachments: PHOENIX-2274.patch > > > {code} > CREATE TABLE t ( > mypk VARCHAR(100) NOT NULL PRIMARY KEY, > mycol VARCHAR(200)); > SELECT * FROM t t1 JOIN t t2 ON t1.mypk = t2.mypk; > {code} > would produce a plan like: > {code} > SORT-MERGE-JOIN (INNER) TABLES > CLIENT PARALLEL 1-WAY FULL SCAN OVER T > AND > CLIENT PARALLEL 1-WAY FULL SCAN OVER T > SERVER SORTED BY [MYPK] > CLIENT MERGE SORT > {code} > , while it should have generated a plan like: > {code} > SORT-MERGE-JOIN (INNER) TABLES > CLIENT PARALLEL 1-WAY FULL SCAN OVER T > AND > CLIENT PARALLEL 1-WAY FULL SCAN OVER T > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)