Skip to content

Conversation

@wangyum
Copy link
Member

@wangyum wangyum commented Jul 24, 2019

What changes were proposed in this pull request?

This PR add support typed interval expression:

spark-sql> select interval 'interval 3 year 1 hour';
interval 3 years 1 hours
spark-sql>

Please note that this pr did not add a cast alias for interval type like other types because neither PostgreSQL nor Hive supports this syntax.

How was this patch tested?

unit tests

@SparkQA
Copy link

SparkQA commented Jul 24, 2019

Test build #108085 has finished for PR 25241 at commit 586ef49.

  • 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. Merged to master.
Thank you, @wangyum .

@wangyum wangyum deleted the SPARK-28424 branch July 28, 2019 01:06
wangyum pushed a commit that referenced this pull request Oct 18, 2019
…format

### What changes were proposed in this pull request?

This is a followup of #25241 .

The typed interval expression should fail for invalid format.

### Why are the changes needed?

Te be consistent with the typed timestamp/date expression

### Does this PR introduce any user-facing change?

Yes. But this feature is not released yet.

### How was this patch tested?

updated test

Closes #26151 from cloud-fan/bug.

Authored-by: Wenchen Fan <wenchen@databricks.com>
Signed-off-by: Yuming Wang <wgyumg@gmail.com>
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.

3 participants