You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Forward Xu (JIRA)" <ji...@apache.org> on 2019/05/24 01:50:01 UTC

[jira] [Comment Edited] (CALCITE-3005) Implement string functions: LEFT, RIGHT

    [ https://issues.apache.org/jira/browse/CALCITE-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16847166#comment-16847166 ] 

Forward Xu edited comment on CALCITE-3005 at 5/24/19 1:50 AM:
--------------------------------------------------------------

hi [~julianhyde] [~Chunwei Lei] [~pzw2018] Thank you very much.I now found an error when adding JDBC String function `{fn LEFT(string, integer)` and `

{fn RIGHT(string, integer)}

` create in `SqlJdbcFunctionCall` and test in `SqlOperatorBaseTest.testJdbcFn()`.It looks like there's a conflict between String's `LEFT` semantics and `LEFT JOIN` semantics.I am not sure how to solve this problem. Could you give me some advice?
 best
 qianjin


was (Author: x1q1j1):
hi @julianhyde @chunweilei @pengzhiwei2018 Thank you very much.I now found an error when adding JDBC String function `\{fn LEFT(string, integer)` and `{fn RIGHT(string, integer)}` create in `SqlJdbcFunctionCall` and test in `SqlOperatorBaseTest.testJdbcFn()`.It looks like there's a conflict between String's `LEFT` semantics and `LEFT JOIN` semantics.I am not sure how to solve this problem. Could you give me some advice?
best
qianjin

> Implement string functions: LEFT, RIGHT
> ---------------------------------------
>
>                 Key: CALCITE-3005
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3005
>             Project: Calcite
>          Issue Type: New Feature
>            Reporter: Forward Xu
>            Assignee: Forward Xu
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 6h 10m
>  Remaining Estimate: 0h
>
> Some string functions including LEFT, RIGHT are not implemented now. It would be great if these functions can be implemented.
> [{{LEFT(_str_}},_{{len}}_)|https://dev.mysql.com/doc/refman/8.0/en/string-functions.html#function_left]
> Returns the leftmost _{{len}}_ characters from the string _{{str}}_, or {{NULL}} if any argument is {{NULL}}.
> [{{RIGHT(_str_}},_{{len}}_)|https://dev.mysql.com/doc/refman/8.0/en/string-functions.html#function_right]
> Returns the rightmost _{{len}}_ characters from the string _{{str}}_, or {{NULL}} if any argument is {{NULL}}.



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