dragonknightk opened a new pull request, #2974: URL: https://github.com/apache/datafusion-ballista/pull/2974
# Which issue does this PR close? Closes #2960. # Rationale for this change Tables registered on a `SessionState` beforehand are missing after `standalone_with_state` or `remote_with_state`, with `table 'datafusion.public.<name>' not found`. `upgrade_for_ballista` rebuilds the state with a config that still asks to create the default catalog, so `build()` overwrites the existing one with an empty catalog. # What changes are included in this PR? `upgrade_for_ballista` now turns the flag off on the config it passes to `with_config` when the state already has its default catalog. A state without a default catalog still gets one. `standalone_with_state` and `remote_with_state` keep a table registered on the state beforehand; without the fix, both fail with `table 'datafusion.public.test' not found`. A state whose configured default catalog does not exist still has that catalog after `standalone_with_state`. # Are there any user-facing changes? Tables registered on a `SessionState` before it is passed to `standalone_with_state` or `remote_with_state` now stay visible, as they are with `SessionContext::new_with_state`. ## AI Disclosure Human-led contribution. Grok Bot, working for dragonknightk, assisted with this change, including the code, tests, and description. All submitted content was reviewed by a human before submission. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
