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

add string function RIGHT #938

Merged

Conversation

rupal-bq
Copy link
Contributor

Description of changes:

  • Added string function RIGHT().
  • Added unit test.
  • Added manual IT because the comparison test didn't work.
  • Updated doc.

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

@codecov
Copy link

codecov bot commented Dec 15, 2020

Codecov Report

Merging #938 (c7a0170) into develop (c377026) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             develop     #938   +/-   ##
==========================================
  Coverage      99.86%   99.86%           
- Complexity      2315     2337   +22     
==========================================
  Files            230      232    +2     
  Lines           5329     5383   +54     
  Branches         346      350    +4     
==========================================
+ Hits            5322     5376   +54     
  Misses             5        5           
  Partials           2        2           
Impacted Files Coverage Δ Complexity Δ
...opendistroforelasticsearch/sql/expression/DSL.java 100.00% <100.00%> (ø) 129.00 <1.00> (+1.00)
...h/sql/expression/function/BuiltinFunctionName.java 100.00% <100.00%> (ø) 3.00 <0.00> (ø)
...lasticsearch/sql/expression/text/TextFunction.java 100.00% <100.00%> (ø) 34.00 <2.00> (+2.00)
.../sql/elasticsearch/storage/ElasticsearchIndex.java 100.00% <0.00%> (ø) 3.00% <0.00%> (ø%)
.../elasticsearch/storage/ElasticsearchIndexScan.java 100.00% <0.00%> (ø) 19.00% <0.00%> (+1.00%)
...ch/planner/logical/rule/OptimizationRuleUtils.java 100.00% <0.00%> (ø) 9.00% <0.00%> (+3.00%)
...planner/logical/ElasticsearchLogicalIndexScan.java 100.00% <0.00%> (ø) 7.00% <0.00%> (+3.00%)
...ical/ElasticsearchLogicalPlanOptimizerFactory.java 100.00% <0.00%> (ø) 1.00% <0.00%> (ø%)
...h/planner/logical/rule/PushProjectAndRelation.java 100.00% <0.00%> (ø) 5.00% <0.00%> (?%)
.../planner/logical/rule/PushProjectAndIndexScan.java 100.00% <0.00%> (ø) 7.00% <0.00%> (?%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c377026...c7a0170. Read the comment docs.

Copy link
Member

@dai-chen dai-chen 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 changes! Could you check if we can add comparison test now? https://github.com/opendistro-for-elasticsearch/sql/tree/develop/integ-test/src/test/resources/correctness/expressions

I recall there was some issue adding text function. I think it's doable now?

@penghuo
Copy link
Contributor

penghuo commented Dec 15, 2020

@rupal-bq
Copy link
Contributor Author

Thanks for the changes! Could you check if we can add comparison test now? https://github.com/opendistro-for-elasticsearch/sql/tree/develop/integ-test/src/test/resources/correctness/expressions

I recall there was some issue adding text function. I think it's doable now?

Thanks. added comparison test.

@rupal-bq
Copy link
Contributor Author

could you also add the doc for PPL? https://github.com/opendistro-for-elasticsearch/sql/blob/develop/docs/experiment/ppl/functions/string.rst

Thanks. added this change.

@chloe-zh chloe-zh merged commit c3a5a47 into opendistro-for-elasticsearch:develop Dec 16, 2020
penghuo pushed a commit to penghuo/sql that referenced this pull request Dec 17, 2020
* add right function

* update doc

* address PR comments

* fix build failure

Co-authored-by: Rupal Mahajan <>
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.

None yet

4 participants