bito-code-review[bot] commented on code in PR #41580:
URL: https://github.com/apache/superset/pull/41580#discussion_r3504386702


##########
superset/daos/datasource.py:
##########
@@ -130,6 +148,21 @@ def build_dataset_query(
         if database_id is not None:
             ds_q = ds_q.where(SqlaTable.database_id == database_id)
 
+        if schema_filter is not None:
+            ds_q = ds_q.where(SqlaTable.schema == schema_filter)
+
+        if owners_filter is not None:
+            ds_q = ds_q.join(
+                sqla_models.sqlatable_user,
+                sqla_models.sqlatable_user.c.table_id == ds_table.c.id,
+            ).where(sqla_models.sqlatable_user.c.user_id.in_(owners_filter))
+
+        if changed_by_filter is not None:
+            ds_q = ds_q.where(ds_table.c.changed_by_fk == changed_by_filter)
+
+        if certified_filter is not None:
+            ds_q = _apply_certified_filter(ds_q, certified_filter)

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Missing unit tests for certified filter</b></div>
   <div id="fix">
   
   No DAO-level unit tests exist for `_apply_certified_filter` or 
`build_dataset_query` with `certified_filter`. Existing tests in `list_test.py` 
only verify filter parsing, not the actual SQL query generation. Per project 
guidelines, new features should have tests covering success paths, error 
scenarios, validation failures, and edge cases.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #137a17</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a 
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



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