-
Notifications
You must be signed in to change notification settings - Fork 28.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Two minor SQL cleanup (compiler warning & indent). #7000
Conversation
@@ -677,8 +677,8 @@ trait HiveTypeCoercion { | |||
findTightestCommonTypeAndPromoteToString((c.key +: c.whenList).map(_.dataType)) | |||
maybeCommonType.map { commonType => | |||
val castedBranches = c.branches.grouped(2).map { | |||
case Seq(when, then) if when.dataType != commonType => | |||
Seq(Cast(when, commonType), then) | |||
case Seq(whenExpr, thenExpr) if whenExpr.dataType != commonType => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"then" is going to be a reserved keyword in Scala.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we easily add a SclalaStyle check for this in order to ban this as a variable name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes - but it doesn't happen that often and is caught by compiler warnings -- so not that big of a deal right now. If it is used a lot, we should consider having a rule.
Merged build triggered. |
Merged build started. |
Test build #35727 has started for PR 7000 at commit |
Test build #35727 has finished for PR 7000 at commit
|
Merged build finished. Test FAILed. |
Jenkins, retest this please. |
Merged build triggered. |
Merged build started. |
Test build #35735 has started for PR 7000 at commit |
Test build #35735 has finished for PR 7000 at commit
|
Merged build finished. Test PASSed. |
No description provided.