linhongliu-db commented on a change in pull request #34254:
URL: https://github.com/apache/spark/pull/34254#discussion_r727179997
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala
##########
@@ -862,6 +862,13 @@ class SessionCatalog(
}
}
+ private def isHiveCreatedView(metadata: CatalogTable): Boolean = {
+ // For views created by hive without explicit column names, there will be
auto-generated
+ // column names like "_c0", "_c1", "_c2"...
+ metadata.viewQueryColumnNames.isEmpty &&
+ metadata.schema.fieldNames.exists(_.matches("_c[0-9]+"))
Review comment:
we may have `create view v as select 1, 2, t1.a from t1`, then the
schema will be "c0, c1, a"
--
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]