Skip to content
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

Upgrade to DataFusion 16.0.0 #115

Merged
merged 13 commits into from
Jan 19, 2023
Merged

Conversation

andygrove
Copy link
Member

@andygrove andygrove commented Jan 2, 2023

Which issue does this PR close?

Closes #134

Rationale for this change

Upgrade to pick up latest features

What changes are included in this PR?

Are there any user-facing changes?

Comment on lines +353 to +360
let df = if let Some(schema) = schema {
options.schema = Some(&schema.0);
let result = self.ctx.read_json(path, options);
wait_for_future(py, result).map_err(DataFusionError::from)?
} else {
let result = self.ctx.read_json(path, options);
wait_for_future(py, result).map_err(DataFusionError::from)?
};
Copy link
Member Author

Choose a reason for hiding this comment

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

This was necessary because options.schema holds a reference to a schema now so we need to wait for the future to complete before ownership can be released.

pub fn new(df: Arc<DataFrame>) -> Self {
Self { df }
pub fn new(df: DataFrame) -> Self {
Self { df: Arc::new(df) }
Copy link
Member Author

Choose a reason for hiding this comment

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

Pyo3 methods require &self and cannot take self, so my solution was to introduce an Arc here.

src/functions.rs Outdated Show resolved Hide resolved
@andygrove andygrove changed the title Upgrade to latest DataFusion Upgrade to DataFusion 16.0.0 Jan 11, 2023
@jdye64
Copy link
Contributor

jdye64 commented Jan 18, 2023

@andygrove given that the remaining test failures preventing this PR from getting merged all all related to window logic, and it seems window logic bindings in general need some work, would it be fair to just comment out those failing tests as part of this upgrade to unblock other work? From there we can introduce the window bindings and un-comment the tests once that is complete. Otherwise I fear this PR is going to grow unwieldy if we try to introduce those bindings in this PR as well. Thoughts?

@jdye64
Copy link
Contributor

jdye64 commented Jan 18, 2023

Actually I see that config.rs also needs some refactoring and updating. That also seems like a heavy fix for this PR however.

@andygrove andygrove marked this pull request as ready for review January 18, 2023 23:28
@andygrove
Copy link
Member Author

@jdye64 I have now fixed all the regressions.

@andygrove
Copy link
Member Author

@francis-du fyi

@jdye64
Copy link
Contributor

jdye64 commented Jan 19, 2023

LGTM. That was a bear. Thanks for tackling it.

@andygrove andygrove merged commit 575367c into apache:master Jan 19, 2023
@andygrove andygrove deleted the datafusion-16 branch January 19, 2023 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add script for Python linting
2 participants