Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Added following string functions: regex, substr, substring, ltrim, rtrim, trim, upper, lower, concat, concat_ws, length, strcmp #750

Conversation

lyndonbauto
Copy link
Contributor

Issue #, if available:
#710

Description of changes:
Added implementation unit testing, manual IT, and doc updates for the following string functions:

  • regex
  • substr
  • substring
  • ltrim
  • rtrim
  • trim
  • upper
  • lower
  • concat
  • concat_ws
  • length
  • strcmp

The following functions have limitations from the specification:

  • trim Does not support LEADING/TRAILING/BOTH/FROM commands, only supports string space character trimming
  • substr/substring Does not support FROM/TO commands, only comma separated values
  • concat/concat_ws Does not support variable arguments being specified, only two strings to concatenate

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

penghuo and others added 30 commits June 17, 2020 09:17
…rch#522)

* Bug fix, support long type for aggregation

* change to datetime to JDBC format
* prepare odfe 1.9

* Fix all ES 7.8 compile and build errors

* Revert changes as Lombok is working now

* Update CustomExternalTestCluster.java

* Fix license headers check

* Use splitFieldsByMetadata to separate fields when calling SearchHit constructor

* More fixes for ODFE 1.9

* Remove todo statement

* Add ODFE 1.9.0 release notes
…ticsearch#551)

* Revert "Rename release notes to use 4 digit versions (opendistro-for-elasticsearch#547)"

This reverts commit 33c6d3e.

* Revert "Opendistro Release 1.9.0 (opendistro-for-elasticsearch#532)"

This reverts commit 254f2e0.

* Revert "Bug fix, support long type for aggregation (opendistro-for-elasticsearch#522)"

This reverts commit fb2ed91.
…h#549) (opendistro-for-elasticsearch#554)

* merge all sql repos

* fix test and build workflows

* fix workbench and odbc path

* fix workbench and odbc path

* restructure workbench dir and fix workflows

* fix workbench workflow

* fix workbench workflow

* fix workbench workflow

* fix workbench workflow

* fix workbench workflow

* revert workbench directory structure

* fix workbench workflow

* fix workbench workflow

* fix workbench workflow

* fix workbench workflow

* update workbench workflow for release

* Delete .github/ in sql-workbench directory

* Add cypress to sql-workbench

* Sync latest ODBC commits

* Sync latest workbench commits (will add cypress in separate PR)

* Add ignored ODBC libs
* add date and time support

* update doc

* update doc
…-elasticsearch#645)

- add null check to avoid crashing if details not initialized
…or-elasticsearch/develop

Merge develop branch into master to cut odfe1.10 release
return new ExprStringValue(EMPTY_STRING);
}
String str = exprValue.stringValue();
return exprSubStr(str, startIdx, 0);
Copy link
Contributor

Choose a reason for hiding this comment

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

the length=0 is misunderstanding, in Java SDK, the definition like below

    public String substring(int beginIndex) {
        return substring(beginIndex, length());
    }

Copy link
Contributor

@penghuo penghuo left a comment

Choose a reason for hiding this comment

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

Thanks for the change.

@chloe-zh chloe-zh merged commit 15bc237 into opendistro-for-elasticsearch:develop Sep 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants