Github user wangyum commented on a diff in the pull request:
https://github.com/apache/spark/pull/22124#discussion_r210831619
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
---
@@ -901,6 +901,12 @@ class Analyzer(
// If the projection list contains Stars, expand it.
case p: Project if containsStar(p.projectList) =>
p.copy(projectList = buildExpandedProjectList(p.projectList,
p.child))
+ case p @ Project(projectList, _ @ SubqueryAlias(_, view: View))
--- End diff --
Replace `[COL1#10L, COL2#11L]` to `col1#10L,col2#11L`. thus
`DDLPreprocessingUtils.castAndRenameQueryOutput` will take effect and rename
column name same to target table column name.
Then parquet column name same to table column name and we can read it.

---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]