-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
GH-33850: [C++] Allow Substrait's default extension provider to be configured #34042
Conversation
return kDefaultExtensionProvider; | ||
} | ||
|
||
void set_default_extension_provider(const std::shared_ptr<ExtensionProvider>& provider) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we document these method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also - do we need to expose these in public headers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is declared in the public header options.h
and documented there.
One thing wasn't clear to be is how do we dispatch some of the message to our extension provider vs use the default extension provider. For example, for the asof join message, I would imagine that being passed to the existing Acero extension provider - how would we handle that? |
The usual pattern would be chaining of an extension provider - something along the lines of
and for initialization
|
IMO we can handle the "fallback" behavior in Acero instead of custom code so not everyone that wants to provide custom extension need to implement this. |
What do you have in mind for the API? My suggestion would be to encapsulate the chaining pattern via an API like:
Here |
We could make the chaining of extension providers more explicit (e.g. Acero could have a stack of extension providers). Or we could create a base class that we offer as a helper / example. However, I'm not sure that this is a good idea. I'd rather stick to something like what we already have as it is very simple. Yes, most providers will want to do something similar but I don't think it is a large burden for them. |
This sounds fine to me. We can implement the fallback logic internally. |
std::shared_ptr<ExtensionProvider> kDefaultExtensionProvider = | ||
std::make_shared<DefaultExtensionProvider>(); | ||
|
||
std::mutex kDefaultExtensionProviderMutex; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::shared_ptr<ExtensionProvider> kDefaultExtensionProvider = | |
std::make_shared<DefaultExtensionProvider>(); | |
std::mutex kDefaultExtensionProviderMutex; | |
std::shared_ptr<ExtensionProvider> default_extension_provider = | |
std::make_shared<DefaultExtensionProvider>(); | |
std::mutex default_extension_provider_mutex; |
These aren't constants so we can't use kName
. Will this work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right we can't use kName
. I believe the right way is to use g_name
, which I just used in the recent commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feature.
Benchmark runs are scheduled for baseline = 2b661ba and contender = 7423f03. 7423f03 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
@github-actions crossbow submit test-ubuntu-18.04-cpp |
Revision: aa57153 Submitted crossbow builds: ursacomputing/crossbow @ actions-c920441bc9
|
@rtpsw @westonpace This broke https://github.com/ursacomputing/crossbow/actions/runs/4121522608/jobs/7117290841#step:5:1695
Could you check this? |
@kou, I'll handle this. I don't have the same platform readily available, but I have a reasonable guess of the cause. |
@westonpace, could you please reopen this PR? I already pushed a commit to the same branch. Edit: Or perhaps we must do this in a separate PR? |
Yaron, Probably easier to create a new branch./PR to fix the issue. I am
not sure how reopening a merged PR would work.
…On Wed, Feb 8, 2023 at 4:17 AM rtpsw ***@***.***> wrote:
@westonpace <https://github.com/westonpace>, could you please reopen this
PR? I already pushed a commit to the same branch.
—
Reply to this email directly, view it on GitHub
<#34042 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGBXLFAQPAHW6W7BRHPZBLWWNQCFANCNFSM6AAAAAAURBC37M>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Created a fix-PR. |
…nfigured (fix) (#34075) See [this post](#34042 (comment)) for background. * Closes: #33850 Authored-by: Yaron Gvili <rtpsw@hotmail.com> Signed-off-by: Weston Pace <weston.pace@gmail.com>
… be configured (apache#34042) See apache#33850 * Closes: apache#33850 Authored-by: Yaron Gvili <rtpsw@hotmail.com> Signed-off-by: Weston Pace <weston.pace@gmail.com>
… be configured (fix) (apache#34075) See [this post](apache#34042 (comment)) for background. * Closes: apache#33850 Authored-by: Yaron Gvili <rtpsw@hotmail.com> Signed-off-by: Weston Pace <weston.pace@gmail.com>
… be configured (apache#34042) See apache#33850 * Closes: apache#33850 Authored-by: Yaron Gvili <rtpsw@hotmail.com> Signed-off-by: Weston Pace <weston.pace@gmail.com>
… be configured (fix) (apache#34075) See [this post](apache#34042 (comment)) for background. * Closes: apache#33850 Authored-by: Yaron Gvili <rtpsw@hotmail.com> Signed-off-by: Weston Pace <weston.pace@gmail.com>
… be configured (apache#34042) See apache#33850 * Closes: apache#33850 Authored-by: Yaron Gvili <rtpsw@hotmail.com> Signed-off-by: Weston Pace <weston.pace@gmail.com>
… be configured (fix) (apache#34075) See [this post](apache#34042 (comment)) for background. * Closes: apache#33850 Authored-by: Yaron Gvili <rtpsw@hotmail.com> Signed-off-by: Weston Pace <weston.pace@gmail.com>
See #33850