-
Notifications
You must be signed in to change notification settings - Fork 308
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
feat!: remove tumble
function
#4367
Conversation
WalkthroughThe Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (10)
- src/flow/src/compute/render/reduce.rs (1 hunks)
- src/flow/src/expr/func.rs (5 hunks)
- src/flow/src/expr/scalar.rs (1 hunks)
- src/flow/src/expr/signature.rs (1 hunks)
- src/flow/src/transform.rs (2 hunks)
- src/flow/src/transform/aggr.rs (13 hunks)
- src/flow/src/transform/expr.rs (2 hunks)
- src/flow/src/transform/plan.rs (3 hunks)
- tests/cases/standalone/common/flow/basic.result (1 hunks)
- tests/cases/standalone/common/flow/basic.sql (1 hunks)
Files skipped from review due to trivial changes (3)
- src/flow/src/compute/render/reduce.rs
- src/flow/src/expr/signature.rs
- src/flow/src/transform/expr.rs
Additional comments not posted (13)
tests/cases/standalone/common/flow/basic.sql (1)
Line range hint
1-24
:
LGTM!The SQL commands are correctly updated to use the
date_trunc
function instead of thetumble
function.tests/cases/standalone/common/flow/basic.result (1)
Line range hint
1-36
:
LGTM!The expected results are correctly updated to reflect the changes in
basic.sql
.src/flow/src/transform/plan.rs (1)
Line range hint
1-81
:
LGTM!The code is correctly updated to remove references to the
tumble
function and related logic.src/flow/src/transform.rs (1)
149-150
: LGTM!The code is correctly updated to remove references to the
tumble
function and related logic.src/flow/src/expr/func.rs (1)
70-74
: LGTM! But verify the enum usage in the codebase.The removal of the
TumbleWindow
variant from theUnmaterializableFunc
enum and the update to thefrom_str_args
method are consistent with the objective of removing thetumble
function and its related code.However, ensure that all references to this variant have been removed or updated accordingly.
Verification successful
Verification Complete: No issues found.
The removal of the
TumbleWindow
variant from theUnmaterializableFunc
enum has been successfully completed. There are no remaining references toTumbleWindow
in the codebase.
- No occurrences of
UnmaterializableFunc::TumbleWindow
found.- The
UnmaterializableFunc
references are related to other variants and are intact.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all references to `UnmaterializableFunc::TumbleWindow` have been removed or updated. # Test: Search for the enum variant usage. Expect: No occurrences of the variant. rg --type rust -A 5 $'UnmaterializableFunc::TumbleWindow'Length of output: 56
Script:
#!/bin/bash # Description: Verify all references to `TumbleWindow` have been removed or updated. # Test 1: Search for any references to `TumbleWindow` in the codebase. Expect: No occurrences of the variant. rg --type rust -A 5 $'TumbleWindow' # Test 2: Search for any references to `UnmaterializableFunc` to ensure all variants are accounted for. Expect: No references to `TumbleWindow`. rg --type rust -A 5 $'UnmaterializableFunc'Length of output: 9478
src/flow/src/transform/aggr.rs (8)
316-316
: Verify the impact of settingtime_index
toNone
.The
time_index
variable is now set toNone
. Ensure that this change does not affect the functionality of theTypedPlan::from_substrait_agg_rel
function and related components.
Line range hint
450-550
:
LGTM!The
test_df_func_basic
test function appears comprehensive and covers various cases.
Line range hint
556-647
:
LGTM!The
test_df_func_expr_tree
test function appears comprehensive and covers various cases.
Line range hint
649-715
:
LGTM!The
test_avg_group_by
test function appears comprehensive and covers various cases.
Line range hint
717-775
:
LGTM!The
test_avg
test function appears comprehensive and covers various cases.
Line range hint
777-835
:
LGTM!The
test_sum
test function appears comprehensive and covers various cases.
Line range hint
837-899
:
LGTM!The
test_sum_group_by
test function appears comprehensive and covers various cases.
Line range hint
901-961
:
LGTM!The
test_sum_add
test function appears comprehensive and covers various cases.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4367 +/- ##
==========================================
- Coverage 85.15% 84.79% -0.36%
==========================================
Files 1063 1063
Lines 189987 189043 -944
==========================================
- Hits 161782 160298 -1484
- Misses 28205 28745 +540 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
test.log
is excluded by!**/*.log
Files selected for processing (11)
- flow.ans (1 hunks)
- src/flow/src/compute/render/reduce.rs (1 hunks)
- src/flow/src/expr/func.rs (5 hunks)
- src/flow/src/expr/scalar.rs (1 hunks)
- src/flow/src/expr/signature.rs (1 hunks)
- src/flow/src/transform.rs (2 hunks)
- src/flow/src/transform/aggr.rs (13 hunks)
- src/flow/src/transform/expr.rs (2 hunks)
- src/flow/src/transform/plan.rs (3 hunks)
- tests/cases/standalone/common/flow/basic.result (1 hunks)
- tests/cases/standalone/common/flow/basic.sql (1 hunks)
Files skipped from review due to trivial changes (4)
- src/flow/src/compute/render/reduce.rs
- src/flow/src/expr/scalar.rs
- src/flow/src/expr/signature.rs
- src/flow/src/transform/expr.rs
Additional comments not posted (9)
tests/cases/standalone/common/flow/basic.sql (1)
Line range hint
1-18
: Ensure alignment with newdate_bin
function.The SQL commands for table creation, data insertion, and selection should align with the new
date_bin
function. Verify that the changes accurately reflect the removal of thetumble
function and the introduction of thedate_bin
function.tests/cases/standalone/common/flow/basic.result (1)
Line range hint
1-71
: Ensure alignment with newdate_bin
function.The expected results should align with the new
date_bin
function. Verify that the changes accurately reflect the removal of thetumble
function and the introduction of thedate_bin
function.flow.ans (1)
1-105
: Ensure alignment with newdate_bin
function.The compilation and test results should align with the new
date_bin
function. Verify that the changes accurately reflect the removal of thetumble
function and the introduction of thedate_bin
function.src/flow/src/transform/plan.rs (1)
81-81
: Ensure alignment with newdate_bin
function.The Rust code should align with the new
date_bin
function. Verify that the changes accurately reflect the removal of thetumble
function and the introduction of thedate_bin
function.src/flow/src/transform.rs (1)
149-150
: Placeholder for custom functions.The placeholder comment indicates that custom functions can be added here in the future.
src/flow/src/expr/func.rs (2)
70-74
: RemovedTumbleWindow
variant fromUnmaterializableFunc
enum.The removal simplifies the enum and aligns with the PR objectives.
74-79
: RemovedTumbleWindowFloor
andTumbleWindowCeiling
variants fromUnaryFunc
enum.The removal simplifies the enum and aligns with the PR objectives.
src/flow/src/transform/aggr.rs (2)
312-316
: Removedfind_time_index_in_group_exprs
function call.The removal simplifies the function and aligns with the PR objectives.
Line range hint
450-550
:
Removedtest_tumble_group_by
function.The removal aligns with the removal of the
tumble
function and simplifies the test suite.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* feat!: remove `tumble` function * chore: forget to rm log file
Will wait for #4347 to merge first and rebase on it since same files are modified in both PR |
Close due to change of plan, will fix |
I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
What's changed and what's your intention?
Remove
tumble
function which is buggy and caused many problem, the function is replaced bydate_bin
function instead:tumble
function and related teststumble
functions workChecklist
Summary by CodeRabbit
Refactor
TumbleWindow
related variants and methods from functions, enums, and structs.TypedPlan
.Bug Fixes
Chores
TumbleWindow
across multiple files.