-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-25398] Minor bugs from comparing unrelated types #22384
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
Conversation
… have been trying to do
| // other places, so drop them to reduce the memory usage. | ||
| !acc.internal && (!acc.metadata.isDefined || | ||
| acc.metadata.get != Some(AccumulatorContext.SQL_ACCUM_IDENTIFIER)) | ||
| !acc.internal && acc.metadata != Some(AccumulatorContext.SQL_ACCUM_IDENTIFIER) |
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.
CC @vanzin on this one for a double-check
| closure | ||
| .getClass | ||
| .getInterfaces.exists(_.getName.equals("scala.Serializable")) | ||
| .getInterfaces.exists(_.getName == "scala.Serializable") |
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.
See JIRA for explanation of this one
| .select('a) | ||
| .where('a > 1) | ||
| .where('a != 200) | ||
| .where('a =!= 200) |
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.
(!= isn't actually the Column operator for historical reasons having to do with precedence)
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.
Oh, thank you for fixing this.
| assert(unsafeDate.numElements == dateArray.length) | ||
| dateArray.zipWithIndex.map { case (e, i) => | ||
| assert(unsafeDate.get(i, DateType) == e) | ||
| assert(unsafeDate.get(i, DateType).asInstanceOf[Int] == e) |
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.
Issue here is that you can't really compare AnyRef to a primitive, not via boxing or unboxing; this may just be making some Scala coercion explicit but seemed worthwhile
|
Test build #95897 has finished for PR 22384 at commit
|
|
Thanks, @srowen . I also checked that this PR resolves all existing |
|
Test build #4334 has finished for PR 22384 at commit
|
|
Looks fine. |
|
Merged to master/2.4 |
## What changes were proposed in this pull request? Correct some comparisons between unrelated types to what they seem to… have been trying to do ## How was this patch tested? Existing tests. Closes #22384 from srowen/SPARK-25398. Authored-by: Sean Owen <[email protected]> Signed-off-by: Sean Owen <[email protected]> (cherry picked from commit cfbdd6a) Signed-off-by: Sean Owen <[email protected]>
## What changes were proposed in this pull request? Correct some comparisons between unrelated types to what they seem to… have been trying to do ## How was this patch tested? Existing tests. Closes apache#22384 from srowen/SPARK-25398. Authored-by: Sean Owen <[email protected]> Signed-off-by: Sean Owen <[email protected]>
What changes were proposed in this pull request?
Correct some comparisons between unrelated types to what they seem to… have been trying to do
How was this patch tested?
Existing tests.