Serge Rielau created SPARK-43918:
------------------------------------
Summary: Cannot CREATE VIEW despite columns explicitly aliased
Key: SPARK-43918
URL: https://issues.apache.org/jira/browse/SPARK-43918
Project: Spark
Issue Type: Bug
Components: Spark Core
Affects Versions: 3.4.0
Reporter: Serge Rielau
spark.sql("CREATE VIEW v(c) AS SELECT b AS c FROM (SELECT (SELECT 1)) AS
T(b)").show()
org.apache.spark.sql.AnalysisException: Not allowed to create a permanent view
`spark_catalog`.`default`.`v` without explicitly assigning an alias for
expression c.
The problem seems to be the scalar subquery (SELECT 1) not being aliased.
But that shouldn't matter. "AS X should be the backstop. In fact, AS T(b)
should have been sufficient.
Not to speak of the fact that the column is named c in the view header.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]