Skip to content

Conversation

@tdcmeehan
Copy link
Contributor

@tdcmeehan tdcmeehan commented Nov 19, 2024

Description

Part of #24087

Motivation and Context

Fix incorrect data caused by overflow, and correct the type mapping in certain operators.

Impact

Where previously some expressions could have resulted in an overflow and incorrect results, now they will fail with a NUMERIC_VALUE_OUT_OF_RANGE error.

Test Plan

Unit tests

Contributor checklist

  • Please make sure your submission complies with our development, formatting, commit message, and attribution guidelines.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.

Release Notes

Please follow release notes guidelines and fill in the release notes below.

== RELEASE NOTES ==

General Changes
* Fix addition, subtraction, multiplication and division of ``INTERVAL HOUR`` and ``INTERVAL YEAR`` values.  :pr:`24089`

@tdcmeehan tdcmeehan requested a review from a team as a code owner November 19, 2024 20:52
@tdcmeehan tdcmeehan requested a review from presto-oss November 19, 2024 20:52
@prestodb-ci prestodb-ci added the from:IBM PR from IBM label Nov 19, 2024
@tdcmeehan tdcmeehan force-pushed the intervalym branch 2 times, most recently from 10d59aa to c58bf94 Compare November 19, 2024 21:34
Copy link
Member

@hantangwangd hantangwangd left a comment

Choose a reason for hiding this comment

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

Thanks for the fix, looks good to me, only some nits.

@tdcmeehan
Copy link
Contributor Author

Thanks for the review @hantangwangd, I have updated the PR.

Copy link
Member

@hantangwangd hantangwangd left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the fix.

@pramodsatya
Copy link
Contributor

Closing this PR as the change is merged in #24617.

facebook-github-bot pushed a commit to facebookincubator/velox that referenced this pull request Apr 17, 2025
Summary:
Add support for mathematical functions `plus`, `minus`, `multiply`, and `divide`
with `IntervalYearMonth` type. The function signatures added match that of [Presto](https://github.com/prestodb/presto/blob/master/presto-main/src/main/java/com/facebook/presto/type/IntervalYearMonthOperators.java),
accounting for the Presto function signature changes in prestodb/presto#24089.

Pull Request resolved: #11612

Reviewed By: pedroerp

Differential Revision: D72997442

Pulled By: kKPulla

fbshipit-source-id: 5fcf40639ed0af63e6ec198994aeaef49ba367cb
zhanglistar pushed a commit to bigo-sg/velox that referenced this pull request Apr 22, 2025
…incubator#11612)

Summary:
Add support for mathematical functions `plus`, `minus`, `multiply`, and `divide`
with `IntervalYearMonth` type. The function signatures added match that of [Presto](https://github.com/prestodb/presto/blob/master/presto-main/src/main/java/com/facebook/presto/type/IntervalYearMonthOperators.java),
accounting for the Presto function signature changes in prestodb/presto#24089.

Pull Request resolved: facebookincubator#11612

Reviewed By: pedroerp

Differential Revision: D72997442

Pulled By: kKPulla

fbshipit-source-id: 5fcf40639ed0af63e6ec198994aeaef49ba367cb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

from:IBM PR from IBM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants