Skip to content

TINKERPOP-3083: The split() step should provide a way to split an entire string#2741

Merged
Cole-Greer merged 1 commit intoapache:masterfrom
andreachild:TINKERPOP-3083_split
Aug 28, 2024
Merged

TINKERPOP-3083: The split() step should provide a way to split an entire string#2741
Cole-Greer merged 1 commit intoapache:masterfrom
andreachild:TINKERPOP-3083_split

Conversation

@andreachild
Copy link
Copy Markdown
Contributor

@andreachild andreachild commented Aug 22, 2024

https://issues.apache.org/jira/browse/TINKERPOP-3083

Changed split() local and global steps to parse a string into individual characters if the separator is an empty string - previous implementation left the string intact. Introduced StringUtil utility class to reuse logic between the global and local step classes. Feature tests were executed using -DskipIntegrationTests=false and manual testing was executed using gremlin console with and without remote context.

@andreachild andreachild changed the title TINKERPOP-3083 Change split to parse a string into individual characters if the separator is an empty string TINKERPOP-3083: Change split to parse a string into individual characters if the separator is an empty string Aug 22, 2024
@andreachild andreachild changed the title TINKERPOP-3083: Change split to parse a string into individual characters if the separator is an empty string TINKERPOP-3083: The split() step should provide a way to split an entire string Aug 22, 2024
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Aug 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.75%. Comparing base (2d32517) to head (17894b7).
Report is 565 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2741      +/-   ##
============================================
+ Coverage     76.16%   76.75%   +0.58%     
- Complexity    13170    13890     +720     
============================================
  Files          1085     1103      +18     
  Lines         65189    68249    +3060     
  Branches       7289     7418     +129     
============================================
+ Hits          49651    52382    +2731     
- Misses        12830    13147     +317     
- Partials       2708     2720      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


* `separator` - The string character(s) used as delimiter to split the input string. Nullable, a null separator will split on
whitespaces.
whitespaces. An empty separator will split on each character.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Minor nit: I think it should probably be "empty string separator"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Changed to 'empty string separator' for this file and also the-traversal.asciidoc.

@kenhuuu
Copy link
Copy Markdown
Contributor

kenhuuu commented Aug 22, 2024

Requires a CHANGELOG entry.

VOTE +1 pending minor nits. Thanks for contributing.

@andreachild andreachild force-pushed the TINKERPOP-3083_split branch from 859daaf to f45d11a Compare August 22, 2024 22:50
@Cole-Greer
Copy link
Copy Markdown
Contributor

Thanks @andreachild, looks great!

VOTE +1

… StringUtil.split utility method which will split the given string into a list of individual string characters if the given separator is an empty string.
@andreachild andreachild force-pushed the TINKERPOP-3083_split branch from d4d1c48 to 17894b7 Compare August 27, 2024 20:30
@xiazcy
Copy link
Copy Markdown
Contributor

xiazcy commented Aug 27, 2024

VOTE +1, thanks @andreachild!

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.

5 participants