cloud-fan commented on code in PR #38795:
URL: https://github.com/apache/spark/pull/38795#discussion_r1039187199
##########
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:
instead of handling values and schema separately, shall we implement this
handling as a catalyst rule so that we only need to do it once?
--
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]