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

Add "trimPrefix" and "trimSuffix" SQL Methods #1686

Merged
merged 2 commits into from
Aug 11, 2024
Merged

Conversation

gramian
Copy link
Collaborator

@gramian gramian commented Aug 10, 2024

What does this PR do?

This change adds two SQL methods aimed at strings:

  • .trimPrefix
  • .trimSuffix

These methods remove a string argument from the front or back of the base object respectively if it exists, otherwise returns the (stringified) base object as-is.

Motivation

Inspired by Connect for data cleaning purposes.

Checklist

  • I have run the build using mvn clean package command
  • My unit tests cover both failure and success scenarios (only success)

@lvca lvca merged commit 0e2edcd into ArcadeData:main Aug 11, 2024
5 of 6 checks passed
@lvca
Copy link
Contributor

lvca commented Aug 11, 2024

Thanks @gramian !

@lvca lvca self-requested a review August 11, 2024 15:32
@lvca lvca added this to the 24.8.1 milestone Aug 11, 2024
@lvca lvca added the enhancement New feature or request label Aug 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants