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 2018/06/15 00:55:56 UTC

[GitHub] john-bodley commented on a change in pull request #5206: [adhoc-filters] Adding adhoc-filters to all viz types

john-bodley commented on a change in pull request #5206: [adhoc-filters] Adding adhoc-filters to all viz types
URL: https://github.com/apache/incubator-superset/pull/5206#discussion_r195611410
 
 

 ##########
 File path: superset/utils.py
 ##########
 @@ -877,8 +877,15 @@ def split_adhoc_filters_into_base_filters(fd):
                     sql_where_filters.append(adhoc_filter.get('sqlExpression'))
                 elif clause == 'HAVING':
                     sql_having_filters.append(adhoc_filter.get('sqlExpression'))
-        fd['where'] = ' AND '.join(['({})'.format(sql) for sql in sql_where_filters])
-        fd['having'] = ' AND '.join(['({})'.format(sql) for sql in sql_having_filters])
-        fd['having_filters'] = simple_having_filters
-        fd['filters'] = simple_where_filters
-        del fd['adhoc_filters']
 
 Review comment:
   Note we can no longer remove the `adhoc_filters` field as we need to ensure that ad-hoc filters persist. Note currently by deleting this field the ad-hoc filters actually get rebuilt on the frontend by merging the legacy and ad-hoc filters.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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