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

ARROW-13989: [C++] Add support for month-day-nano interval to compute functions #11525

Closed
wants to merge 2 commits into from

Conversation

lidavidm
Copy link
Member

No description provided.

@github-actions
Copy link

@github-actions
Copy link

⚠️ Ticket has not been started in JIRA, please click 'Start Progress'.

Copy link
Member

@pitrou pitrou left a comment

Choose a reason for hiding this comment

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

+1, just two questions

@@ -1302,7 +1304,8 @@ struct CopyFixedWidth<BooleanType> {
};

template <typename Type>
struct CopyFixedWidth<Type, enable_if_number<Type>> {
struct CopyFixedWidth<
Type, enable_if_t<is_number_type<Type>::value || is_interval_type<Type>::value>> {
Copy link
Member

Choose a reason for hiding this comment

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

Out of curiosity, why is_interval_type here while IfElseFunctor only allows month-day-nano intervals?

Copy link
Member Author

Choose a reason for hiding this comment

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

This helper is used by coalesce/choose/case_when so this is part of adding support for all of those functions.

if_else should support all the interval types. It uses GenerateTypeAgnosticPrimitive, so DayTime and Month intervals are handled as integers.

this->mask("[true, true]"), this->scalar("null"),
this->array("[null, null]"));
this->Assert(ReplaceWithMask, this->array("[[1, 2, 4], [3, 4, -2], [-5, 6, 7]]"),
this->mask("[true, false, null]"), this->scalar("[7, 0, 8]"),
Copy link
Member

Choose a reason for hiding this comment

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

Slightly unrelated to this PR, but it seems that amongst the ReplaceWithMask tests, the mask is always of the form (regex) true* (false|null)*, meaning that the replacement index is always trivially equal to the source index. Is that deliberate?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's not deliberate. I'll update the tests to avoid this.

@ursabot
Copy link

ursabot commented Nov 10, 2021

Benchmark runs are scheduled for baseline = 140b0b2 and contender = f4dd806. f4dd806 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️25.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Finished ⬇️0.0% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.27% ⬆️0.04%] ursa-thinkcentre-m75q
Supported benchmarks:
ursa-i9-9960x: langs = Python, R, JavaScript
ursa-thinkcentre-m75q: langs = C++, Java
ec2-t3-xlarge-us-east-2: cloud = True

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants