Uh oh!
There was an error while loading. Please reload this page.
[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.
cloud-fan
commented
Jun 15, 2015
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.
SparkQA
commented
Jun 15, 2015
Test build #34923 has finished for PR 6825 at commit
|
SparkQA
commented
Jun 15, 2015
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.
cloud-fan
commented
Jun 15, 2015
retest it please. |
davies
commented
Jun 16, 2015
@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. |
SparkQA
commented
Jun 16, 2015
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?
SparkQA
commented
Jun 17, 2015
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.
SparkQA
commented
Jun 17, 2015
Test build #35045 has finished for PR 6825 at commit
|
davies
commented
Jun 23, 2015
@cloud-fan Now #6876 is merged, could you update this PR? |
SparkQA
commented
Jun 24, 2015
Test build #35636 has finished for PR 6825 at commit
|
davies
commented
Jun 24, 2015
LGTM, the failed PySpark test is not related, merging this into master, thanks! |
SparkQA
commented
Jun 24, 2015
Test build #955 has finished for PR 6825 at commit
|
a follow up of #6813