[
https://issues.apache.org/jira/browse/CALCITE-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16604165#comment-16604165
]
Hongze Zhang edited comment on CALCITE-2530 at 9/5/18 9:23 AM:
---------------------------------------------------------------
[~julianhyde] Thank you very much for your suggestion on this.
And I have written a possible fix in
[PR|https://github.com/apache/calcite/pull/819],I was wondering it is on the
right direction.(AFAIK currently there is no wildly used "SQL CODE/STATE"
convention in Calcite, I haven't add a "22027" yet)
And also found that error message matching in SqlTesterImpl.checkFails(...,
true) is not working, please let me know your thought about whether that is
also worth discussing (in a new issue topic), thanks.
was (Author: zhztheplayer):
[~julianhyde] Thank you very much for your suggestion on this.
And I have written a possible fix in
[PR|https://github.com/apache/calcite/pull/819],I was wondering it is on the
right direction.(As currently there is no "SQL CODE/STATE" convention in
Calcite, I haven't add a "22027" yet)
And also found that error message matching in SqlTesterImpl.checkFails(...,
true) is not working, please let me know your thought about whether that is
also worth discussing (in a new issue topic), thanks.
> TRIM function does not throw exception when the length of trim character is
> not 1(one)
> --------------------------------------------------------------------------------------
>
> Key: CALCITE-2530
> URL: https://issues.apache.org/jira/browse/CALCITE-2530
> Project: Calcite
> Issue Type: Bug
> Components: core
> Reporter: Hongze Zhang
> Assignee: Julian Hyde
> Priority: Minor
>
> Calcite's TRIM function takes the first character of <trim character> string
> to trim the <trim source>, whereas SQL standard suggests to report a "trim
> error" when the length of <trim character> is not 1.
> I am not sure if this could be treated as an issue(since the calcite's way
> might has better availability), until I found this:
> https://issues.apache.org/jira/browse/BEAM-4704
> It seems user could be sometimes confused with the behavior of TRIM function
> in Calcite.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)