Skip to content

Commit

Permalink
[SPARK-14350][SQL] EXPLAIN output should be in a single cell
Browse files Browse the repository at this point in the history
  • Loading branch information
dongjoon-hyun committed Apr 3, 2016
1 parent 2262a93 commit a1a9177
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ case class ExplainCommand(
} else {
queryExecution.simpleString
}
outputString.split("\n").map(Row(_))
Seq(Row(outputString))
} catch { case cause: TreeNodeException[_] =>
("Error occurred during query planning: \n" + cause.getMessage).split("\n").map(Row(_))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ class HiveQuerySuite extends HiveComparisonTest with BeforeAndAfter {

def isExplanation(result: DataFrame): Boolean = {
val explanation = result.select('plan).collect().map { case Row(plan: String) => plan }
explanation.contains("== Physical Plan ==")
explanation.head.startsWith("== Physical Plan ==")
}

test("SPARK-1704: Explain commands as a DataFrame") {
Expand Down

0 comments on commit a1a9177

Please sign in to comment.