This repository was archived by the owner on Oct 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 523
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ if a serie is the result of a "system" query: it has no name attribute. + a serie can also have no associated tags.
1) cli.query() which now returns a ResultSet, which must be list()ed in order to obtain the list of series. 2) assertListEqual instead of assertDictEqual for a list result. TODO: but now we have to fix the results format.
Other solution is to return the ResultSet instance but then we must adapt all call sites.. To be decided..
@@ -91,14 +91,14 @@ def __len__(self): | |||
def keys(self): | |||
keys = [] | |||
for serie in self._get_series(): | |||
keys.append((serie['name'], serie['tags'])) | |||
keys.append((serie.get('name', None), serie.get('tags', None))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In which cases would name
not be present? Same question for tags
? Is it spec'd that no tags returns an empty list from the InfluxDB API: in which case that missing key should raise an exception instead of returning confusing data (None, None)
, wouldn't you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"system" queries do not return a "name" , and "normal" queries (no "group by tag_name1(, tag_name2, ..)") doesn't return tags either.
NB: it's quite work in progress here ;)
show series show list retention
I'll open a new PR with all the ResultSet code. |
see #154 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I create a PR with this unfinished work because there are certain things we must decide..
Returning a ResultSet from InfluxDbClient.query() is great.
Enabling to get the full list of resulting series from a resultset by doing
list(resultset)
is also great. But we have to clearly define the format of what's returned in the list actually..Enabling to get the full list (eventually filtered by serie name and/or tags values) of resulting points from a resultset using
resultset[key]
is also great. Here thePoint
s are more well defined within influxdb.point now.to be continued..