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

feat(expr): support float mul interval #3641

Merged
merged 8 commits into from
Jul 5, 2022
Merged

feat(expr): support float mul interval #3641

merged 8 commits into from
Jul 5, 2022

Conversation

shmiwy
Copy link
Contributor

@shmiwy shmiwy commented Jul 4, 2022

Signed-off-by: Shmiwy wyf000219@126.com

I hereby agree to the terms of the Singularity Data, Inc. Contributor License Agreement.

What's changed and what's your intention?

PLEASE DO NOT LEAVE THIS EMPTY !!!
support these expr

  • float * interval
  • interval * float

Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests
  • All checks passed in ./risedev check (or alias, ./risedev c)

Refer to a related PR or issue link (optional)

#924 #3341

Signed-off-by: Shmiwy <wyf000219@126.com>
@shmiwy shmiwy requested a review from xiangjinwu July 4, 2022 16:25
Signed-off-by: Shmiwy <wyf000219@126.com>
@skyzh
Copy link
Contributor

skyzh commented Jul 4, 2022

LGTM except that some style mismatch, e.g.,

select  interval '1' second * real '61.1'; -> select interval '1' second * real '61.1';
 ----
 00:01:01.1
{interval, float32, interval, interval_float_mul}, -> { interval, float32, interval, interval_float_mul },

Just add / remove spaces to match the style, and add can-merge label. Thanks and good night 🌚

Signed-off-by: Shmiwy <wyf000219@126.com>
Shmiwy added 2 commits July 5, 2022 01:28
Signed-off-by: Shmiwy <wyf000219@126.com>
Signed-off-by: Shmiwy <wyf000219@126.com>
@shmiwy
Copy link
Contributor Author

shmiwy commented Jul 4, 2022

The previous implementation for IntervalUnit's Display had a problem that it didn't handle padding when decimals were present. So it displayed "00:00:1.1" instead of "00:00:01.1". 😰

Shmiwy added 3 commits July 5, 2022 03:07
Signed-off-by: Shmiwy <wyf000219@126.com>
Signed-off-by: Shmiwy <wyf000219@126.com>
Signed-off-by: Shmiwy <wyf000219@126.com>
@codecov
Copy link

codecov bot commented Jul 5, 2022

Codecov Report

Merging #3641 (8f7f433) into main (ab28ce1) will decrease coverage by 0.01%.
The diff coverage is 23.52%.

@@            Coverage Diff             @@
##             main    #3641      +/-   ##
==========================================
- Coverage   74.39%   74.37%   -0.02%     
==========================================
  Files         776      776              
  Lines      110134   110163      +29     
==========================================
+ Hits        81931    81935       +4     
- Misses      28203    28228      +25     
Flag Coverage Δ
rust 74.37% <23.52%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/expr/src/expr/expr_binary_nonnull.rs 84.00% <ø> (ø)
src/expr/src/vector_op/arithmetic_op.rs 53.39% <0.00%> (-2.73%) ⬇️
src/common/src/types/interval.rs 76.99% <38.09%> (-2.82%) ⬇️
src/meta/src/model/barrier.rs 86.66% <0.00%> (-3.34%) ⬇️
src/storage/src/hummock/iterator/merge_inner.rs 89.37% <0.00%> (-0.63%) ⬇️
src/meta/src/barrier/mod.rs 79.87% <0.00%> (-0.21%) ⬇️
src/common/src/types/ordered_float.rs 24.90% <0.00%> (+0.19%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@mergify mergify bot merged commit c3a17ce into risingwavelabs:main Jul 5, 2022
@shmiwy shmiwy deleted the float_mul_interval branch July 5, 2022 01:01
@shmiwy shmiwy restored the float_mul_interval branch July 5, 2022 01:01
@shmiwy shmiwy deleted the float_mul_interval branch July 5, 2022 01:01
nasnoisaac pushed a commit to nasnoisaac/risingwave that referenced this pull request Aug 9, 2022
* feat(expr): support float mul interval

Signed-off-by: Shmiwy <wyf000219@126.com>

* feat(expr): support float mul interval

Signed-off-by: Shmiwy <wyf000219@126.com>

* feat(expr): support float mul interval

Signed-off-by: Shmiwy <wyf000219@126.com>

* feat(expr): support float mul interval

Signed-off-by: Shmiwy <wyf000219@126.com>

* feat(expr): Modify the Display implementation of IntervalUnit

Signed-off-by: Shmiwy <wyf000219@126.com>

* feat(expr): support float mul interval

Signed-off-by: Shmiwy <wyf000219@126.com>

* feat(expr): Modify the Display implementation of IntervalUnit

Signed-off-by: Shmiwy <wyf000219@126.com>

* feat(expr): Modify the Display implementation of IntervalUnit

Signed-off-by: Shmiwy <wyf000219@126.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants