Kenneth Knowles created BEAM-4704:
-------------------------------------

             Summary: String operations yield incorrect results when executed 
through SQL shell
                 Key: BEAM-4704
                 URL: https://issues.apache.org/jira/browse/BEAM-4704
             Project: Beam
          Issue Type: New Feature
          Components: dsl-sql
            Reporter: Kenneth Knowles
            Assignee: Kenneth Knowles


{{TRIM}} is defined to trim _all_ the characters in a string. Calcite has an 
incorrect implementation of this. We use our own fixed implementation. But when 
executed through the SQL shell, the results do not match what we get from the 
PTransform path. Here are two test cases that pass on {{master}} but are 
incorrect in the shell:

{code}
BeamSQL> select TRIM(LEADING 'eh' FROM 'hehe__hehe');
+------------+
| EXPR$0 |
+------------+
| hehe__hehe |
+------------+
{code}

{code}
BeamSQL> select TRIM(TRAILING 'eh' FROM 'hehe__hehe');
+------------+
|   EXPR$0   |
+------------+
| hehe__heh  |
+------------+
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to