Skip to content
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

[SPARK-29888][SQL] new interval string parser shall handle numeric with only fractional part #26514

Closed
wants to merge 4 commits into from

Conversation

yaooqinn
Copy link
Member

What changes were proposed in this pull request?

Current string to interval cast logic does not support i.e. cast('.111 second' as interval) which will fail in SIGN state and return null, actually, it is 00:00:00.111.

-- !query 63
select interval '.111 seconds'
-- !query 63 schema
struct<0.111 seconds:interval>
-- !query 63 output
0.111 seconds


-- !query 64
select cast('.111 seconds' as interval)
-- !query 64 schema
struct<CAST(.111 seconds AS INTERVAL):interval>
-- !query 64 output
NULL

Why are the changes needed?

bug fix.

Does this PR introduce any user-facing change?

no

How was this patch tested?

add ut

@yaooqinn
Copy link
Member Author

cc @cloud-fan @MaxGekk, thanks in advance. this pr is raised via comment @ #26491 (comment)

@SparkQA
Copy link

SparkQA commented Nov 14, 2019

Test build #113761 has finished for PR 26514 at commit 314829d.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Nov 14, 2019

Test build #113760 has finished for PR 26514 at commit 74f8435.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@yaooqinn
Copy link
Member Author

retest this please

@SparkQA
Copy link

SparkQA commented Nov 14, 2019

Test build #113765 has finished for PR 26514 at commit 314829d.

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

@yaooqinn yaooqinn changed the title [SPARK-29888][SQL] new interval string parser shall handle numeric with on fractional part [SPARK-29888][SQL] new interval string parser shall handle numeric with only fractional part Nov 14, 2019
@SparkQA
Copy link

SparkQA commented Nov 14, 2019

Test build #113792 has finished for PR 26514 at commit 76ba7ef.

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

@cloud-fan
Copy link
Contributor

thanks, merging to master!

@cloud-fan cloud-fan closed this in 0c68578 Nov 15, 2019
@yaooqinn yaooqinn deleted the SPARK-29888 branch November 15, 2019 05:37
@yaooqinn
Copy link
Member Author

thanks for merging

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