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-11341: [Python] [Gandiva] Add NULL/None checks to Gandiva builder functions #9289

Merged
merged 4 commits into from
Jul 13, 2022

Conversation

wjones127
Copy link
Member

If these functions were passed None as an argument, they caused segfaults. As an example:

import pyarrow
import pyarrow.gandiva as gandiva

builder = gandiva.TreeExprBuilder()
field = pyarrow.field('whatever', type=pyarrow.date64())
date_col = builder.make_field(field)

func = builder.make_function('less_than_or_equal_to', [date_col, None], pyarrow.bool_())

condition = builder.make_condition(func)

# Will segfault on this line:
gandiva.make_filter(pyarrow.schema([field]), condition)

@github-actions
Copy link

Copy link
Contributor

@projjal projjal left a comment

Choose a reason for hiding this comment

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

How about you add an unit test with none node that originally segfaults.

@wjones127 wjones127 force-pushed the ARROW-11341/gandiva-check-none branch from 80dcd11 to 3e2cdb1 Compare March 30, 2021 03:14
@wjones127
Copy link
Member Author

Good call on the tests. Looks like we are still getting a segfault. I will look into that later today.

@wjones127
Copy link
Member Author

@projjal Should be good to review now.

@wjones127 wjones127 force-pushed the ARROW-11341/gandiva-check-none branch from 2bf5d93 to 4df1118 Compare July 24, 2021 20:40
@wjones127
Copy link
Member Author

@jorisvandenbossche Would you have time to review and/or merge?

@wjones127 wjones127 force-pushed the ARROW-11341/gandiva-check-none branch from 4df1118 to 88e65b4 Compare December 9, 2021 23:26
@wjones127 wjones127 force-pushed the ARROW-11341/gandiva-check-none branch from 88e65b4 to 8e2b6bd Compare February 7, 2022 18:31
@wjones127
Copy link
Member Author

Had this sitting around, but would still like to get this done. Just rebased, @jorisvandenbossche would you mind reviewing?

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.

Sorry for the delay @wjones127 . This looks good to me, but can you rebase to ensure it works with latest git master?

@wjones127 wjones127 force-pushed the ARROW-11341/gandiva-check-none branch from 874ce8c to dac1264 Compare May 4, 2022 16:48
Will Jones and others added 4 commits July 12, 2022 07:29
@wjones127 wjones127 force-pushed the ARROW-11341/gandiva-check-none branch from dac1264 to 0f59775 Compare July 12, 2022 14:29
Copy link
Member

@lidavidm lidavidm 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 persisting with this Will!

@lidavidm lidavidm merged commit 03e80dc into apache:master Jul 13, 2022
@wjones127
Copy link
Member Author

Thank you for merging @lidavidm !

@wjones127 wjones127 deleted the ARROW-11341/gandiva-check-none branch July 13, 2022 17:09
@ursabot
Copy link

ursabot commented Jul 14, 2022

Benchmark runs are scheduled for baseline = 861f237 and contender = 03e80dc. 03e80dc 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 ⬇️0.44% ⬆️0.03%] test-mac-arm
[Failed ⬇️0.0% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.39% ⬆️0.0%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] 03e80dc1 ec2-t3-xlarge-us-east-2
[Finished] 03e80dc1 test-mac-arm
[Failed] 03e80dc1 ursa-i9-9960x
[Finished] 03e80dc1 ursa-thinkcentre-m75q
[Finished] 861f2371 ec2-t3-xlarge-us-east-2
[Failed] 861f2371 test-mac-arm
[Failed] 861f2371 ursa-i9-9960x
[Finished] 861f2371 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

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

5 participants