Skip to content

Commit

Permalink
refactor(ir): remove now obsolete __window_op__ property
Browse files Browse the repository at this point in the history
  • Loading branch information
kszucs authored and cpcloud committed Feb 27, 2024
1 parent 087c007 commit 8d27d14
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 31 deletions.
4 changes: 0 additions & 4 deletions ibis/expr/operations/analytic.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
class Analytic(Value):
shape = ds.columnar

@property
def __window_op__(self):
return self


@public
class ShiftBase(Analytic):
Expand Down
27 changes: 0 additions & 27 deletions ibis/expr/operations/reductions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from public import public

import ibis.common.exceptions as exc
import ibis.expr.datashape as ds
import ibis.expr.datatypes as dt
import ibis.expr.rules as rlz
Expand All @@ -17,11 +16,6 @@
class Reduction(Value):
shape = ds.scalar

# TODO(kszucs): remove this
@property
def __window_op__(self):
return self


# TODO(kszucs): all reductions all filterable so we could remove Filterable
class Filterable(Value):
Expand Down Expand Up @@ -73,16 +67,6 @@ class First(Filterable, Reduction):

dtype = rlz.dtype_like("arg")

@property
def __window_op__(self):
import ibis.expr.operations as ops

if self.where is not None:
raise exc.OperationNotDefinedError(
"FirstValue cannot be filtered in a window context"
)
return ops.FirstValue(arg=self.arg)


@public
class Last(Filterable, Reduction):
Expand All @@ -92,16 +76,6 @@ class Last(Filterable, Reduction):

dtype = rlz.dtype_like("arg")

@property
def __window_op__(self):
import ibis.expr.operations as ops

if self.where is not None:
raise exc.OperationNotDefinedError(
"LastValue cannot be filtered in a window context"
)
return ops.LastValue(arg=self.arg)


@public
class BitAnd(Filterable, Reduction):
Expand Down Expand Up @@ -180,7 +154,6 @@ def dtype(self):
else None,
scale=max(dtype.scale, 2) if dtype.scale is not None else None,
)

else:
raise TypeError(f"Cannot compute sum of {dtype} values")

Expand Down

0 comments on commit 8d27d14

Please sign in to comment.