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

Add RuntimeEnv::try_new and deprecate RuntimeEnv::new #12566

Merged
merged 1 commit into from
Sep 22, 2024

Conversation

OussamaSaoudi
Copy link
Contributor

Which issue does this PR close?

Closes #12554

What changes are included in this PR?

  • Move existing functionality of RuntimeEnv::new to RuntimeEnv::try_new
  • Replace all calls to RuntimeEnv::new in code and documentation to use RuntimeEnv::try_new

Are these changes tested?

No extra tests required. Ensured that compilation, existing tests, and doc tests pass.

Are there any user-facing changes?

None.

@github-actions github-actions bot added the execution Related to the execution crate label Sep 21, 2024
@OussamaSaoudi OussamaSaoudi marked this pull request as ready for review September 21, 2024 06:50
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 @OussamaSaoudi -- I have kicked off the CI tests for this one

@@ -66,8 +66,12 @@ impl Debug for RuntimeEnv {
}

impl RuntimeEnv {
/// Create env based on configuration
#[deprecated(note = "please use `try_new` instead")]
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️

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.

👨‍🍳 👌

Very nice @OussamaSaoudi -- looks great to me.

I am surprised this didn't cause any other changes

@alamb alamb changed the title Create try_new and change calls to new Add RuntimeEnv::try_new and deprecate RuntimeEnv::new Sep 21, 2024
@alamb alamb merged commit 72a1053 into apache:main Sep 22, 2024
25 checks passed
@alamb
Copy link
Contributor

alamb commented Sep 22, 2024

Thanks again @OussamaSaoudi

@OussamaSaoudi
Copy link
Contributor Author

Thanks for the clear and beginner friendly issues @alamb! This was a great way to get introduced to the code, and I'm looking forward to contributing more :D

@alamb
Copy link
Contributor

alamb commented Sep 23, 2024

Thanks for the clear and beginner friendly issues @alamb! This was a great way to get introduced to the code, and I'm looking forward to contributing more :D

You are welcome -- and I am glad the tickets fulfilled their intended purpose

bgjackma pushed a commit to bgjackma/datafusion that referenced this pull request Sep 25, 2024
Michael-J-Ward added a commit to Michael-J-Ward/datafusion-python that referenced this pull request Oct 15, 2024
Michael-J-Ward added a commit to Michael-J-Ward/datafusion-python that referenced this pull request Oct 28, 2024
Michael-J-Ward added a commit to apache/datafusion-python that referenced this pull request Nov 10, 2024
* patch datafusion deps

* migrate from deprecated RuntimeEnv::new to RuntimeEnv::try_new

Ref: apache/datafusion#12566

* remove Arc from create_udf call

Ref: apache/datafusion#12489

* doc typo

* migrage new UnnestOptions API

Ref: https://github.com/apache/datafusion/pull/12836/files

* update API for logical expr Limit

Ref: apache/datafusion#12836

* remove logical expr CrossJoin

It was removed upstream.

Ref: apache/datafusion#13076

* update PyWindowUDF

Ref: apache/datafusion#12803

* migrate window functions lead and lag to udwf

Ref: apache/datafusion#12802

* migrate window functions rank, dense_rank, and percent_rank to udwf

Ref: apache/datafusion#12648

* convert window function cume_dist to udwf

Ref: apache/datafusion#12695

* convert window function ntile to udwf

Ref: apache/datafusion#12694

* clean up functions_window invocation

* Only one column was being passed to udwf

* Update to DF 43.0.0

* Update tests to look for string_view type

* String view is now the default type for strings

* Making a variety of adjustments in wrappers and unit tests to account for the switch from string to string_view as default

* Resolve errors in doc building

---------

Co-authored-by: Tim Saucer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
execution Related to the execution crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make it clearer that RuntimeEnv::new() is fallable
2 participants