DataFrame's resolve:
protected[sql] def resolve(colName: String): NamedExpression = { queryExecution.analyzed.resolve(colName.split("\\."), sqlContext.analyzer.resolver).getOrElse { throw new AnalysisException( s"""Cannot resolve column name "$colName" among (${schema.fieldNames.mkString(", ")})""") } }
We should not split the parts quoted by backticks (`).
For example, `ab.cd`.`efg` should be split into two parts "ab.cd" and "efg".