Youwei Wang has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/3213

Change subject: IMPALA-3579: Add support for ISO-SQL trim() Add support for an 
ISO-SQL compliant trim() function. Syntax: select trim(source_string, 
chars_to_trim, option); source_string: the source string to trim; 
chars_to_trim: the characters to trim, which is represen
......................................................................

IMPALA-3579: Add support for ISO-SQL trim()
Add support for an ISO-SQL compliant trim() function.
Syntax: select trim(source_string, chars_to_trim, option);
source_string: the source string to trim;
chars_to_trim: the characters to trim, which is represented as a string;
option: enumerate values, available choices are: left/right/both;
  left means trimming characters from the start of the source string;
  right means trimming characters from the end of the source string;
  both means trimming characters from both ends of the source string;
Example:
  select btrim('abc%%defg%%%%%', 'a%', 'left'); returns 'bc%%defg%%%%%';
  select btrim('abc%%defg%%%%%', 'fg%', 'right'); returns 'abc%%de';
  select btrim('abc%%defg%%%%%', 'abfg%', 'both'); returns 'c%%de';

Change-Id: I4753c608b0b00569bf8c5e95b132df6df358e602
---
M be/src/exprs/expr-test.cc
M be/src/exprs/string-functions-ir.cc
M be/src/exprs/string-functions.h
M common/function-registry/impala_functions.py
4 files changed, 70 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala refs/changes/13/3213/1
-- 
To view, visit http://gerrit.cloudera.org:8080/3213
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4753c608b0b00569bf8c5e95b132df6df358e602
Gerrit-PatchSet: 1
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Youwei Wang <[email protected]>

Reply via email to