Skip to content

Commit

Permalink
[bugfix] columns dupplicated in Druid df
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Jan 12, 2016
1 parent 552a309 commit 299ad09
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion panoramix/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def __init__(self, viz):
choices=self.choicify(
[10, 50, 100, 250, 500, 1000, 5000, 10000, 50000])),
'limit':
SelectField(
FreeFormSelectField(
'Series limit',
choices=self.choicify(self.series_limits),
default=50,
Expand Down
2 changes: 1 addition & 1 deletion panoramix/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,7 @@ def query(
cols += ['timestamp']
cols += [col for col in groupby if col in df.columns]
cols += [col for col in metrics if col in df.columns]
cols += [col for col in df.columns if col in cols]
cols += [col for col in df.columns if col not in cols]
df = df[cols]
return QueryResult(
df=df,
Expand Down
1 change: 1 addition & 0 deletions panoramix/static/widgets/viz_table.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ px.registerViz('table', function(slice) {
paging: false,
searching: form_data.include_search,
});
slice.container.find('.tooltip').remove();
// Sorting table by main column
if (form_data.metrics.length > 0) {
var main_metric = form_data.metrics[0];
Expand Down
4 changes: 2 additions & 2 deletions panoramix/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ class NVD3TimeSeriesViz(NVD3Viz):
'description': (
"This section contains options "
"that allow for advanced analytical post processing "
"of query reults"),
"of query results"),
'fields': (
('rolling_type', 'rolling_periods'),
'time_compare',
Expand Down Expand Up @@ -677,7 +677,7 @@ def get_df(self, query_obj=None):
num_period_compare = form_data.get("num_period_compare")
if num_period_compare:
num_period_compare = int(num_period_compare)
df = df / df.shift(num_period_compare)
df = (df / df.shift(num_period_compare)) - 1
df = df[num_period_compare:]

rolling_periods = form_data.get("rolling_periods")
Expand Down

0 comments on commit 299ad09

Please sign in to comment.