-
Notifications
You must be signed in to change notification settings - Fork 4k
GH-34626: [C++] Add ordered/segmented aggregation Substrait extension #34627
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,6 +20,7 @@ | |
| #pragma once | ||
|
|
||
| #include <memory> | ||
| #include <optional> | ||
|
|
||
| #include "arrow/compute/type_fwd.h" | ||
| #include "arrow/datum.h" | ||
|
|
@@ -34,6 +35,15 @@ namespace engine { | |
|
|
||
| class SubstraitCall; | ||
|
|
||
| ARROW_ENGINE_EXPORT | ||
| Result<FieldRef> DirectReferenceFromProto(const substrait::Expression::FieldReference*, | ||
| const ExtensionSet&, const ConversionOptions&); | ||
|
|
||
| ARROW_ENGINE_EXPORT | ||
| Result<compute::Expression> FromProto(const substrait::Expression::FieldReference*, | ||
| const ExtensionSet&, const ConversionOptions&, | ||
| std::optional<compute::Expression>); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the expression here?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's the "current expression". This method is currently called int he middle of a deserializing an expression tree. So, for example: flowchart TD
A[Call] -->|args| FieldRef
A -->|args| C
C[Call*] -->|args| D
C -->|Call| E
D[Literal]
E[FieldRef*]
So, when de-referencing However, can we remove this prototype from the header file and put it in an anonymous namespace? I think it should be an internal method and not exposed.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks Weston for the explanation. +1 on not exposing this in the header file. I think if we move the MakeSegmentedAggregateRel to expression_internal.cc then we don't need to expose this via the header file. I have a comment about moving these "make extension rel" methods out of options.cc anyway.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think IMO, refactoring of
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
@westonpace Would sth like this look better to you? e958b6d
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I'm neutral on the change and don't want to spend too much time bike shedding here. If you're comfortable let's move forward.
Yes, I am fine with |
||
|
|
||
| ARROW_ENGINE_EXPORT | ||
| Result<compute::Expression> FromProto(const substrait::Expression&, const ExtensionSet&, | ||
| const ConversionOptions&); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.