Github user marmbrus commented on a diff in the pull request:
https://github.com/apache/spark/pull/2215#discussion_r17030027
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/commands.scala ---
@@ -73,27 +77,23 @@ case class SetCommand(
"hive-0.12.0.jar").mkString(":")
Array(
- "system:java.class.path=" + hiveJars,
- "system:sun.java.command=shark.SharkServer2")
- }
- else {
- Array(s"$k=${context.getConf(k, "<undefined>")}")
+ Row("system:java.class.path=" + hiveJars),
+ Row("system:sun.java.command=shark.SharkServer2"))
+ } else {
+ Array(Row(s"$k=${context.getConf(k, "<undefined>")}"))
}
// Query all key-value pairs that are set in the SQLConf of the
context.
case (None, None) =>
context.getAllConfs.map { case (k, v) =>
- s"$k=$v"
+ Row(s"$k=$v")
}.toSeq
case _ =>
throw new IllegalArgumentException()
}
- def execute(): RDD[Row] = {
- val rows = sideEffectResult.map { line => new
GenericRow(Array[Any](line)) }
- context.sparkContext.parallelize(rows, 1)
- }
+ def execute(): RDD[Row] =
context.sparkContext.parallelize(sideEffectResult, 1)
--- End diff --
Can this also be in `Command`? The implementation looks the same
everywhere.
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]