Skip to content

Set catalog_list from outside for SessionState. #5277

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
merged 2 commits into from
Feb 15, 2023
Merged

Set catalog_list from outside for SessionState. #5277

merged 2 commits into from
Feb 15, 2023

Conversation

MichaelScofield
Copy link
Contributor

Which issue does this PR close?

Closes #.

Rationale for this change

catalog_list in SessionState was made private in #4764. That makes catalog_list fixed to MemoryCatalogList inside:

https://github.com/apache/arrow-datafusion/blob/c0defeb7a074d286976240a3965600a77038459a/datafusion/core/src/execution/context.rs#L1475-L1480

If we are to provide another implementation for catalog_list, we can't.

What changes are included in this PR?

Adds a new constructor for SessionState for injecting custom implementor for catalog_list.

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added the core Core DataFusion crate label Feb 14, 2023
@alamb
Copy link
Contributor

alamb commented Feb 14, 2023

It appears there is a clippy failure on this PR https://github.com/apache/arrow-datafusion/actions/runs/4173309478/jobs/7225595775

@MichaelScofield
Copy link
Contributor Author

Fixed, PTAL @alamb

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution @MichaelScofield

I can't help but think the management of catalogs is somewhat in need of assistance in DataFusion at the moment.

DataFusion is fairly heavily focused on being a query engine and it grown some basic in memory catalog support as needed, and has a bunch of extension points to support other catalog implementations

However, I think the APIs for how to implement an external catalog are not well defined and there isn't a good example of doing so. I think it is fine to merge this PR as is to make things better for you and your project, but longer term we should really have better story for catalogs.

I will file a follow on ticket for discussion

@alamb
Copy link
Contributor

alamb commented Feb 15, 2023

I filed #5291 to track improvement in this area

@alamb alamb merged commit d05647c into apache:master Feb 15, 2023
@ursabot
Copy link

ursabot commented Feb 15, 2023

Benchmark runs are scheduled for baseline = 2b73119 and contender = d05647c. d05647c is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ec2-t3-xlarge-us-east-2] ec2-t3-xlarge-us-east-2
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] test-mac-arm
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] ursa-i9-9960x
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] ursa-thinkcentre-m75q
Buildkite builds:
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

@MichaelScofield MichaelScofield deleted the feat/with_catalog_session_state branch February 16, 2023 06:01
jiangzhx pushed a commit to jiangzhx/arrow-datafusion that referenced this pull request Feb 24, 2023
* Set `catalog_list` from outside for `SessionState`.

* fix: resolve PR comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants