Skip to content

Upgrade to DataFusion 16.0.0#115

Merged
andygrove merged 13 commits into
apache:masterfrom
andygrove:datafusion-16
Jan 19, 2023
Merged

Upgrade to DataFusion 16.0.0#115
andygrove merged 13 commits into
apache:masterfrom
andygrove:datafusion-16

Conversation

@andygrove
Copy link
Copy Markdown
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 thread src/context.rs
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
Copy Markdown
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.

Comment thread src/dataframe.rs
pub fn new(df: Arc<DataFrame>) -> Self {
Self { df }
pub fn new(df: DataFrame) -> Self {
Self { df: Arc::new(df) }
Copy link
Copy Markdown
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.

Comment thread src/functions.rs Outdated
@andygrove andygrove changed the title Upgrade to latest DataFusion Upgrade to DataFusion 16.0.0 Jan 11, 2023
@jdye64
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

@jdye64 I have now fixed all the regressions.

@andygrove
Copy link
Copy Markdown
Member Author

@francis-du fyi

@jdye64
Copy link
Copy Markdown
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