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: implement function split_part #2822

Merged
merged 19 commits into from
May 27, 2022
Merged

Conversation

alissa-tung
Copy link
Contributor

@alissa-tung alissa-tung commented May 25, 2022

What's changed and what's your intention?

implement split_part

Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests

Refer to a related PR or issue link (optional)

#2791
meta #112

@CLAassistant
Copy link

CLAassistant commented May 26, 2022

CLA assistant check
All committers have signed the CLA.

@alissa-tung alissa-tung marked this pull request as ready for review May 26, 2022 04:09
src/expr/src/expr/expr_split_part.rs Outdated Show resolved Hide resolved
src/frontend/src/expr/function_call.rs Outdated Show resolved Hide resolved
@alissa-tung
Copy link
Contributor Author

alissa-tung commented May 26, 2022

cc @TennyZhuang @skyzh @xiangjinwu

rust-toolchain Outdated Show resolved Hide resolved
src/common/src/array/mod.rs Show resolved Hide resolved
src/expr/src/expr/expr_split_part.rs Outdated Show resolved Hide resolved
src/expr/src/expr/expr_split_part.rs Outdated Show resolved Hide resolved
src/frontend/src/expr/function_call.rs Outdated Show resolved Hide resolved
src/frontend/test_runner/tests/testdata/expr.yaml Outdated Show resolved Hide resolved
src/expr/src/expr/expr_split_part.rs Outdated Show resolved Hide resolved
@alissa-tung alissa-tung force-pushed the main branch 2 times, most recently from aa1fd66 to 25206f9 Compare May 27, 2022 01:14
@alissa-tung alissa-tung requested a review from xiangjinwu May 27, 2022 01:46
Copy link
Contributor

@xiangjinwu xiangjinwu left a comment

Choose a reason for hiding this comment

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

Nice work! Just some minor things:

src/expr/src/vector_op/split_part.rs Outdated Show resolved Hide resolved
src/expr/src/vector_op/split_part.rs Outdated Show resolved Hide resolved
src/expr/src/vector_op/split_part.rs Outdated Show resolved Hide resolved
src/expr/src/vector_op/split_part.rs Outdated Show resolved Hide resolved
src/expr/src/vector_op/split_part.rs Show resolved Hide resolved
src/expr/src/vector_op/split_part.rs Show resolved Hide resolved
src/frontend/test_runner/tests/testdata/expr.yaml Outdated Show resolved Hide resolved
@xiangjinwu xiangjinwu added the user-facing-changes Contains changes that are visible to users label May 27, 2022
@alissa-tung alissa-tung requested a review from xiangjinwu May 27, 2022 05:31
@alissa-tung alissa-tung changed the title bif: split_part feat: implement function split_part May 27, 2022
@xiangjinwu
Copy link
Contributor

https://github.com/singularity-data/risingwave/runs/6621101096?check_suite_focus=true#step:10:65

error: unresolved link to `crate::expr::type_inference::build_type_derive_map`
  --> src/frontend/src/expr/function_call.rs:93:21
   |
93 |     /// [elsewhere](crate::expr::type_inference::build_type_derive_map).
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no item named `type_inference` in module `expr`
   |
note: the lint level is defined here
  --> src/frontend/src/lib.rs:26:9
   |
26 | #![deny(rustdoc::broken_intra_doc_links)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: could not document `risingwave_frontend`

@alissa-tung
Copy link
Contributor Author

https://github.com/singularity-data/risingwave/runs/6621101096?check_suite_focus=true#step:10:65

error: unresolved link to `crate::expr::type_inference::build_type_derive_map`
  --> src/frontend/src/expr/function_call.rs:93:21
   |
93 |     /// [elsewhere](crate::expr::type_inference::build_type_derive_map).
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no item named `type_inference` in module `expr`
   |
note: the lint level is defined here
  --> src/frontend/src/lib.rs:26:9
   |
26 | #![deny(rustdoc::broken_intra_doc_links)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: could not document `risingwave_frontend`

https://github.com/singularity-data/risingwave/runs/6621101096?check_suite_focus=true#step:10:65

error: unresolved link to `crate::expr::type_inference::build_type_derive_map`
  --> src/frontend/src/expr/function_call.rs:93:21
   |
93 |     /// [elsewhere](crate::expr::type_inference::build_type_derive_map).
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no item named `type_inference` in module `expr`
   |
note: the lint level is defined here
  --> src/frontend/src/lib.rs:26:9
   |
26 | #![deny(rustdoc::broken_intra_doc_links)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: could not document `risingwave_frontend`

@xiangjinwu

I thought it is caused by visibility.
c3ce096
workaround

@xiangjinwu
Copy link
Contributor

I thought it is caused by visibility. c3ce096 workaround

Yes it is due to visibility. But we should not make things pub simply for references in docs. As the references are for developers updating the code rather than calling the code, maybe they should not be part of public doc. (i.e. use // rather than /// for parts explaining type inference vs FunctionCall new)

@codecov
Copy link

codecov bot commented May 27, 2022

Codecov Report

Merging #2822 (7375f4b) into main (97a7247) will decrease coverage by 0.00%.
The diff coverage is 70.86%.

@@            Coverage Diff             @@
##             main    #2822      +/-   ##
==========================================
- Coverage   72.66%   72.65%   -0.01%     
==========================================
  Files         701      702       +1     
  Lines       92185    92310     +125     
==========================================
+ Hits        66983    67072      +89     
- Misses      25202    25238      +36     
Flag Coverage Δ
rust 72.65% <70.86%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
src/common/src/array/mod.rs 73.02% <ø> (ø)
src/common/src/error.rs 69.37% <0.00%> (+0.11%) ⬆️
src/expr/src/expr/expr_ternary_bytes.rs 79.48% <0.00%> (-9.09%) ⬇️
src/expr/src/expr/mod.rs 47.72% <0.00%> (-1.11%) ⬇️
src/expr/src/expr/build_expr_from_prost.rs 66.44% <18.51%> (-3.07%) ⬇️
src/expr/src/vector_op/split_part.rs 95.34% <95.34%> (ø)
src/expr/src/vector_op/replace.rs 100.00% <100.00%> (ø)
src/frontend/src/binder/expr/function.rs 81.29% <100.00%> (+0.13%) ⬆️
src/frontend/src/expr/function_call.rs 99.37% <100.00%> (+0.01%) ⬆️
src/frontend/src/expr/type_inference.rs 98.86% <100.00%> (+<0.01%) ⬆️
... and 4 more

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

@alissa-tung
Copy link
Contributor Author

I thought it is caused by visibility. c3ce096 workaround

Yes it is due to visibility. But we should not make things pub simply for references in docs. As the references are for developers updating the code rather than calling the code, maybe they should not be part of public doc. (i.e. use // rather than /// for parts explaining type inference vs FunctionCall new)

ok. I am going to revert that commit and use double for now

@alissa-tung
Copy link
Contributor Author

cc @xiangjinwu done

Copy link
Contributor

@xiangjinwu xiangjinwu left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution!

@xiangjinwu xiangjinwu merged commit a17c4b4 into risingwavelabs:main May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
user-facing-changes Contains changes that are visible to users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants