-
Notifications
You must be signed in to change notification settings - Fork 14
Introduce ConfigExtensionExt, allowing the propagation of arbitrary ConfigExtensions across network boundaries
#100
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
Conversation
|
I did not review the details but the high level. Intuitively, this makes sense and I support this. What I am trying to figure out is where we use this. I am working on a very specific example of explain analyze and see if we will need this so it will be a use case for it. Otherwise, maybe you will help come up with a use case? |
This satisfies the same use-cases as upstream's ConfigExtension, so for the same reason users of normal DataFusion would want One example: A JWT auth token that needs to make it's way from a end user request all the way to a leaf execution node in a distributed query with 10 stages. |
fmonjalet
left a comment
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.
Mostly minor remarks, the design looks good to me!
…igExtension]s across network boundaries
…_option_extension
0d7febf to
104e3fa
Compare
robtandy
left a comment
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.
I totally understand the need for this now and this design looks good.
DataFusion allows users to provide their own
ConfigExtensions that get carried by theSessionConfigthrough the execution of a query.https://github.com/apache/datafusion/blob/b84ddfde0689e8ecb9b71521fd95c7245d68d4ca/datafusion/common/src/config.rs#L1174-L1223
Users can thread their own
ConfigExtensionin order to provide additional context to their own execution nodes or other custom implementations.In Distributed DataFusion, sessions are not automatically propagated across network boundaries, and any
ConfigExtensionset in the head stage will be lost when doing a network hop.This PR allows propagating user-provided
ConfigExtensions in a distributed context, using GRPC metadata for propagating these extensions across network boundaries.For example, if a user has this
ConfigExtension:It can be:
With just the two lines above, any user-provided
CustomExtensionwill be able to cross network boundaries and be accessible anywhere in the plan, regardless of the physical node executing the query.