Skip to content

Conversation

@pramodsatya
Copy link
Collaborator

@pramodsatya pramodsatya commented Nov 21, 2024

Add support for mathematical functions plus, minus, multiply, and divide
with IntervalYearMonth type. The function signatures added match that of Presto,
accounting for the Presto function signature changes in prestodb/presto#24089.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 21, 2024
@netlify
Copy link

netlify bot commented Nov 21, 2024

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit 6158737
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/67f870a0860c8200080b2296

Copy link
Collaborator

@aditi-pandit aditi-pandit left a comment

Choose a reason for hiding this comment

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

Thanks @pramodsatya.

We can use more templates in this code I feel to reduce the volume of new code. PTAL.

@pramodsatya
Copy link
Collaborator Author

Thanks @aditi-pandit, updated the PR to use more templates and reduce the lines of new code. Could you please take another look?

Copy link
Collaborator

@aditi-pandit aditi-pandit left a comment

Choose a reason for hiding this comment

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

@pramodsatya : The code changes look good.

Is this code tested exhaustively by the expression fuzzer ? Also with the PrestoQueryRunner ? Would be great if you could paste the results.

if constexpr (std::is_same_v<TResult, int64_t>) {
min = kLongMin;
max = kLongMax;
maxCheck = kMaxDoubleBelowInt64Max;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Rename to maxResult.

@pramodsatya
Copy link
Collaborator Author

@pramodsatya : The code changes look good.

Is this code tested exhaustively by the expression fuzzer ? Also with the PrestoQueryRunner ? Would be great if you could paste the results.

Thanks @aditi-pandit, the expression fuzzer CI failure is because the newly added function signature for plus is not supported by Presto yet. Once the linked Presto PR is merged, advancing the Presto version used by PrestoQueryRunner should fix the fuzzer CI error. Upon running the expression fuzzer locally on the main branch, I encountered other errors (checking further).

@aditi-pandit
Copy link
Collaborator

@pramodsatya : Can you ping Tim about the Presto PR ?

@libianoss
Copy link
Collaborator

@aditi-pandit @pramodsatya can anyone else review and approve this PR since Tim is out? Thanks.

@pramodsatya
Copy link
Collaborator Author

@aditi-pandit, the expression fuzzer CI is passing now, could you please take another look?

Copy link
Collaborator

@aditi-pandit aditi-pandit left a comment

Choose a reason for hiding this comment

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

Thanks @pramodsatya

@aditi-pandit aditi-pandit requested a review from Yuhta March 24, 2025 19:18
@aditi-pandit
Copy link
Collaborator

@Yuhta : Please can you help review.

@libianoss
Copy link
Collaborator

@Yuhta : can you help to review?Thanks.

@majetideepak majetideepak added the ready-to-merge PR that have been reviewed and are ready for merging. PRs with this tag notify the Velox Meta oncall label Apr 8, 2025
@facebook-github-bot
Copy link
Contributor

@kKPulla has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@kKPulla merged this pull request in 53e2684.

@pramodsatya pramodsatya deleted the ym_multiply branch April 17, 2025 16:57
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

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged ready-to-merge PR that have been reviewed and are ready for merging. PRs with this tag notify the Velox Meta oncall

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants