Skip to content

Conversation

@tustvold
Copy link
Contributor

Which issue does this PR close?

Closes #2659

Rationale for this change

The previous version introduced a ref-cycle as the DataFrame owns a copy of the CatalogList that in turn owns the registered DataFrame

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added core Core DataFusion crate logical-expr Logical plan and expressions labels Dec 30, 2022
@tustvold tustvold added the api change Changes the API exposed to users of the crate label Dec 30, 2022
@tustvold
Copy link
Contributor Author

I originally thought about resolving this by moving CatalogList off SessionState and onto SessionContext, but this created a huge amount of churn, this seems relatively harmless by comparison.

@tustvold tustvold marked this pull request as draft December 31, 2022 08:45
@tustvold tustvold marked this pull request as ready for review January 5, 2023 08:25

#[async_trait]
impl TableProvider for DataFrame {
impl TableProvider for DataFrameTableProvider {
Copy link
Contributor

@alamb alamb Jan 5, 2023

Choose a reason for hiding this comment

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

Where is the ref cycle that this change fixing? I think I am missing something here

I see the cycle happens when the dataframe is registered as a table provider on the same context

I think this makes sense to me

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.

cc @Dandandan as I think he was the one who added this API at first

@alamb
Copy link
Contributor

alamb commented Jan 8, 2023

What is the current thinking about this PR? It has conflicts. Shall we polish it up and merge? It seems like the bug is real enough

@tustvold tustvold merged commit c5e2594 into apache:master Jan 9, 2023
@ursabot
Copy link

ursabot commented Jan 9, 2023

Benchmark runs are scheduled for baseline = 4bea81b and contender = c5e2594. c5e2594 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api change Changes the API exposed to users of the crate core Core DataFusion crate logical-expr Logical plan and expressions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DataFrame TableProvider Circular Reference

3 participants