Add missing text function#3471
Merged
LantaoJin merged 7 commits intoopensearch-project:mainfrom Mar 26, 2025
Merged
Conversation
LantaoJin
reviewed
Mar 24, 2025
Member
LantaoJin
left a comment
There was a problem hiding this comment.
Please fix the spotless issue.
|
|
||
| import org.opensearch.sql.calcite.udf.UserDefinedFunction; | ||
|
|
||
| public class locateFunction implements UserDefinedFunction { |
| * We don't use calcite built in replace since it uses replace instead of replaceAll | ||
| */ | ||
|
|
||
| public class replaceFunction implements UserDefinedFunction { |
Comment on lines
+17
to
+19
| if (args.length != 3) { | ||
| throw new IllegalArgumentException("replace Function requires 3 arguments, but current get: " + args.length); | ||
| } |
Member
There was a problem hiding this comment.
Can we refactor this to a general util method? Seems this similar code block is duplicated in almost Function classes.
Contributor
Author
There was a problem hiding this comment.
Can we firstly remain it here? I'm considering reuse the check argument function in time functions to make a general check, but let's first pass the functionality test.
Member
There was a problem hiding this comment.
Sure, please fix it in followup PR.
integ-test/build.gradle
Outdated
Comment on lines
+439
to
+440
| //dependsOn startPrometheus | ||
| //finalizedBy stopPrometheus |
Signed-off-by: xinyual <xinyual@amazon.com>
Signed-off-by: xinyual <xinyual@amazon.com>
Signed-off-by: xinyual <xinyual@amazon.com>
LantaoJin
approved these changes
Mar 25, 2025
Member
penghuo
approved these changes
Mar 25, 2025
Member
|
Seems some tests introduced by this PR failed in post-merging CI workflow. @xinyual could you check it https://github.com/opensearch-project/sql/actions/runs/14074018890/job/39413609572 |
7 tasks
7 tasks
penghuo
pushed a commit
that referenced
this pull request
Jun 16, 2025
* add missing text function Signed-off-by: xinyual <xinyual@amazon.com> * add IT Signed-off-by: xinyual <xinyual@amazon.com> * fix bugs Signed-off-by: xinyual <xinyual@amazon.com> * fix spotless Signed-off-by: xinyual <xinyual@amazon.com> * fix comment Signed-off-by: xinyual <xinyual@amazon.com> * fix IT Signed-off-by: xinyual <xinyual@amazon.com> * apply spot Signed-off-by: xinyual <xinyual@amazon.com> --------- Signed-off-by: xinyual <xinyual@amazon.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add missing text function including
ascii/left/ locate/strcmp, substr
Related Issues
Resolves #3467
Check List
--signoff.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.