我有一个简单的问题,关于Spark行为
//scala
> df.printSchema
root
|-- ID0: string (nullable = true)
|-- id1: string (nullable = true)
|-- Name: string (nullable = true)
|-- AGE: string (nullable = true)
> df.selectExpr("Name", "Name").select("Name") // 1. no error, work fine
> df.selectExpr("Name", "`Name` as Name").select("Name") // 2. error
org.apache.spark.sql.AnalysisException: Reference 'Name' is ambiguous, could be: Name, Name.
``` `spark.sql.caseSensitive: False` 运行select函数时,spark如何识别重复的列名?
暂无答案!
目前还没有任何答案,快来回答吧!