-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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
Druid v0.6 compatibility #2331
Druid v0.6 compatibility #2331
Conversation
@@ -1661,7 +1661,11 @@ def get_druid_version(self): | |||
endpoint = ( | |||
"http://{obj.coordinator_host}:{obj.coordinator_port}/status" | |||
).format(obj=self) | |||
return json.loads(requests.get(endpoint).text)['version'] | |||
ver = json.loads(requests.get(endpoint).text)['version'] |
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.
I'd prefer an approach where we can specify the druid_version
as a configuration element. I would have to be associated with the DruidCluster model. Here we'd use the information defined manually and fallback on this current approach when not specified.
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.
My programmer skills are quite weak and my knowledge about superset architecture is even more weak. Can you point me on how do I do that? Or maybe you can help me by coding this?
superset/models.py
Outdated
json=json.dumps({ | ||
'type': mt, 'name': name, 'fieldName': self.column_name}) | ||
)) | ||
if ver > '0': |
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.
I'd rather take an approach like < '0.7.'
here
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.
Fixed in 9e5678d
superset/models.py
Outdated
'name': name, | ||
'fn': '/', | ||
'fields': [ | ||
{ 'type': 'fieldAccess', 'fieldName': 'sum__' + self.column_name }, |
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.
Lint:
no space after {
no space before }
80 char max
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.
Fixed in 18ba45b
Wouldn't it make more sense for this logic to be handled in pydruid? |
I don't know anything about pydruid, but actually I don't see any "*avg" aggregations in latest Druid at all, so it's strange that you use such aggregation in you code. Could you explain please? |
There's been merge conflicts for a long time, feel free to re-open once conflicts are sorted out. |
As I have not received answers to my questions for 5 months, I assume that you are not interested in those patches. Once anyone will speak to me again I will try to resume my work. |
Sorry it's hard to keep up with so many PRs, hopefully we can ramp up more committers/maintainers soon. |
These two commits allowed me to set up latest superset with our company's Druid v0.6 cluster. I have tried not to break anything for any newer versions.