{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/5774","labels_url":"https://api.github.com/repos/apache/spark/issues/5774/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/5774/comments","events_url":"https://api.github.com/repos/apache/spark/issues/5774/events","html_url":"https://github.com/apache/spark/pull/5774","id":71815547,"number":5774,"title":"[SQL] [Minor] Print detail query execution info when spark answer is not right","user":{"login":"scwf","id":7018048,"avatar_url":"https://avatars.githubusercontent.com/u/7018048?v=3","gravatar_id":"","url":"https://api.github.com/users/scwf","html_url":"https://github.com/scwf","followers_url":"https://api.github.com/users/scwf/followers","following_url":"https://api.github.com/users/scwf/following{/other_user}","gists_url":"https://api.github.com/users/scwf/gists{/gist_id}","starred_url":"https://api.github.com/users/scwf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scwf/subscriptions","organizations_url":"https://api.github.com/users/scwf/orgs","repos_url":"https://api.github.com/users/scwf/repos","events_url":"https://api.github.com/users/scwf/events{/privacy}","received_events_url":"https://api.github.com/users/scwf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-04-29T08:37:15Z","updated_at":"2015-04-29T23:59:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/5774","html_url":"https://github.com/apache/spark/pull/5774","diff_url":"https://github.com/apache/spark/pull/5774.diff","patch_url":"https://github.com/apache/spark/pull/5774.patch"},"body":"Print detail query execution info including parsed/analyzed/optimized/Physical plan for query when spak answer is not rignt.\r\n\r\n```\r\nResults do not match for query:\r\n== Parsed Logical Plan ==\r\n'Aggregate ['x.str], ['x.str,SUM('x.strCount) AS c1#46]\r\n 'Join Inner, Some(('x.str = 'y.str))\r\n  'UnresolvedRelation [df], Some(x)\r\n  'UnresolvedRelation [df], Some(y)\r\n\r\n== Analyzed Logical Plan ==\r\nAggregate [str#44], [str#44,SUM(strCount#45L) AS c1#46L]\r\n Join Inner, Some((str#44 = str#51))\r\n  Subquery x\r\n   Subquery df\r\n    Aggregate [str#44], [str#44,COUNT(str#44) AS strCount#45L]\r\n     Project [_1#41 AS int#43,_2#42 AS str#44]\r\n      LocalRelation [_1#41,_2#42], [[1,1],[2,2],[3,3]]\r\n  Subquery y\r\n   Subquery df\r\n    Aggregate [str#51], [str#51,COUNT(str#51) AS strCount#47L]\r\n     Project [_1#41 AS int#50,_2#42 AS str#51]\r\n      LocalRelation [_1#41,_2#42], [[1,1],[2,2],[3,3]]\r\n\r\n== Optimized Logical Plan ==\r\nAggregate [str#44], [str#44,SUM(strCount#45L) AS c1#46L]\r\n Project [str#44,strCount#45L]\r\n  Join Inner, Some((str#44 = str#51))\r\n   Aggregate [str#44], [str#44,COUNT(str#44) AS strCount#45L]\r\n    LocalRelation [str#44], [[1],[2],[3]]\r\n   Aggregate [str#51], [str#51]\r\n    LocalRelation [str#51], [[1],[2],[3]]\r\n\r\n== Physical Plan ==\r\nAggregate false, [str#44], [str#44,CombineSum(PartialSum#53L) AS c1#46L]\r\n Aggregate true, [str#44], [str#44,SUM(strCount#45L) AS PartialSum#53L]\r\n  Project [str#44,strCount#45L]\r\n   BroadcastHashJoin [str#44], [str#51], BuildRight\r\n    Aggregate false, [str#44], [str#44,Coalesce(SUM(PartialCount#55L),0) AS strCount#45L]\r\n     Exchange (HashPartitioning [str#44], 5), []\r\n      Aggregate true, [str#44], [str#44,COUNT(str#44) AS PartialCount#55L]\r\n       LocalTableScan [str#44], [[1],[2],[3]]\r\n    Aggregate false, [str#51], [str#51]\r\n     Exchange (HashPartitioning [str#51], 5), []\r\n      Aggregate true, [str#51], [str#51]\r\n       LocalTableScan [str#51], [[1],[2],[3]]\r\n\r\nCode Generation: false\r\n== RDD ==\r\n== Results ==\r\n!== Correct Answer - 3 ==   == Spark Answer - 3 ==\r\n [1,1]                      [1,1]\r\n![2,3]                      [2,1]\r\n [3,1]                      [3,1]\r\n```"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/97617197","html_url":"https://github.com/apache/spark/pull/5774#issuecomment-97617197","issue_url":"https://api.github.com/repos/apache/spark/issues/5774","id":97617197,"user":{"login":"marmbrus","id":527,"avatar_url":"https://avatars.githubusercontent.com/u/527?v=3","gravatar_id":"","url":"https://api.github.com/users/marmbrus","html_url":"https://github.com/marmbrus","followers_url":"https://api.github.com/users/marmbrus/followers","following_url":"https://api.github.com/users/marmbrus/following{/other_user}","gists_url":"https://api.github.com/users/marmbrus/gists{/gist_id}","starred_url":"https://api.github.com/users/marmbrus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marmbrus/subscriptions","organizations_url":"https://api.github.com/users/marmbrus/orgs","repos_url":"https://api.github.com/users/marmbrus/repos","events_url":"https://api.github.com/users/marmbrus/events{/privacy}","received_events_url":"https://api.github.com/users/marmbrus/received_events","type":"User","site_admin":false},"created_at":"2015-04-29T23:59:25Z","updated_at":"2015-04-29T23:59:25Z","body":"LGTM"}}