Skip to content

Commit

Permalink
Made '__' prefix into suffix.
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwalters committed May 19, 2016
1 parent f5180d8 commit 8ffafbf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions caravel/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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))

Expand Down

0 comments on commit 8ffafbf

Please sign in to comment.