gengliangwang commented on code in PR #51107:
URL: https://github.com/apache/spark/pull/51107#discussion_r2153143925
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/interface.scala:
##########
@@ -629,9 +629,15 @@ case class CatalogTable(
if (lastAccessTime <= 0) JString("UNKNOWN")
else JLong(lastAccessTime)
- val viewQueryOutputColumns: JValue =
- if (viewQueryColumnNames.nonEmpty)
JArray(viewQueryColumnNames.map(JString).toList)
- else JNull
+ val viewQueryOutputColumns: JValue = {
+ if (viewSchemaMode == SchemaEvolution) {
+ JArray(schema.map(_.name).map(JString).toList)
Review Comment:
I am a bit confused. As per the comment of `SchemaEvolution`
```
/**
* SchemaEvolution means the view will adopt changed column types and number
of columns.
* This is a result of not having a column list and WITH EVOLUTION.
* Without an explicit column list the will also adopt changes to column
names.
* In this mode the view will refresh its metastore data on reference to
keep it up to day.
*/
```
should the schema be the viewQueryColumnNames instead?
--
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]