Repository navigation
Add missing text function - #3471
Conversation
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
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 { |
| if (args.length != 3) { | ||
| throw new IllegalArgumentException("replace Function requires 3 arguments, but current get: " + args.length); | ||
| } |
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.
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.
There was a problem hiding this comment.
Sure, please fix it in followup PR.
| //dependsOn startPrometheus | ||
| //finalizedBy stopPrometheus |
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
|
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 |
* add missing text function Signed-off-by: xinyual <[email protected]> * add IT Signed-off-by: xinyual <[email protected]> * fix bugs Signed-off-by: xinyual <[email protected]> * fix spotless Signed-off-by: xinyual <[email protected]> * fix comment Signed-off-by: xinyual <[email protected]> * fix IT Signed-off-by: xinyual <[email protected]> * apply spot Signed-off-by: xinyual <[email protected]> --------- Signed-off-by: xinyual <[email protected]>
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.