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

Pavel Pereslegin edited comment on IGNITE-19469 at 8/20/24 3:14 PM:
--------------------------------------------------------------------

I think the same applies to {{LENGTH()}}.

In the AI3 the following query works fine

{code:sql}
SELECT LENGTH(1234)
{code}

But should produce a validation error


was (Author: xtern):
I think the same applies to {{LENGTH()}}.

In the AI3 the following query works fine

{code:java}
SELECT LENGTH(1234)
{code}

But should produce a validation error

> Sql. Functions. Type coercion of function arguments (SUBSTR function).
> ----------------------------------------------------------------------
>
>                 Key: IGNITE-19469
>                 URL: https://issues.apache.org/jira/browse/IGNITE-19469
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 3.0.0-beta1
>            Reporter: Maksim Zhuravkov
>            Priority: Major
>              Labels: ignite-3
>
> Calls to SUBSTR function with arguments of not compatible types does not 
> cause validation errors in some cases:
> {code:java}
> # 1
> SELECT SUBSTR(100, 1)}
> IgniteProject(EXPR$0=[SUBSTR(_UTF-8'100':VARCHAR CHARACTER SET "UTF-8", 1)]), 
> id = 20
>   IgniteValues(tuples=[[{ 0 }]]), id = 18
> # 2
> SELECT SUBSTR('123456789', '1')}
> IgniteProject(EXPR$0=[SUBSTR(_UTF-8'123456789', 1:BIGINT)]), id = 41
>   IgniteValues(tuples=[[{ 0 }]]), id = 39
> {code}
> # 3
> SELECT SUBSTR('0000'::UUID, 1)}
> IgniteProject(EXPR$0=[SUBSTR(CAST(_UTF-8'0000'):UUID NOT NULL, 1)]), id = 83
>   IgniteValues(tuples=[[{ 0 }]]), id = 81
> # 4
> SELECT SUBSTR('123456789', ?, 1)
> Dynamic parameters: [00000000-0000-0000-0000-000000000000 <java.util.UUID>]
> IgniteProject(EXPR$0=[SUBSTR(_UTF-8'123456789', ?0, 1)]), id = 104
>   IgniteValues(tuples=[[{ 0 }]]), id = 102
> {code}



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

Reply via email to