Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] Refactor count/countna to use FExpr #3440

Merged
merged 126 commits into from
Apr 22, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
6b1c960
changes to allow more flexibility for reduction operations
samukweku Mar 9, 2023
b79dc27
add countna with additional tests
samukweku Mar 9, 2023
4222481
update countna doc link
samukweku Mar 9, 2023
8cd4106
add count fexpr
samukweku Mar 10, 2023
1be2f5c
add count for all rows
samukweku Mar 10, 2023
4ca61ac
simplify logic choice
samukweku Mar 10, 2023
518b12d
update docs links
samukweku Mar 10, 2023
c8311f3
update code based on feedback
samukweku Mar 11, 2023
fd5311a
cleanup
samukweku Mar 11, 2023
29f5145
updates based on feedback
samukweku Mar 11, 2023
fd878f9
2022 -> 2023 copyright
samukweku Mar 11, 2023
cb94aa9
Remove irrelevant header file
samukweku Mar 11, 2023
a37e3e1
code update with more shortcuts
samukweku Mar 12, 2023
d547533
remove irrelevant header files
samukweku Mar 12, 2023
c693927
code update based on feedback
samukweku Mar 12, 2023
3d0f9d4
add more details for count in docs
samukweku Mar 12, 2023
8270fa2
countna must have an iterable
samukweku Mar 12, 2023
f52a618
add test for void countna
samukweku Mar 12, 2023
18de8cf
update based on feedback
samukweku Mar 13, 2023
83d7e89
defensive steps for empty value
samukweku Mar 13, 2023
5120177
update based on feedback
samukweku Mar 13, 2023
334c698
Update src/core/expr/fexpr_count_countna.cc
samukweku Mar 14, 2023
5f341fa
Update src/core/column/countna.h
samukweku Mar 14, 2023
cba8204
Update src/core/column/countna.h
samukweku Mar 14, 2023
11ced22
Update src/core/column/countna.h
samukweku Mar 14, 2023
0a2f5be
Update docs/api/dt/count.rst
samukweku Mar 14, 2023
8077bba
Update docs/api/dt/count.rst
samukweku Mar 14, 2023
b1c7f98
more descriptive template variables
samukweku Mar 14, 2023
175ed00
single template type for min/max/sum/prod
samukweku Mar 14, 2023
6131f69
count all rows use unary impl
samukweku Mar 14, 2023
ba50e3e
create dummy column for count
samukweku Mar 14, 2023
3cc0ddf
remove whitespace
samukweku Mar 14, 2023
171289b
add countna when cols is None
samukweku Mar 14, 2023
a6ad80c
add more details for count and countna
samukweku Mar 14, 2023
8394ef1
update countna
samukweku Mar 15, 2023
9b297dc
fix countna docs link
samukweku Mar 15, 2023
3f958c9
update counta logic for Frame vs FExpr
samukweku Mar 15, 2023
316a71b
Update src/core/expr/fexpr_count_countna.cc
samukweku Mar 16, 2023
b2c4ea5
Update src/core/expr/fexpr_count_countna.cc
samukweku Mar 16, 2023
0f9e60e
update count_all_rows to avoid dummy col creation
samukweku Mar 17, 2023
e7ad7c1
cast inplace for sumprod
samukweku Mar 18, 2023
22fbcd7
restore cast in place for sumprod
samukweku Mar 18, 2023
6a45afd
add explicit stype to reduce_unary.h
samukweku Mar 19, 2023
254954e
rename template parameter for single type
samukweku Mar 19, 2023
1788438
update code to use FExpr_ReduceUnary
samukweku Mar 24, 2023
c6f65d4
add example for countna when no col is passed
samukweku Mar 25, 2023
120e02f
Update src/core/expr/fexpr_count_countna.cc
samukweku Apr 1, 2023
14a7047
Update src/core/expr/fexpr_count_countna.cc
samukweku Apr 1, 2023
d3266a1
updates based on feedback
samukweku Apr 1, 2023
2436af6
remove xfail for countna
samukweku Apr 1, 2023
5207e67
cleanup
samukweku Apr 1, 2023
88efc58
updates based on feedback
samukweku Apr 1, 2023
fcbdd79
no need to check for gby
samukweku Apr 2, 2023
ac39c5f
fix indent
samukweku Apr 2, 2023
2c567f5
Update docs/api/dt/countna.rst
samukweku Apr 17, 2023
52be77f
focus only on count
samukweku Apr 17, 2023
adf7143
return FExpr
samukweku Apr 17, 2023
109c76f
Update countna.h
samukweku Apr 18, 2023
7770899
Merge branch 'main' into samukweku/fexpr_count_countna
oleksiyskononenko Apr 20, 2023
8b5ac15
changes to allow more flexibility for reduction operations
samukweku Mar 9, 2023
f4c65f0
add countna with additional tests
samukweku Mar 9, 2023
2063dea
update countna doc link
samukweku Mar 9, 2023
e21e08a
add count fexpr
samukweku Mar 10, 2023
633e3b1
add count for all rows
samukweku Mar 10, 2023
6dea1a6
simplify logic choice
samukweku Mar 10, 2023
2a4b4f8
update docs links
samukweku Mar 10, 2023
4502322
update code based on feedback
samukweku Mar 11, 2023
fc4bd05
cleanup
samukweku Mar 11, 2023
42a5cfd
updates based on feedback
samukweku Mar 11, 2023
b85f137
2022 -> 2023 copyright
samukweku Mar 11, 2023
a151dcb
Remove irrelevant header file
samukweku Mar 11, 2023
33e5d01
code update with more shortcuts
samukweku Mar 12, 2023
8200141
remove irrelevant header files
samukweku Mar 12, 2023
ce7e9cd
code update based on feedback
samukweku Mar 12, 2023
b33d8ef
add more details for count in docs
samukweku Mar 12, 2023
ccd27d4
countna must have an iterable
samukweku Mar 12, 2023
6b01148
add test for void countna
samukweku Mar 12, 2023
069a488
update based on feedback
samukweku Mar 13, 2023
957fcdf
defensive steps for empty value
samukweku Mar 13, 2023
fafb095
update based on feedback
samukweku Mar 13, 2023
cea8e29
Update src/core/expr/fexpr_count_countna.cc
samukweku Mar 14, 2023
657beb3
Update src/core/column/countna.h
samukweku Mar 14, 2023
b0a3595
Update src/core/column/countna.h
samukweku Mar 14, 2023
f357edd
Update src/core/column/countna.h
samukweku Mar 14, 2023
cf15fbe
Update docs/api/dt/count.rst
samukweku Mar 14, 2023
8fbeabf
Update docs/api/dt/count.rst
samukweku Mar 14, 2023
729591b
more descriptive template variables
samukweku Mar 14, 2023
6fa2664
single template type for min/max/sum/prod
samukweku Mar 14, 2023
ef9553a
count all rows use unary impl
samukweku Mar 14, 2023
ab846a4
create dummy column for count
samukweku Mar 14, 2023
6499d23
remove whitespace
samukweku Mar 14, 2023
7c3dce0
add countna when cols is None
samukweku Mar 14, 2023
826fadf
add more details for count and countna
samukweku Mar 14, 2023
e6d188b
update countna
samukweku Mar 15, 2023
82fdf49
fix countna docs link
samukweku Mar 15, 2023
1555b5e
update counta logic for Frame vs FExpr
samukweku Mar 15, 2023
20626b2
Update src/core/expr/fexpr_count_countna.cc
samukweku Mar 16, 2023
56fef37
Update src/core/expr/fexpr_count_countna.cc
samukweku Mar 16, 2023
3bca529
update count_all_rows to avoid dummy col creation
samukweku Mar 17, 2023
7da25f2
cast inplace for sumprod
samukweku Mar 18, 2023
2d579f2
restore cast in place for sumprod
samukweku Mar 18, 2023
50d1fad
add explicit stype to reduce_unary.h
samukweku Mar 19, 2023
9d29154
rename template parameter for single type
samukweku Mar 19, 2023
e872a44
update code to use FExpr_ReduceUnary
samukweku Mar 24, 2023
514610f
add example for countna when no col is passed
samukweku Mar 25, 2023
b0c513a
Update src/core/expr/fexpr_count_countna.cc
samukweku Apr 1, 2023
f28e2de
Update src/core/expr/fexpr_count_countna.cc
samukweku Apr 1, 2023
bf71889
updates based on feedback
samukweku Apr 1, 2023
74d5089
remove xfail for countna
samukweku Apr 1, 2023
d852148
cleanup
samukweku Apr 1, 2023
6371cf5
updates based on feedback
samukweku Apr 1, 2023
aa076ac
no need to check for gby
samukweku Apr 2, 2023
a9a45dd
fix indent
samukweku Apr 2, 2023
f53f1c8
Update docs/api/dt/countna.rst
samukweku Apr 17, 2023
dfa017f
focus only on count
samukweku Apr 17, 2023
4f5d071
return FExpr
samukweku Apr 17, 2023
8397a8f
Update countna.h
samukweku Apr 18, 2023
d61ac2e
Various fixes
oleksiyskononenko Apr 21, 2023
27480da
Merge
oleksiyskononenko Apr 21, 2023
39ad7d4
Remove unused files
oleksiyskononenko Apr 21, 2023
7b63805
Restore changes
oleksiyskononenko Apr 21, 2023
c1e75b6
Remove one more unused file
oleksiyskononenko Apr 21, 2023
eb77f2f
More fixes
oleksiyskononenko Apr 21, 2023
2ce4880
Remove unnecessary newline
oleksiyskononenko Apr 21, 2023
74bd5b2
Add some comment
oleksiyskononenko Apr 22, 2023
6818c14
Fixes to docs
oleksiyskononenko Apr 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core/column/reduce_unary.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ReduceUnary_ColumnImpl : public Virtual_ColumnImpl {
protected:
Column col_;
Groupby gby_;

public:
ReduceUnary_ColumnImpl(Column &&col, const Groupby& gby, SType stype_out)
: Virtual_ColumnImpl(gby.size(), stype_out),
Expand Down
2 changes: 0 additions & 2 deletions src/core/expr/fexpr_minmax.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,9 @@ class FExpr_MinMax : public FExpr_ReduceUnary {
case SType::INT16:
return make<int16_t>(std::move(col), gby, is_grouped);
case SType::INT32:
return make<int32_t>(std::move(col), gby, is_grouped);
case SType::DATE32:
return make<int32_t>(std::move(col), gby, is_grouped);
case SType::INT64:
return make<int64_t>(std::move(col), gby, is_grouped);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why this change was introduced, we don't need additional treatment of date32/time64 as internally there are the same as int32/int64.

case SType::TIME64:
return make<int64_t>(std::move(col), gby, is_grouped);
case SType::FLOAT32:
Expand Down