Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions pydruid/utils/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ def __init__(self, extraction_function=None, ordering="lexicographic", **args):
self.filter["filter"].update(
{
"dimension": args["dimension"],
"lower": args["lower"],
"lowerStrict": args["lowerStrict"],
"upper": args["upper"],
"upperStrict": args["upperStrict"],
"alphaNumeric": args["alphaNumeric"],
"lower": args.get("lower"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does lower and upper work with None? Per the bound filter documentation it seems these are both optional however there is no default specified.

I think it would be prudent to check if a value of None is equivalent to not providing the key.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked this, and it does not seem to be a problem, and they are equivalent.

Even in the Band class, Previously considered equal. HERE

"lowerStrict": args.get("lowerStrict", False),
"upper": args.get("upper"),
"upperStrict": args.get("upperStrict", False),
"alphaNumeric": args.get("alphaNumeric", False),
"ordering": ordering,
}
)
Expand Down