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-17523: [C++] Add support to substrait function is_null, is_not_null and count #13969

Merged
merged 2 commits into from Aug 30, 2022

Conversation

jinchengchenghh
Copy link
Contributor

@jinchengchenghh jinchengchenghh commented Aug 25, 2022

Add Substrait function mapping for is_null, is_not_null, and count

@github-actions
Copy link

Thanks for opening a pull request!

If this is not a minor PR. Could you open an issue for this pull request on JIRA? https://issues.apache.org/jira/browse/ARROW

Opening JIRAs ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename pull request title in the following format?

ARROW-${JIRA_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

See also:

Copy link
Member

@westonpace westonpace left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution! is_null and is_not_null look good to me. I think there may be a slight issue with count but the issue exists with sum and avg as well so I think I would be ok with proceeding with this PR as-is and adding this to the list of functions to fix in ARROW-17534.

Comment on lines +501 to +506
{{kSubstraitAggregateGenericFunctionsUri, "count"},
{"[1, 2, 30]"},
{int8()},
"[3]",
"[2, 1]",
int64()}};
Copy link
Member

Choose a reason for hiding this comment

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

Unfortunately, the count function takes in a single optional enum argument. I have no idea what the purpose of this argument is. However, in Substrait, "optional arguments" should still be included in the protobuf.

I realize now that I did not account for this in the other aggregate functions too :(.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@westonpace
Copy link
Member

The lint error appears valid as well. Please run clang-format on the code.

@jinchengchenghh
Copy link
Contributor Author

Fixed code style.
Can this one merge? @westonpace

@westonpace westonpace changed the title [ARROW-17523] Add support to substrait function is_null, is_not_null and count ARROW-17523: [C++] Add support to substrait function is_null, is_not_null and count Aug 30, 2022
@westonpace westonpace merged commit 74dae61 into apache:master Aug 30, 2022
@westonpace
Copy link
Member

Thanks @jinchengchenghh . I updated the title of the PR to conform to our style and I changed the description a little (since this is used for the git commit) and merged.

@github-actions
Copy link

@github-actions
Copy link

⚠️ Ticket has no components in JIRA, make sure you assign one.

@ursabot
Copy link

ursabot commented Aug 31, 2022

Benchmark runs are scheduled for baseline = e48afd6 and contender = 74dae61. 74dae61 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Failed] test-mac-arm
[Failed ⬇️0.27% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.14% ⬆️0.11%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] 74dae618 ec2-t3-xlarge-us-east-2
[Failed] 74dae618 test-mac-arm
[Failed] 74dae618 ursa-i9-9960x
[Finished] 74dae618 ursa-thinkcentre-m75q
[Finished] e48afd67 ec2-t3-xlarge-us-east-2
[Failed] e48afd67 test-mac-arm
[Failed] e48afd67 ursa-i9-9960x
[Finished] e48afd67 ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

@ursabot
Copy link

ursabot commented Aug 31, 2022

['Python', 'R'] benchmarks have high level of regressions.
ursa-i9-9960x

anjakefala pushed a commit to anjakefala/arrow that referenced this pull request Aug 31, 2022
…null and count (apache#13969)

Add Substrait function mapping for is_null, is_not_null, and count

Authored-by: Chengcheng Jin <chengcheng.jin@intel.com>
Signed-off-by: Weston Pace <weston.pace@gmail.com>
@jinchengchenghh
Copy link
Contributor Author

Thanks! It's ok.

zagto pushed a commit to zagto/arrow that referenced this pull request Oct 7, 2022
…null and count (apache#13969)

Add Substrait function mapping for is_null, is_not_null, and count

Authored-by: Chengcheng Jin <chengcheng.jin@intel.com>
Signed-off-by: Weston Pace <weston.pace@gmail.com>
fatemehp pushed a commit to fatemehp/arrow that referenced this pull request Oct 17, 2022
…null and count (apache#13969)

Add Substrait function mapping for is_null, is_not_null, and count

Authored-by: Chengcheng Jin <chengcheng.jin@intel.com>
Signed-off-by: Weston Pace <weston.pace@gmail.com>
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