File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical
main/scala/org/apache/spark/sql
test/scala/org/apache/spark/sql/execution Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -257,7 +257,7 @@ abstract class LogicalPlan extends QueryPlan[LogicalPlan] with Logging {
257257
258258 // More than one match.
259259 case ambiguousReferences =>
260- val qualifiers = ambiguousReferences.flatMap(_._1.qualifiers )
260+ val qualifiers = ambiguousReferences.flatMap(_._1.qualifier )
261261 if (qualifiers.nonEmpty && qualifiers.distinct.length == qualifiers.length) {
262262 throw new AnalysisException (s " Reference ' $name' is ambiguous, please add a qualifier " +
263263 s " to distinguish it, e.g. ' ${qualifiers.head}. $name', available qualifiers: " +
Original file line number Diff line number Diff line change @@ -314,7 +314,7 @@ class Dataset[T] private[sql](
314314 s " New column names ( ${colNames.size}): " + colNames.mkString(" , " ))
315315
316316 val newCols = logicalPlan.output.zip(colNames).map { case (oldAttribute, newName) =>
317- Column (Alias (oldAttribute, newName)(qualifiers = oldAttribute.qualifiers ))
317+ Column (Alias (oldAttribute, newName)(qualifier = oldAttribute.qualifier ))
318318 }
319319 select(newCols : _* )
320320 }
@@ -769,7 +769,7 @@ class Dataset[T] private[sql](
769769 Column (ResolvedStar (queryExecution.analyzed.output))
770770 case _ =>
771771 val col = resolve(colName) match {
772- case attr : Attribute => UnresolvedAttribute (attr.qualifiers :+ attr.name)
772+ case attr : Attribute => UnresolvedAttribute (attr.qualifier.toSeq :+ attr.name)
773773 case Alias (child, _) => UnresolvedAttribute .quotedString(child.sql)
774774 }
775775 Column (col)
@@ -1585,7 +1585,7 @@ class Dataset[T] private[sql](
15851585 if (shouldRename) {
15861586 val columns = output.map { col =>
15871587 if (resolver(col.name, existingName)) {
1588- Column (Alias (col, newName)(qualifiers = col.qualifiers ))
1588+ Column (Alias (col, newName)(qualifier = col.qualifier ))
15891589 } else {
15901590 Column (col)
15911591 }
Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ class PlannerSuite extends SharedSQLContext {
169169 val planned = query.queryExecution.executedPlan
170170 assert(planned.isInstanceOf [execution.TakeOrderedAndProject ])
171171 assert(planned.output ===
172- testData.select(' key , ' value ).logicalPlan.output.map(_.withQualifiers( Nil )))
172+ testData.select(' key , ' value ).logicalPlan.output.map(_.withQualifier( None )))
173173 }
174174
175175 test(" terminal limit -> project -> sort should use TakeOrderedAndProject" ) {
You can’t perform that action at this time.
0 commit comments