Skip to content

Conversation

@yaooqinn
Copy link
Member

What changes were proposed in this pull request?

MICROS_PER_MONTH = DAYS_PER_MONTH * MICROS_PER_DAY

Why are the changes needed?

fix bug

Does this PR introduce any user-facing change?

no

How was this patch tested?

add ut

@yaooqinn
Copy link
Member Author

cc @cloud-fan @dongjoon-hyun

@SparkQA
Copy link

SparkQA commented Oct 30, 2019

Test build #112912 has finished for PR 26321 at commit d20988a.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

struct<date_part('epoch', t2.`c`):decimal(18,6)>
-- !query 106 output
31873892788.332003
31897220765.004003
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have compared to PostgreSQL output:

maxim=# select date_part('epoch', interval '1010 year 9 month 8 day 7 hour 6 minute 5 second 4 millisecond 3 microseconds');
    date_part
-----------------
 31897220765.004
(1 row)

It seems PostgreSQL just looses the precision.

@SparkQA
Copy link

SparkQA commented Oct 30, 2019

Test build #112913 has finished for PR 26321 at commit 7cc8edc.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Oct 30, 2019

Test build #112915 has finished for PR 26321 at commit f1f090a.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM. Thank you all.
Merged to master.

@yaooqinn yaooqinn deleted the SPARK-29653 branch October 30, 2019 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants