Skip to content

Commit

Permalink
[vdsql-] handle freq-col for sqlite databases
Browse files Browse the repository at this point in the history
  • Loading branch information
anjakefala committed Jul 8, 2023
1 parent c914e74 commit c1a4e15
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion visidata/apps/vdsql/_ibis.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,10 @@ def groupBy(self, groupByCols):

q = self.ibis_current_expr
groupq = q.aggregate(aggr_cols, by=[c.ibis_col for c in groupByCols])
win = ibis.window(order_by=ibis.NA)
try:
win = ibis.window(order_by=ibis.NA)
except ibis.common.exceptions.IbisTypeError: # ibis bug: there is not yet a good workaround that covers all backends
win = ibis.window(order_by=None)
groupq = groupq.mutate(percent=_['count']*100 / _['count'].sum().over(win))

histolen = 40
Expand Down

0 comments on commit c1a4e15

Please sign in to comment.