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

Druid v0.6 compatibility (second try) #4329

Closed
wants to merge 5 commits into from
Closed

Conversation

dimaslv
Copy link

@dimaslv dimaslv commented Feb 2, 2018

These 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.
This is second try for those changes to merge into upstream, first pull request was here #2331.

@xrmx
Copy link
Contributor

xrmx commented Feb 2, 2018

Just a couple of thoughts:

  • any chance that pydruid sqlalchemy dialect already handles that?
  • passing the version as parameter on an object does not look that nice, either storing the version as an attribute in the object or creating a subclass for older apis may look better

@mistercrunch
Copy link
Member

@xrmx doesn't have SQL support at all. I think SQLAlchemy access to druid might require 0.10 or 0.11+ Druid backend

Copy link
Member

@mistercrunch mistercrunch left a comment

Choose a reason for hiding this comment

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

Can we just reference self.cluster.druid_version instead of passing it around?

@@ -207,13 +211,14 @@ def refresh(self, datasource_names, merge_flag, refreshAll):
if datatype == 'hyperUnique' or datatype == 'thetaSketch':
col_obj.count_distinct = True
# Allow sum/min/max for long or double
if datatype == 'LONG' or datatype == 'DOUBLE':
if datatype == 'LONG' or datatype == 'DOUBLE' or datatype == 'FLOAT':
Copy link
Member

Choose a reason for hiding this comment

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

let's use datetype in ('foo', 'bar')

@@ -119,7 +119,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']
if ver is None:
Copy link
Member

Choose a reason for hiding this comment

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

return ver or "0" instead of the 4 lines

@kristw kristw added enhancement:request Enhancement request submitted by anyone from the community inactive Inactive for >= 30 days .database labels Mar 20, 2019
@kristw kristw closed this Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement:request Enhancement request submitted by anyone from the community inactive Inactive for >= 30 days
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants