Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

sql/parse: support more than 2 tables on cross join #49

Merged
merged 1 commit into from
Feb 26, 2018

Conversation

erizocosmico
Copy link
Contributor

Fix #38

Also, this is not inner join as said in the issue, is cross join, because INNER JOIN is not implemented right now.

@@ -193,12 +193,12 @@ func tableExprsToTable(te sqlparser.TableExprs) (sql.Node, error) {
return nodes[0], nil
}

if len(nodes) == 2 {
return plan.NewCrossJoin(nodes[0], nodes[1]), nil
join := plan.NewCrossJoin(nodes[0], nodes[1])
Copy link
Contributor

@ajnavarro ajnavarro Feb 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we check the len of nodes before?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
@erizocosmico erizocosmico force-pushed the feature/join-more-tables branch from 0192c81 to 36ef1b3 Compare February 26, 2018 14:04
@erizocosmico erizocosmico merged commit f752e2f into src-d:master Feb 26, 2018
@erizocosmico erizocosmico deleted the feature/join-more-tables branch February 26, 2018 14:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants