korbit-ai[bot] commented on code in PR #33296:
URL: https://github.com/apache/superset/pull/33296#discussion_r2068206760


##########
superset/jinja_context.py:
##########
@@ -378,7 +378,15 @@ def get_filters(self, column: str, remove_filter: bool = 
False) -> list[Filter]:
                 flt.get("expressionType") == "SIMPLE"
                 and flt.get("clause") == "WHERE"
                 and flt.get("subject") == column
-                and val
+                and (
+                    val
+                    or
+                    # IS_NULL and IS_NOT_NULL operators do not have a value
+                    op in (
+                        FilterOperator.IS_NULL.value,
+                        FilterOperator.IS_NOT_NULL.value,
+                    )
+                )

Review Comment:
   ### Unclear Boolean Expression Layout <sub>![category 
Readability](https://img.shields.io/badge/Readability-0284c7)</sub>
   
   <details>
     <summary>Tell me more</summary>
   
   ###### What is the issue?
   The boolean expression is split across multiple lines in a way that makes it 
harder to read, with the 'or' operator dangling on its own line.
   
   ###### Why this matters
   Having logical operators on separate lines makes it difficult to quickly 
scan and understand the boolean logic flow.
   
   ###### Suggested change ∙ *Feature Preview*
                   and (val or op in (FilterOperator.IS_NULL.value,
                                       FilterOperator.IS_NOT_NULL.value))
   
   
   ###### Provide feedback to improve future suggestions
   [![Nice 
Catch](https://img.shields.io/badge/👍%20Nice%20Catch-71BC78)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/ef624ee1-cf95-4a89-aefc-088e71c0d560/upvote)
 
[![Incorrect](https://img.shields.io/badge/👎%20Incorrect-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/ef624ee1-cf95-4a89-aefc-088e71c0d560?what_not_true=true)
  [![Not in 
Scope](https://img.shields.io/badge/👎%20Out%20of%20PR%20scope-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/ef624ee1-cf95-4a89-aefc-088e71c0d560?what_out_of_scope=true)
 [![Not in coding 
standard](https://img.shields.io/badge/👎%20Not%20in%20our%20standards-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/ef624ee1-cf95-4a89-aefc-088e71c0d560?what_not_in_standard=true)
 
[![Other](https://img.shields.io/badge/👎%20Other-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/ef624ee1-cf95-4a89-aefc-088e71c0d560)
   </details>
   
   <sub>
   
   💬 Looking for more details? Reply to this comment to chat with Korbit.
   </sub>
   
   <!--- korbi internal id:f4c9329f-377e-495a-b4f2-343d9cf51807 -->
   
   
   [](f4c9329f-377e-495a-b4f2-343d9cf51807)



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