From 8ffafbf13079c33a972ac7d0c45deac30d7e8731 Mon Sep 17 00:00:00 2001 From: Josh Walters Date: Thu, 19 May 2016 11:26:02 -0700 Subject: [PATCH] Made '__' prefix into suffix. --- caravel/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/caravel/models.py b/caravel/models.py index cb9577bf7a1ee..7f216ed45d25a 100644 --- a/caravel/models.py +++ b/caravel/models.py @@ -629,7 +629,7 @@ def query( # sqla for s in groupby: col = cols[s] outer = col.sqla_col - inner = col.sqla_col.label('__' + col.column_name) + inner = col.sqla_col.label(col.column_name + '__') groupby_exprs.append(outer) select_exprs.append(outer) @@ -715,7 +715,7 @@ def query( # sqla on_clause = [] for i, gb in enumerate(groupby): on_clause.append( - groupby_exprs[i] == column("__" + gb)) + groupby_exprs[i] == column(gb + '__')) tbl = tbl.join(subq.alias(), and_(*on_clause))