cloud-fan commented on code in PR #40437:
URL: https://github.com/apache/spark/pull/40437#discussion_r1139919994
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/HiveResult.scala:
##########
@@ -50,36 +51,44 @@ object HiveResult {
}
/**
- * Returns the result as a hive compatible sequence of strings. This is used
in tests and
- * `SparkSQLDriver` for CLI applications.
+ * Returns the hive compatible results, which include output schemas and
sequence of strings.
+ * This is used in tests and `SparkSQLDriver` for CLI applications.
*/
- def hiveResultString(executedPlan: SparkPlan): Seq[String] =
Review Comment:
Instead of collecting the data as rows and adjusting it to follow Hive, we
can add an analyzer rule to adjust the plan. The rule can add a `Project` over
certain commands, to select columns, or run a UDF to adjust the string. This
rule is only applied in thriftserver environment.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]