You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Maksim Zhuravkov (Jira)" <ji...@apache.org> on 2023/05/12 12:26:00 UTC
[jira] [Created] (IGNITE-19469) Sql. Functions. Type coercion of function arguments (SUBSTR function).
Maksim Zhuravkov created IGNITE-19469:
-----------------------------------------
Summary: 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
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)