Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

time_boundary query: Discrepancy between Druid functionality and PyDruid #264

Open
sebtrack opened this issue May 14, 2021 · 1 comment
Open

Comments

@sebtrack
Copy link

According to the docs, there are more valid properties than datasource only:

{
    "queryType" : "timeBoundary",
    "dataSource": "sample_datasource",
    "bound"     : < "maxTime" | "minTime" > # optional, defaults to returning both timestamps if not set
    "filter"    : { "type": "and", "fields": [<filter>, <filter>, ...] } # optional
}

pydruid/pydruid/query.py

Lines 441 to 453 in 98cab4d

def time_boundary(self, args):
"""
A time boundary query returns the min and max timestamps present in a data source.
:param dict args: dict of args
:return: time boundary query
:rtype: Query
"""
query_type = "timeBoundary"
valid_parts = ["datasource"]
self.validate_query(query_type, valid_parts, args)
return self.build_query(query_type, args)

@sebtrack sebtrack changed the title time_boundary query: Discrepancy between druid functionality and PyDruid time_boundary query: Discrepancy between Druid functionality and PyDruid May 14, 2021
@GuidoTournois
Copy link

I guess, since bound and filter are optional, these are not taken into consideration when validating the query

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants