Skip to content

Commit 82f80c1

Browse files
committed
Two minor SQL cleanup (compiler warning & indent).
Author: Reynold Xin <[email protected]> Closes apache#7000 from rxin/minor-cleanup and squashes the following commits: 046044c [Reynold Xin] Two minor SQL cleanup (compiler warning & indent).
1 parent b71d325 commit 82f80c1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,8 @@ class Analyzer(
309309
.nonEmpty =>
310310
(oldVersion, oldVersion.copy(windowExpressions = newAliases(windowExpressions)))
311311
}
312-
// Only handle first case, others will be fixed on the next pass.
313-
.headOption match {
312+
// Only handle first case, others will be fixed on the next pass.
313+
.headOption match {
314314
case None =>
315315
/*
316316
* No result implies that there is a logical plan node that produces new references

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/HiveTypeCoercion.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -678,8 +678,8 @@ trait HiveTypeCoercion {
678678
findTightestCommonTypeAndPromoteToString((c.key +: c.whenList).map(_.dataType))
679679
maybeCommonType.map { commonType =>
680680
val castedBranches = c.branches.grouped(2).map {
681-
case Seq(when, then) if when.dataType != commonType =>
682-
Seq(Cast(when, commonType), then)
681+
case Seq(whenExpr, thenExpr) if whenExpr.dataType != commonType =>
682+
Seq(Cast(whenExpr, commonType), thenExpr)
683683
case other => other
684684
}.reduce(_ ++ _)
685685
CaseKeyWhen(Cast(c.key, commonType), castedBranches)

0 commit comments

Comments
 (0)