michaelmorera-preset commented on PR #39725:
URL: https://github.com/apache/superset/pull/39725#issuecomment-4447674461

   ✅ **Pass.** The RLS predicate gender = 'boy' appears **exactly once**, 
wrapping the virtual table. That's the expected behavior, the duplication bug 
is fixed.
   
   ## Steps
   1. Sign in to Superset as an Admin user.
   2. Create a physical dataset: Datasets → + DATASET → choose Database 
examples, Schema public (or main for SQLite), Table birth_names → ADD DATASET 
AND CREATE CHART, then close the chart explorer.
   3. Confirm birth_names appears under Datasets with type Physical.
   4. Add an RLS rule: Settings → Row Level Security → + RULE — name 
rls-test-birth-names, Filter type Regular, Tables birth_names only, Clause 
`gender = 'boy'` (roles as needed for your version) → save.
   5. Edit birth_names → SOURCE tab → switch Physical to Virtual, SQL `SELECT * 
FROM birth_names` → SAVE and confirm the warning; reopen and confirm type 
Virtual and SQL is shown.
   6. Open birth_names from Datasets into Explore, configure a simple chart 
(e.g. Table, aggregate mode, metric COUNT(*), optional dimension name) → CREATE 
CHART / RUN.
   7. Open the chart panel ⋯ menu → View query and inspect the SQL.
   
   ## Current result
   After step 3, birth_names is listed as a Physical dataset.
   After step 4, the RLS rule rls-test-birth-names is saved and scoped to 
birth_names with clause `gender = 'boy'`.
   After step 5, the dataset is Virtual and the source SQL is `SELECT * FROM 
birth_names`.
   After step 7, the viewed query includes the RLS predicate (e.g. filter on 
`gender = 'boy'`) as expected for the virtual dataset, just once (**NOT 
TWICE**).
   
   ## Evidence
   ### Rule
   <img width="1918" height="999" alt="image" 
src="https://github.com/user-attachments/assets/5d0c6593-23d4-4e96-81ca-cf3d3a992d91";
 />
   
   ### Chart View Query
   <img width="1918" height="999" alt="image" 
src="https://github.com/user-attachments/assets/cc6caab5-ec00-4178-9800-70de2665a086";
 />
   


-- 
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]

Reply via email to