Keep the existing default catalog for SessionStateBuilder::new_from_existing#11991
Merged
alamb merged 1 commit intoapache:mainfrom Aug 15, 2024
Merged
Conversation
alamb
approved these changes
Aug 14, 2024
Contributor
alamb
left a comment
There was a problem hiding this comment.
Thanks @goldmedal -- this makes sense to me
| .unwrap() | ||
| .table_exist("employee")); | ||
|
|
||
| // if `with_create_default_catalog_and_schema` is disabled, the new one shouldn't create default catalog and schema |
Contributor
There was a problem hiding this comment.
I ran this test locally without the code changes in this PR and the test fails (as expected) thus verifying test coverage for the new code 👍
assertion failed: new_state.catalog_list().catalog(default_catalog.as_str()).unwrap().schema(default_schema.as_str()).unwrap().table_exist("employee")
thread 'execution::session_state::tests::test_from_existing' panicked at datafusion/core/src/execution/session_state.rs:1887:9:
assertion failed: new_state.catalog_list().catalog(default_catalog.as_str()).unwrap().schema(default_schema.as_str()).unwrap().table_exist("employee")
stack backtrace:
0: rust_begin_unwind
at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/panicking.rs:652:5
1: core::panicking::panic_fmt
at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/panicking.rs:72:14
2: core::panicking::panic
at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/panicking.rs:146:5
3: datafusion::execution::session_state::tests::test_from_existing
at ./src/execution/session_state.rs:1887:9
4: datafusion::execution::session_state::tests::test_from_existing::{{closure}}
at ./src/execution/session_state.rs:1848:32
5: core::ops::function::FnOnce::call_once
at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/ops/function.rs:250:5
6: core::ops::function::FnOnce::call_once
at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Contributor
|
Thanks again @goldmedal |
Contributor
Author
|
Thanks @alamb ❤️ |
Friede80
pushed a commit
to massive-com/arrow-datafusion
that referenced
this pull request
Dec 10, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #11988 .
Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?