You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/12/02 19:49:24 UTC

[GitHub] [incubator-superset] betodealmeida commented on a change in pull request #8714: [fix] Druid IS NULL/IS NOT NULL filters

betodealmeida commented on a change in pull request #8714: [fix] Druid IS NULL/IS NOT NULL filters
URL: https://github.com/apache/incubator-superset/pull/8714#discussion_r352794274
 
 

 ##########
 File path: superset/connectors/druid/models.py
 ##########
 @@ -1559,9 +1559,9 @@ def get_filters(cls, raw_filters, num_cols, columns_dict) -> "Filter":
                     alphaNumeric=is_numeric_col,
                 )
             elif op == "IS NULL":
-                cond = Dimension(col) is None
+                cond = Filter(dimension=col, value="")
             elif op == "IS NOT NULL":
-                cond = Dimension(col) is not None
+                cond = ~Filter(dimension=col, value="")
 
 Review comment:
   `~` is bitwise complement. You want to use `not Filter(dimension=col, value="")` instead, no?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org