mirror of
https://github.com/apache/superset.git
synced 2026-04-22 01:24:43 +00:00
committed by
Maxime Beauchemin
parent
13095eb550
commit
485234bc78
@@ -19,6 +19,7 @@ from flask import flash, Markup
|
||||
from flask_appbuilder.security.sqla import models as ab_models
|
||||
from markdown import markdown as md
|
||||
from sqlalchemy.types import TypeDecorator, TEXT
|
||||
from pydruid.utils.having import Having
|
||||
|
||||
|
||||
class CaravelException(Exception):
|
||||
@@ -77,6 +78,18 @@ class memoized(object): # noqa
|
||||
return functools.partial(self.__call__, obj)
|
||||
|
||||
|
||||
class DimSelector(Having):
|
||||
def __init__(self, **args):
|
||||
# Just a hack to prevent any exceptions
|
||||
Having.__init__(self, type='equalTo', aggregation=None, value=None)
|
||||
|
||||
self.having = {'having': {
|
||||
'type': 'dimSelector',
|
||||
'dimension': args['dimension'],
|
||||
'value': args['value'],
|
||||
}}
|
||||
|
||||
|
||||
def list_minus(l, minus):
|
||||
"""Returns l without what is in minus
|
||||
|
||||
|
||||
Reference in New Issue
Block a user