AngersZhuuuu commented on a change in pull request #25917: [SPARK-29225][SQL]
Change Spark SQL `DESC FORMATTED` format same with Hive
URL: https://github.com/apache/spark/pull/25917#discussion_r331767754
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala
##########
@@ -565,8 +569,17 @@ case class DescribeTableCommand(
result
}
+ private def schemaWithoutPartCols(schema: StructType, partColNames:
Seq[String]): StructType = {
+ if (partColNames.isEmpty) {
+ schema
+ } else {
+ StructType(schema.filter(col => !partColNames.contains(col.name)))
Review comment:
@dongjoon-hyun
Updated, current way is robust enough. Since here is just show table desc.
use resolver to check column name equal.
By the way : `PartitionUtils.normalizePartitionSpec`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]