[
https://issues.apache.org/jira/browse/IGNITE-19890?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Maksim Zhuravkov updated IGNITE-19890:
--------------------------------------
Description:
The following query results in java.lang.NoSuchMethodException:
org.apache.calcite.runtime.SqlFunctions.substring(java.lang.String, int, long)
{code:java}
assertQuery("SELECT Substring('abc' from 2 for 2147483650)").check();
{code}
*Expected behaviour*: data exception — substring error (because precision is
defined as int). Other databases such as PostgreSQL reject this query because
all numeric parameters of this function are INTs.
*Additional information*: This also affects SUBSTR functions as both these
functions rely on typecheckers that accept types of INTEGER type family.
was:
The following query results in java.lang.NoSuchMethodException:
org.apache.calcite.runtime.SqlFunctions.substring(java.lang.String, int, long)
{code:java}
assertQuery("SELECT Substring('abc' from 2 for
2147483650)").returns("ignore-me").check();
{code}
*Expected behaviour*: data exception — substring error (because precision is
defined as int). Other databases such as PostgreSQL reject this query because
all numeric parameters of this function are INTs.
*Additional information*: This also affects SUBSTR functions as both these
functions rely on typecheckers that accept types of INTEGER type family.
> Sql. VARCHAR. SUBSTRING function call with length greater than INT, triggers
> java.lang.NoSuchMethodException
> ------------------------------------------------------------------------------------------------------------
>
> Key: IGNITE-19890
> URL: https://issues.apache.org/jira/browse/IGNITE-19890
> Project: Ignite
> Issue Type: Bug
> Components: sql
> Affects Versions: 3.0.0-beta1
> Reporter: Maksim Zhuravkov
> Priority: Minor
> Labels: ignite-3
>
> The following query results in java.lang.NoSuchMethodException:
> org.apache.calcite.runtime.SqlFunctions.substring(java.lang.String, int, long)
> {code:java}
> assertQuery("SELECT Substring('abc' from 2 for 2147483650)").check();
> {code}
> *Expected behaviour*: data exception — substring error (because precision is
> defined as int). Other databases such as PostgreSQL reject this query because
> all numeric parameters of this function are INTs.
> *Additional information*: This also affects SUBSTR functions as both these
> functions rely on typecheckers that accept types of INTEGER type family.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)