You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Konstantin Orlov (Jira)" <ji...@apache.org> on 2023/11/01 10:24:00 UTC

[jira] [Updated] (IGNITE-20660) Sql. Broken behavior of OCTET_LENGTH function

     [ https://issues.apache.org/jira/browse/IGNITE-20660?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Konstantin Orlov updated IGNITE-20660:
--------------------------------------
    Summary: Sql. Broken behavior of OCTET_LENGTH function  (was: SQL: broken behavior of OCTET_LENGTH function)

> Sql. Broken behavior of OCTET_LENGTH function
> ---------------------------------------------
>
>                 Key: IGNITE-20660
>                 URL: https://issues.apache.org/jira/browse/IGNITE-20660
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 3.0.0-beta2
>            Reporter: Andrey Khitrin
>            Assignee: Andrey Mashenkov
>            Priority: Major
>              Labels: ignite-3, sql
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Recently, `OCTET_LENGTH` function acted like a synonym for `LENGTH` function. But in the latest AI3 versions, it started to decline usual strings:
> {code:sql}
> sql-cli> select OCTET_LENGTH('Some Text');
> SQL query execution error
> Failed to validate query. From line 0, column 0 to line 1, column 31: Cast function cannot convert value of type CHAR(9) to type VARBINARY
> {code}
> Looks like it only accepts a very specific type of strings:
> {code:sql}
> sql-cli> select OCTET_LENGTH(x'0123');
> ╔═══════════════════════╗
> ║ OCTET_LENGTH(X'0123') ║
> ╠═══════════════════════╣
> ║ 2                     ║
> ╚═══════════════════════╝
> {code}
> But as it said in ANSI99 specification, this function must be able to work with any correct string.



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