sha174n opened a new pull request, #41426: URL: https://github.com/apache/superset/pull/41426
### SUMMARY `get_predicates_for_table` matched a dataset's `catalog` with a null fallback (a dataset stored with a null catalog is matched when the query resolves to the default catalog), but matched `schema` with strict equality. This makes the schema match consistent with the catalog match: when the query resolves to the database's default schema, a dataset stored with a null schema is also matched, so the lookup finds it instead of returning nothing. Datasets can legitimately have a null schema (e.g. registered via the dataset API without a schema, or on engines that don't report one). ### TESTING INSTRUCTIONS ``` cd superset && pytest tests/unit_tests/sql_lab_test.py -k get_predicates_for_table ``` Adds two unit tests: a null-schema dataset is matched at the default schema; a non-default schema stays a strict match. ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API -- 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]
