GitHub user marmbrus opened a pull request:
https://github.com/apache/spark/pull/1005
[SQL] Simple framework for debugging query execution
Only records number of tuples and unique dataTypes output right now...
Example:
```scala
scala> import org.apache.spark.sql.execution.debug._
scala> hql("SELECT value FROM src WHERE key > 10").debug(sparkContext)
Results returned: 489
== Project [value#1:0] ==
Tuples output: 489
value StringType: {java.lang.String}
== Filter (key#0:1 > 10) ==
Tuples output: 489
value StringType: {java.lang.String}
key IntegerType: {java.lang.Integer}
== HiveTableScan [value#1,key#0], (MetastoreRelation default, src, None),
None ==
Tuples output: 500
value StringType: {java.lang.String}
key IntegerType: {java.lang.Integer}
```
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/marmbrus/spark debug
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/1005.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1005
----
commit c9dded265881a8fabc46064255964c0e4af3f4d8
Author: Michael Armbrust <[email protected]>
Date: 2014-06-07T10:33:02Z
Simple framework for debugging query execution
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---