8000 Make AST operators nullable by vyasr · Pull Request #9096 · rapidsai/cudf · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Make AST operators nullable #9096

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

Merged

Conversation

vyasr
Copy link
Contributor
@vyasr vyasr commented Aug 23, 2021

Contributes to #8980 and #8145.

This PR makes all operator_functors templated on the potential nullability of the inputs, allowing per-operator customization of null handling with minimal performance penalties. The default specialization in the nullable case is a null-propagating fall-through to the non-nullable case, which matches standard libcudf semantics, but any specific operator's null handling behavior can be customized by explicit specialization of the operator_functor template corresponding to that operator.

This PR implements NULL_EQUAL, NULL_LOGICAL_AND, and NULL_LOGICAL_OR operators that behave like their non-nullable counterparts when no nulls are present but can return non-null results from null inputs. The NULL_EQUAL operator replaces the compare_nulls parameter for conditional joins.

vyasr added 23 commits August 23, 2021 15:05
… to select the appropriate operator (fails for nullable operators now).
…d test both EQUAL and NULL_EQUAL joins for different desired null equalities.
@vyasr vyasr added feature request New feature or request 3 - Ready for Review Ready for review by team libcudf Affects libcudf (C++/CUDA) code. breaking Breaking change labels Aug 23, 2021
@vyasr vyasr added this to the Conditional Joins milestone Aug 23, 2021
@vyasr vyasr self-assigned this Aug 23, 2021
@vyasr vyasr requested a review from a team as a code owner August 23, 2021 22:15
@vyasr vyasr requested a review from a team as a code owner August 25, 2021 17:12
@vyasr vyasr removed the request for review from vuule August 27, 2021 21:12
@jrhemstad jrhemstad requested a review from bdice August 30, 2021 15:49
Copy link
Contributor
@bdice bdice left a comment

Choose a reason for hiding this comment

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

Mostly minor suggestions for improvement. The design looks good overall.

One broader question: should we adopt a policy of only appending new AST operators to the end? Is there any possibility for users that rely on our C++ interface to see breakage from inserting new operators in the middle?

@vyasr
Copy link
Contributor Author
vyasr commented Sep 7, 2021

Mostly minor suggestions for improvement. The design looks good overall.

One broader question: should we adopt a policy of only appending new AST operators to the end? Is there any possibility for users that rely on our C++ interface to see breakage from inserting new operators in the middle?

Inserting into the middle of an enum will not affect the API, but it is generally not ABI-safe, so yes this could break client code compiled against libcudf. However, at present libcudf does not even promise API compatibility between releases, so I don't think we need to worry about it. Expression evaluation is still very new and we made the last release with the expectation that we'd have to make many (potentially API- and/or ABI-breaking) changes in the subsequent release. We've made similarly ABI-breaking changes in other much more frequently used parts of the code base recently, so I think it's definitely OK to do in what's still a somewhat experimental feature in some ways.

@vyasr vyasr requested a review from bdice September 7, 2021 16:44
Copy link
Contributor
@bdice bdice left a comment

Choose a reason for hiding this comment

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

Minor changes requested. Otherwise looks good to me.

@bdice bdice self-requested a review September 7, 2021 21:13
@vyasr
9E19 Copy link
Contributor Author
vyasr commented Sep 9, 2021

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 8a78196 into rapidsai:branch-21.10 Sep 9, 2021
rapids-bot bot pushed a commit that referenced this pull request Sep 13, 2021
#9096 inadvertently removed the null equality parameter for the left semi and left anti equality joins in the JNI code.  This restores the old behavior since #9096 only targeted conditional joins.

Authors:
  - Jason Lowe (https://github.com/jlowe)

Approvers:
  - Robert (Bobby) Evans (https://github.com/revans2)

URL: #9207
rapids-bot bot pushed a commit that referenced this pull request Dec 7, 2021
Relates to #9851.  This removes deprecated methods from the Java Table class, including APIs that would allow writing ORC files without specifying metadata via writer options needed for some columns (e.g.: precision for decimal columns).  This also fixes a test where decimal precisions where not specified despite trying to write decimal columns to ORC.  Javadoc errors introduced by #9096 were also corrected.

Authors:
  - Jason Lowe (https://github.com/jlowe)

Approvers:
  - Robert (Bobby) Evans (https://github.com/revans2)

URL: #9853
@vyasr vyasr deleted the feature/nullable_ast_operators branch January 14, 2022 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team breaking Breaking change feature request New feature or request Java Affects Java cuDF API. libcudf Affects libcudf (C++/CUDA) code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0