[SPARK-8371][SQL] improve unit test for MaxOf and MinOf and fix bugs#6825
[SPARK-8371][SQL] improve unit test for MaxOf and MinOf and fix bugs#6825cloud-fan wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
This test will fail at checkEvaluationWithGeneratedProjection for hash code not equal. I'm not sure why we want to compare the hash code, and I looked into the hashCode implementation of GenericRow and Row, they are different. I'm trying to figure it out.
There was a problem hiding this comment.
The origin code is not right as super here refers to BinaryArithmetic, not Expression that we wanted.
There was a problem hiding this comment.
yes,i think you are right. because their symbol is empty.
|
Test build #34923 has finished for PR 6825 at commit
|
|
Test build #34933 has finished for PR 6825 at commit
|
There was a problem hiding this comment.
i think at first it needs to check whether eval1 or eval2 isNull. and then calculate primitive.
There was a problem hiding this comment.
the code result is inserted after null check.
|
retest it please. |
|
@cloud-fan There are some changes related to Max/Min in #6726 , is it useful for you? It will be good if you could merge them here. |
|
Test build #34987 has finished for PR 6825 at commit
|
There was a problem hiding this comment.
All expressions only work with InternalRow, which only contain internal types (int, long, UTF8String), no Date or Timestamp. so we don't need to test Date/Timestamp, or use DateUtils.fromDate() to do the conversion before calling expression on them.
There was a problem hiding this comment.
This test will fail at checkEvaluationWithGeneratedProjection for hash code not equal. I'm not sure why we want to compare the hash code, and I looked into the hashCode implementation of GenericRow and Row, they are different. Does anyone know why we want to compare the hash code there?
|
Test build #35044 has finished for PR 6825 at commit
|
There was a problem hiding this comment.
@davies , we need the conversion here, as we use String instead of UTF8String at many tests...
There was a problem hiding this comment.
Sound reasonable, it's anonying to have so many UTF8String.fromString in test cases.
|
Test build #35045 has finished for PR 6825 at commit
|
|
@cloud-fan Now #6876 is merged, could you update this PR? |
|
Test build #35636 has finished for PR 6825 at commit
|
|
LGTM, the failed PySpark test is not related, merging this into master, thanks! |
|
Test build #955 has finished for PR 6825 at commit
|
a follow up of #6813