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 2024/06/09 06:43:00 UTC

[jira] [Updated] (IGNITE-22417) Sql. Validator accepts f(BIGINT) but SQL runtime does not define f(long) it has f(int)

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

Maksim Zhuravkov updated IGNITE-22417:
--------------------------------------
    Summary: Sql. Validator accepts f(BIGINT) but SQL runtime does not define f(long) it has f(int)  (was: Sql. Validator accepts f(BIGINT) but f(long) but SQL runtime does not define f(long) it has f(int))

> Sql. Validator accepts f(BIGINT) 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
>            Priority: Major
>              Labels: ignite-3
>
> Calcite uses TypeFamilies in a lot of places to define types of 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.
> *Example*:
> A function *f* 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)