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

Add decimal types support to VELOX_DYNAMIC_TYPE_DISPATCH_IMPL #2307

Closed

Conversation

majetideepak
Copy link
Collaborator

@majetideepak majetideepak commented Aug 16, 2022

A lack of VELOX_DYNAMIC_TYPE_DISPATCH_IMPL support for decimal types
requires specialization for these types at various code blocks.
This is now supported.

@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 Aug 16, 2022
@majetideepak
Copy link
Collaborator Author

CC: @karteekmurthys

@majetideepak majetideepak changed the title Add decimal types to VELOX_DYNAMIC_TYPE_DISPATCH_IMPL Add decimal types support to VELOX_DYNAMIC_TYPE_DISPATCH_IMPL Aug 16, 2022
Copy link
Contributor

@kgpai kgpai left a comment

Choose a reason for hiding this comment

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

LGTM.

@majetideepak
Copy link
Collaborator Author

@kgpai, @Yuhta can someone please merge this? Thanks.

@facebook-github-bot
Copy link
Contributor

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

@netlify
Copy link

netlify bot commented Aug 30, 2022

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit 9b4d659
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/631798f6f165450008be9de0

@majetideepak
Copy link
Collaborator Author

@laithsakka @kgpai can you please import this again? I had to rebase due to a conflict with the main branch. Thanks.

@facebook-github-bot
Copy link
Contributor

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

Comment on lines 88 to 89
if (!lType->equivalent(*rType))
return false;
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi, we use ClangTidy internally which enforces that braces are used for all if statements, even these single line ones. Plus it helps with readability and it's defensive agains accidental bugs.

Could you add braces here?

const auto rhs = b.value<TypeKind::LONG_DECIMAL>();
const auto lType = DECIMAL(lhs.precision, lhs.scale);
const auto rType = DECIMAL(rhs.precision, rhs.scale);
if (!lType->equivalent(*rType))
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

@facebook-github-bot
Copy link
Contributor

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

@majetideepak majetideepak deleted the extend-decimal-template branch September 22, 2022 19:18
lingbin added a commit to lingbin/velox that referenced this pull request Sep 29, 2022
`VELOX_DYNAMIC_TYPE_DISPATCH_IMPL` macro already support decimal types
in facebookincubator#2307, so there is
also no need to specialize decimal types in
`VELOX_DYNAMIC_TYPE_DISPATCH_METHOD_ALL` macro.
facebook-github-bot pushed a commit that referenced this pull request Sep 29, 2022
Summary:
`VELOX_DYNAMIC_TYPE_DISPATCH_IMPL` macro already supports decimal types in #2307, so there is also no need to specialize decimal types in
`VELOX_DYNAMIC_TYPE_DISPATCH_METHOD_ALL` macro.

Pull Request resolved: #2680

Reviewed By: Yuhta

Differential Revision: D39926371

Pulled By: mbasmanova

fbshipit-source-id: 36a627093b2c44d401a4781e45d85b0bfe16bcdf
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants