FrancescoCastaldi commented on PR #43695:
URL: https://github.com/apache/superset/pull/43695#issuecomment-6172013655
### PR Update: Databricks Default Schema Resolution and CLI ASCII Stdout
Test Coverage
Addressing review feedback from @sadpandajoe:
#### Changes Applied (Commit `1a59b994`)
1. **Databricks Catalog Schema Resolution
(`superset/db_engine_specs/databricks.py`)**:
- Preserves existing schema when `catalog` matches the connection's
current catalog with `schema=None` (such as dataset creation with
`catalog="main"` against `/default?catalog=main`).
- Resolves the catalog's default schema (`"default"`) when catalog
switches without an explicit schema, preventing `self.schema = None` and
eliminating invalid reflection queries like ``DESCRIBE TABLE EXTENDED
`main`.`None`.`orders` ``.
2. **Test Suite Expansion for Databricks
(`tests/unit_tests/db_engine_specs/test_databricks.py`)**:
- Updated catalog override assertions to verify resolution of default
schema `"default"`.
- Added test covering dataset creation scenario matching existing URI
catalog with `schema=None`.
3. **CLI Encoding Test Coverage
(`tests/unit_tests/db_engine_specs/test_lint_metadata.py`)**:
- Added `test_main_ascii_stdout_utf8_reconfigure`: mocks `sys.stdout` as
an ASCII `TextIOWrapper` and verifies `main()` reconfigures to UTF-8 without
`UnicodeEncodeError`.
- Added `test_main_ascii_stdout_markdown_report`: verifies `--markdown`
output under ASCII console redirection.
--
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]