You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2024/03/29 10:33:00 UTC

[jira] [Commented] (KYLIN-5747) Calcite constant folding, adding strings to numbers, results not as expected when multiple plus signs are used together

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

ASF subversion and git services commented on KYLIN-5747:
--------------------------------------------------------

Commit 572d78a45b6e0cabb248b6772a9b434221d9f323 in kylin's branch refs/heads/kylin5 from Zhiting Guo
[ https://gitbox.apache.org/repos/asf?p=kylin.git;h=572d78a45b ]

KYLIN-5756 Concat string and number with + gives unexpected result

KYLIN-5747 duplicated
Co-authored-by: Zhiting Guo <zh...@kyligence.io>


> Calcite constant folding, adding strings to numbers, results not as expected when multiple plus signs are used together
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: KYLIN-5747
>                 URL: https://issues.apache.org/jira/browse/KYLIN-5747
>             Project: Kylin
>          Issue Type: Bug
>    Affects Versions: 5.0-beta
>            Reporter: zhong.zhu
>            Assignee: zhong.zhu
>            Priority: Critical
>             Fix For: 5.0.0
>
>
> Phenomenon:
> When more than one plus sign is used in a row and the parameters on both sides of the plus sign are constants, the result is not as expected
> '1' + 3 + 3 → 7 (correct)
> '1' + 3 + '3' → 4.03 (wrong result)
> '1' + '3' + 'a' → error
> When multiple plus signs are used in a row, and the arguments on both sides of the plus sign are constants, and the first plus sign results in null, the use of plus signs in a row is not supported.
> e.g. 'q' + 1 + 1 -> error



--
This message was sent by Atlassian Jira
(v8.20.10#820010)