sha174n opened a new pull request, #43993: URL: https://github.com/apache/superset/pull/43993
On databases that fold unquoted identifiers (for example PostgreSQL lowercases them), a table referenced with different letter-casing resolves to the same physical table. `get_predicates_for_table` compared the referenced table name to the registered dataset name case-sensitively, so a mismatched-case reference matched no dataset and had no row-level-security predicates injected for that reference. This adds a case-insensitive fallback in the RLS predicate lookup, gated on whether the engine folds unquoted identifiers (determined via sqlglot dialect normalization). The fallback runs only when the exact match misses and only accepts a single unambiguous dataset, so the exact (case-sensitive) match always takes precedence and existing matches are unchanged. On case-sensitive engines the exact match is kept as-is. Adds a unit test for the engine-folding gate and an integration test asserting that a case-mismatched table reference yields the same RLS predicates as the exact-case reference. -- 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]
