Skip to content

Commit

Permalink
Remove obsolete reducer ops (#3464)
Browse files Browse the repository at this point in the history
WIP for #2562
  • Loading branch information
oleksiyskononenko authored May 17, 2023
1 parent 394daaf commit f0221d6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 27 deletions.
26 changes: 8 additions & 18 deletions src/core/expr/op.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,9 @@ static constexpr size_t UNOP_LAST = 103;
static constexpr size_t BINOP_FIRST = 201;
static constexpr size_t BINOP_LAST = 218;
static constexpr size_t REDUCER_FIRST = 401;
static constexpr size_t REDUCER_LAST = 414;
static constexpr size_t REDUCER_LAST = 407;
static constexpr size_t MATH_FIRST = 501;
static constexpr size_t MATH_LAST = 554;
static constexpr size_t UNOP_COUNT = UNOP_LAST - UNOP_FIRST + 1;
static constexpr size_t BINOP_COUNT = BINOP_LAST - BINOP_FIRST + 1;
static constexpr size_t REDUCER_COUNT = REDUCER_LAST - REDUCER_FIRST + 1;


// The values in this enum must be kept in sync with Python enum OpCodes in
Expand All @@ -63,20 +60,13 @@ enum class Op : size_t {
RSHIFT = 212, // fbinary/bitwise.cc

// Reducers
MEAN = REDUCER_FIRST, // head_reduce_unary.cc
MIN, // head_reduce_unary.cc
MAX, // head_reduce_unary.cc
STDEV, // head_reduce_unary.cc
FIRST, // head_reduce_unary.cc
LAST, // head_reduce_unary.cc
SUM, // head_reduce_unary.cc
COUNT, // head_reduce_unary.cc
COUNT0, // head_reduce_nullary.cc
MEDIAN, // head_reduce_unary.cc
COV, // head_reduce_binary.cc
CORR, // head_reduce_binary.cc
COUNTNA, // head_reduce_unary.cc
NUNIQUE = REDUCER_LAST, // head_reduce_unary.cc
STDEV = REDUCER_FIRST, // head_reduce_unary.cc
FIRST, // head_reduce_unary.cc
LAST, // head_reduce_unary.cc
MEDIAN, // head_reduce_unary.cc
COV, // head_reduce_binary.cc
CORR, // head_reduce_binary.cc
NUNIQUE = REDUCER_LAST, // head_reduce_unary.cc


// Math: trigonometric
Expand Down
16 changes: 7 additions & 9 deletions src/datatable/expr/expr.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,13 @@ class OpCodes(enum.Enum):
RSHIFT = 212

# Reducers
STDEV = 404
FIRST = 405
LAST = 406
COUNT = 408
COUNT0 = 409
MEDIAN = 410
COV = 411
CORR = 412
NUNIQUE = 414
STDEV = 401
FIRST = 402
LAST = 403
MEDIAN = 404
COV = 405
CORR = 406
NUNIQUE = 407

# Math: trigonometric
SIN = 501
Expand Down

0 comments on commit f0221d6

Please sign in to comment.