[ https://issues.apache.org/jira/browse/HIVE-6643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13932668#comment-13932668 ]
Harish Butani commented on HIVE-6643: ------------------------------------- preliminary patch attached. There are some issues with this: - for MapJoins: the warning only shows the bigTable (even this is not available). Hopefully the Vertex/Stage and Operator information is enough for the user to see where the cross product is happening. - for Shuffle Joins: we need the HIVE-4293 changes to show the tables in a Reducer that has more than 1 input. - the .q.out files have the warnings, but these are appearing before the preehooks for the queries. Is this ok? > Add a check for cross products in plans and output a warning > ------------------------------------------------------------ > > Key: HIVE-6643 > URL: https://issues.apache.org/jira/browse/HIVE-6643 > Project: Hive > Issue Type: Bug > Reporter: Harish Butani > Assignee: Harish Butani > Attachments: HIVE-6643.1.patch > > > Now that we support old style join syntax, it is easy to write queries that > generate a plan with a cross product. > For e.g. say you have A join B join C join D on A.x = B.x and A.y = D.y and > C.z = D.z > So the JoinTree is: > A — B > |__ D — C > Since we don't reorder join graphs, we will end up with a cross product > between (A join B) and C -- This message was sent by Atlassian JIRA (v6.2#6252)