A plain 1 = 0 row filter is not a denial
source: Apache Spark 3.5 — PropagateEmptyRelation optimizer rule
To hide a table from a group on Spark, a Ranger row filter with 1 = 0 looks like the cleanest answer: every query sees no rows, including COUNT(*). I added one on Kyuubi and the test that asserts "analysts are denied on the PII table" started failing, not with a wrong error but with an empty result.
The row filter is injected at analysis as a Filter over the relation. Catalyst's optimizer then runs PropagateEmptyRelation: a filter that folds to false makes its child empty, and the empty child is replaced by a LocalRelation with no rows. The authorization rule that checks table and column privileges runs afterwards and finds no table in the plan. Nothing to check, nothing denied, zero rows returned. A compensating control for one gap had opened a second one.
The predicate has to survive optimization. Catalyst folds constants and simplifies boolean algebra but has no rule for range contradictions, so customer_id < 0 AND customer_id > 0 stays a real filter on a real relation. The privilege check sees the table and denies column reads with the proper error; for COUNT(*) the filter is pushed to the Iceberg scan, file statistics rule every file out, and the count is 0 without reading data. A non-deterministic rand() < 0 would also survive but cannot be pushed down, so it would read the whole table to count nothing.
The rule: a "deny all" predicate must be unprovable to the optimizer, and a security test must assert the kind of refusal it expects. "Raises something" lets an empty result pass as a denial.