-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
Adding the MetricsControl to the timeseries_limit_metric field #5118
Adding the MetricsControl to the timeseries_limit_metric field #5118
Conversation
c1b1b17
to
6f05b48
Compare
Codecov Report
@@ Coverage Diff @@
## master #5118 +/- ##
==========================================
+ Coverage 77.46% 77.47% +<.01%
==========================================
Files 44 44
Lines 8730 8740 +10
==========================================
+ Hits 6763 6771 +8
- Misses 1967 1969 +2
Continue to review full report at Codecov.
|
superset/connectors/druid/models.py
Outdated
@@ -1148,6 +1148,11 @@ def run_query( # noqa / druid | |||
metric['column']['type'].upper() == 'FLOAT' | |||
): | |||
metric['column']['type'] = 'DOUBLE' | |||
if ( | |||
utils.is_adhoc_metric(timeseries_limit_metric) and | |||
timeseries_limit_metric['column']['type'].upper() == 'FLOAT' |
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 think you also need to add a version check here, see:
https://github.com/apache/incubator-superset/pull/5030/files
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.
unless this is a different thing?
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.
The version check is happening a few lines above. https://github.com/apache/incubator-superset/pull/5118/files#diff-a8dd5ec8d8decda2e3c5571d1ec0cdb6R1141
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.
O i see
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.
It's almost the exact same code as a few lines above, maybe refactor a sanitize_metric_object
and put as much as possible in there.
[probably out of scope for this PR] I'm starting to think we should make all metrics fit the same model (make predefined metrics look like custom metric objects) as early as possible in the stack and then treat them all the same way.
LGTM aside from the comment--- thanks for doing this! |
Actually, I need to fix an issue with this on the table viz. |
2014edb
to
4946384
Compare
4946384
to
f8d8ec2
Compare
f8d8ec2
to
b380a57
Compare
Sorry for the delay, I fixed the issue with Table viz and addressed PR comments. I created an issue to track the task Max suggested that's out of scope for this PR. @GabeLoins @mistercrunch |
LGTM |
…l_sort_by Adding the MetricsControl to the timeseries_limit_metric field
Making timeseries_limit_metric (sort by) use the MetricsControl.
@GabeLoins