Maksim Zhuravkov created IGNITE-22417:
-----------------------------------------
Summary: Sql. Validator accepts f(BIGINT) but f(long) but SQL
runtime does not define f(long) it has f(int)
Key: IGNITE-22417
URL: https://issues.apache.org/jira/browse/IGNITE-22417
Project: Ignite
Issue Type: Bug
Components: sql
Reporter: Maksim Zhuravkov
Calcite's uses TypeFamilies in a lot of places to define types of types
function arguments.
This leads to a problem when a function that only accepts INTEGER type also
accepts BIGINT type, but runtime does not have an implementation of a function
that accepts long (because there can be no sense in doing so), causing a
runtime error.
This function can be called with TINYINT, SMALLINT, and INTEGER, but should be
rejected by the validation when called with BIGINT:
{noformat}
Descriptor: F(<INTEGER>)
Runtime: Fs.f(int)
{noformat}
Validator accepts a call to f(BIGINT) since BIGINT is a part of INTEGER type
family.
But f(long) is not defined in runtime, so java.lang.NoSuchMethodException:
Fs.f(long) is thrown when a query get executed.
*Expected behaviour*: when a function does not accept BIGINTs, then the
validator should return an error.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)