Skip to content

Commit

Permalink
Made '__' prefix into suffix. (#496)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwalters authored and mistercrunch committed May 20, 2016
1 parent f5180d8 commit 3ee102b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions caravel/models.py
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 3ee102b

Please sign in to comment.