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 from start #472

Merged
merged 9 commits into from
Mar 6, 2023

Conversation

allensuvorov
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #445

Problem Summary

The function is used to scan the source JSON path from left to right, split it into an array of two sub-strings from the given numeric position of the character, and assign the array to a target JSON path. The character of the position should be included in the first sub-string (from left to right).

What is changed and how does it work?

  • added the constructor for that function
  • the implementation of the function
  • unit tests for that function

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

@xdlbdy xdlbdy changed the title Function split from start feat: implement function split from start Mar 4, 2023
c0d33ngr and others added 4 commits March 6, 2023 18:23
* Create replace_between_delimiters_action function

* Add function for replace_between_delimiters

* Add test case for replace_between_delimiters function

* Register replace_between_delimiters function in init.go file

* Fix syntax error in strings_function

* Update replace_between_delimiters function to catch wide range of inputs

* Update unit test for replace_between_delimiters function

* Remove typos from contributing file

* Improve replace_between_delimiter function

* Add new testcase for replace_between_delimiters function

* Fix and refactor replace_between_delimiter function

* Update replace_between_delimiters_test

* Resolve bug in replace_between_delimiter function

* Fix bug in switch case for replace_between_delimiters

* Fix replace_between_delimiters to pass codecov and golangci-lint checks

* Refactor replace_between_delimiters function
* feat: implement function split_between_positions

* minor: fix linting errors

* minor: fix linting errors

* feat: implement split between position according to new description

* minor: fix linting errors
@codecov
Copy link

codecov bot commented Mar 6, 2023

Codecov Report

Merging #472 (ee76217) into main (2a78cb5) will decrease coverage by 0.64%.
The diff coverage is 44.24%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #472      +/-   ##
==========================================
- Coverage   57.71%   57.07%   -0.64%     
==========================================
  Files         180      190      +10     
  Lines       14614    15191     +577     
==========================================
+ Hits         8434     8670     +236     
- Misses       5552     5884     +332     
- Partials      628      637       +9     
Impacted Files Coverage Δ
...ernal/controller/trigger/validation/subscripton.go 69.29% <ø> (+0.85%) ⬆️
internal/gateway/proxy/deadletter.go 0.00% <0.00%> (ø)
internal/gateway/proxy/direct.go 73.33% <0.00%> (-5.24%) ⬇️
.../primitive/interceptor/memberinterceptor/member.go 0.00% <0.00%> (ø)
internal/store/io/file_linux.go 0.00% <0.00%> (ø)
internal/store/io/zone/segmentedfile/recovery.go 18.98% <0.00%> (ø)
internal/store/raft/block/executor.go 0.00% <0.00%> (ø)
internal/store/segment/server.go 14.10% <0.00%> (-0.03%) ⬇️
internal/store/vsb/engine_open.go 2.98% <0.00%> (+0.12%) ⬆️
internal/store/wal/recovery.go 57.14% <0.00%> (-2.51%) ⬇️
... and 53 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2f658f2...ee76217. Read the comment docs.

Copy link
Contributor

@xdlbdy xdlbdy left a comment

Choose a reason for hiding this comment

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

LGTM

@xdlbdy xdlbdy merged commit 99e56ab into vanus-labs:main Mar 6, 2023
wenfengwang pushed a commit that referenced this pull request Mar 23, 2023
* feat: create files split_from_start.go and split_from_start_test.go

* feat: add constructor NewSplitFromStartAction, register it in runtime.Init

* feat: add SplitFromStart, initial code

* feat: SplitFromStart with constructor redefining Execute, add main tests

* feat: function replace between delimiters (#434)

* Create replace_between_delimiters_action function

* Add function for replace_between_delimiters

* Add test case for replace_between_delimiters function

* Register replace_between_delimiters function in init.go file

* Fix syntax error in strings_function

* Update replace_between_delimiters function to catch wide range of inputs

* Update unit test for replace_between_delimiters function

* Remove typos from contributing file

* Improve replace_between_delimiter function

* Add new testcase for replace_between_delimiters function

* Fix and refactor replace_between_delimiter function

* Update replace_between_delimiters_test

* Resolve bug in replace_between_delimiter function

* Fix bug in switch case for replace_between_delimiters

* Fix replace_between_delimiters to pass codecov and golangci-lint checks

* Refactor replace_between_delimiters function

* feat: implement function split_between_positions (#468)

* feat: implement function split_between_positions

* minor: fix linting errors

* minor: fix linting errors

* feat: implement split between position according to new description

* minor: fix linting errors

* fix: update how split_from_start handles special cases, update unit tests

---------

Co-authored-by: Jeffrey Whewhetu <[email protected]>
Co-authored-by: soumyadeep589 <[email protected]>
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.

[Good First Issues]: implement function "split_from_start" - 7 points
4 participants