srielau commented on code in PR #53407:
URL: https://github.com/apache/spark/pull/53407#discussion_r2614415435


##########
sql/core/src/test/resources/sql-tests/analyzer-results/identifier-clause-legacy.sql.out:
##########
@@ -2436,6 +2436,306 @@ DropTable false, false
 +- ResolvedIdentifier V2SessionCatalog(spark_catalog), 
identifier_clause_test_schema.unpivot_test
 
 
+-- !query
+CREATE TABLE unpivot_alias_test(id INT, a INT, b INT) USING CSV
+-- !query analysis
+CreateDataSourceTableCommand 
`spark_catalog`.`identifier_clause_test_schema`.`unpivot_alias_test`, false
+
+
+-- !query
+INSERT INTO unpivot_alias_test VALUES (1, 10, 20)
+-- !query analysis
+InsertIntoHadoopFsRelationCommand file:[not included in 
comparison]/{warehouse_dir}/identifier_clause_test_schema.db/unpivot_alias_test,
 false, CSV, [path=file:[not included in 
comparison]/{warehouse_dir}/identifier_clause_test_schema.db/unpivot_alias_test],
 Append, `spark_catalog`.`identifier_clause_test_schema`.`unpivot_alias_test`, 
org.apache.spark.sql.execution.datasources.InMemoryFileIndex(file:[not included 
in 
comparison]/{warehouse_dir}/identifier_clause_test_schema.db/unpivot_alias_test),
 [id, a, b]
++- Project [col1#x AS id#x, col2#x AS a#x, col3#x AS b#x]
+   +- LocalRelation [col1#x, col2#x, col3#x]
+
+
+-- !query
+SELECT * FROM unpivot_alias_test UNPIVOT (val FOR col IN (a, b)) AS 
IDENTIFIER('unpivoted_result') ORDER BY ALL

Review Comment:
   This should work. It's an alias.



-- 
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]

Reply via email to