Skip to content

Commit 046044c

Browse files
committed
Two minor SQL cleanup (compiler warning & indent).
1 parent f04b567 commit 046044c

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
@@ -677,8 +677,8 @@ trait HiveTypeCoercion {
677677
findTightestCommonTypeAndPromoteToString((c.key +: c.whenList).map(_.dataType))
678678
maybeCommonType.map { commonType =>
679679
val castedBranches = c.branches.grouped(2).map {
680-
case Seq(when, then) if when.dataType != commonType =>
681-
Seq(Cast(when, commonType), then)
680+
case Seq(whenExpr, thenExpr) if whenExpr.dataType != commonType =>
681+
Seq(Cast(whenExpr, commonType), thenExpr)
682682
case other => other
683683
}.reduce(_ ++ _)
684684
CaseKeyWhen(Cast(c.key, commonType), castedBranches)

0 commit comments

Comments
 (0)