Yikf commented on code in PR #38795:
URL: https://github.com/apache/spark/pull/38795#discussion_r1039170262
##########
sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLDriver.scala:
##########
@@ -50,8 +52,21 @@ private[hive] class SparkSQLDriver(val context: SQLContext =
SparkSQLEnv.sqlCont
if (analyzed.output.isEmpty) {
new Schema(Arrays.asList(new FieldSchema("Response code", "string",
"")), null)
} else {
- val fieldSchemas = analyzed.output.map { attr =>
- new FieldSchema(attr.name, attr.dataType.catalogString, "")
+ val fieldSchemas = stripRootCommandResult(query.executedPlan) match {
+ case ExecutedCommandExec(s: ShowTablesCommand) if !s.isExtended =>
Review Comment:
Yea, This(schema output) is going to be the same thing as [values
output](https://github.com/apache/spark/blob/a383dde45d6b9983575438da016d122ab2f9873f/sql/core/src/main/scala/org/apache/spark/sql/execution/HiveResult.scala#L64-L73)
--
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]