

@dispatch((std, var), sql.elements.ColumnElement)
def compute_up(t, s, **kwargs):
    measure = t.schema.measure
    is_timedelta = isinstance(getattr(measure, 'ty', measure), TimeDelta)
    if is_timedelta:
        s = sa.extract('epoch', s)
    if (t.axis != (0,)):
        raise ValueError('axis not equal to 0 not defined for SQL reductions')
    funcname = ('samp' if t.unbiased else 'pop')
    full_funcname = ('%s_%s' % (prefixes[type(t)], funcname))
    ret = getattr(sa.func, full_funcname)(ret)
    if is_timedelta:
        ret = (ret * datetime.timedelta(seconds=1))
    return ret.label(t._name)

dataset/ETHPy150Open blaze/blaze/blaze/compute/sql.py compute_up/VarMisuse@134/189 `s`->`ret`