imback82 commented on a change in pull request #30881: URL: https://github.com/apache/spark/pull/30881#discussion_r549937965
########## File path: sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala ########## @@ -764,13 +765,13 @@ case class DescribeColumnCommand( val colName = UnresolvedAttribute(colNameParts).name val field = { relation.resolve(colNameParts, resolver).getOrElse { - throw new AnalysisException(s"Column $colName does not exist") + throw QueryCompilationErrors.columnDoesNotExistError(colName) } } if (!field.isInstanceOf[Attribute]) { // If the field is not an attribute after `resolve`, then it's a nested field. - throw new AnalysisException( - s"DESC TABLE COLUMN command does not support nested data types: $colName") + throw QueryCompilationErrors.commandNotSupportNestedColumnError( + "DESC TABLE COLUMN", toPrettySQL(field, removeAlias = true)) Review comment: I think this can still be hit for views. ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org