Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
lower=eq,
upper=None,
ordering=cls._get_ordering(is_numeric_col),
)
elif op == "<=":
cond = Bound(
extraction_function=extraction_fn,
dimension=col,
lowerStrict=False,
upperStrict=False,
lower=None,
upper=eq,
ordering=cls._get_ordering(is_numeric_col),
)
elif op == ">":
cond = Bound(
extraction_function=extraction_fn,
lowerStrict=True,
upperStrict=False,
dimension=col,
lower=eq,
upper=None,
ordering=cls._get_ordering(is_numeric_col),
)
elif op == "<":
cond = Bound(
extraction_function=extraction_fn,
upperStrict=True,
lowerStrict=False,
dimension=col,
lower=None,
upper=eq,
)
# For the ops below, could have used pydruid's Bound,
# but it doesn't support extraction functions
elif op == ">=":
cond = Bound(
extraction_function=extraction_fn,
dimension=col,
lowerStrict=False,
upperStrict=False,
lower=eq,
upper=None,
ordering=cls._get_ordering(is_numeric_col),
)
elif op == "<=":
cond = Bound(
extraction_function=extraction_fn,
dimension=col,
lowerStrict=False,
upperStrict=False,
lower=None,
upper=eq,
ordering=cls._get_ordering(is_numeric_col),
)
elif op == ">":
cond = Bound(
extraction_function=extraction_fn,
lowerStrict=True,
upperStrict=False,
dimension=col,
lower=eq,
upper=None,
lower=None,
upper=eq,
ordering=cls._get_ordering(is_numeric_col),
)
elif op == ">":
cond = Bound(
extraction_function=extraction_fn,
lowerStrict=True,
upperStrict=False,
dimension=col,
lower=eq,
upper=None,
ordering=cls._get_ordering(is_numeric_col),
)
elif op == "<":
cond = Bound(
extraction_function=extraction_fn,
upperStrict=True,
lowerStrict=False,
dimension=col,
lower=None,
upper=eq,
ordering=cls._get_ordering(is_numeric_col),
)
elif op == "IS NULL":
cond = Filter(dimension=col, value="")
elif op == "IS NOT NULL":
cond = ~Filter(dimension=col, value="")
if filters:
filters = Filter(type="and", fields=[cond, filters])
else:
fields.append(Dimension(col) == s)
cond = Filter(type="or", fields=fields)
if op == "not in":
cond = ~cond
elif op == "regex":
cond = Filter(
extraction_function=extraction_fn,
type="regex",
pattern=eq,
dimension=col,
)
# For the ops below, could have used pydruid's Bound,
# but it doesn't support extraction functions
elif op == ">=":
cond = Bound(
extraction_function=extraction_fn,
dimension=col,
lowerStrict=False,
upperStrict=False,
lower=eq,
upper=None,
ordering=cls._get_ordering(is_numeric_col),
)
elif op == "<=":
cond = Bound(
extraction_function=extraction_fn,
dimension=col,
lowerStrict=False,
upperStrict=False,
lower=None,
upper=eq,