You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Mihai Budiu (Jira)" <ji...@apache.org> on 2025/09/29 22:13:00 UTC

[jira] [Closed] (CALCITE-7211) BINARY literal values may not match their type

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

Mihai Budiu closed CALCITE-7211.
--------------------------------
    Resolution: Duplicate

Same as [CALCITE-7210], the browser did something funny and filed the issue twice.
(one tab was hung, and I forcefully closed it)

> BINARY literal values may not match their type
> ----------------------------------------------
>
>                 Key: CALCITE-7211
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7211
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.40.0
>            Reporter: Mihai Budiu
>            Priority: Minor
>
> The following SqlOperatorTest fails:
> {code:java}
>     final SqlOperatorFixture f = fixture()
>         .setFor(SqlLibraryOperators.LEAST, VmName.EXPAND)
>         .withLibrary(SqlLibrary.BIG_QUERY);
>     f.checkScalar("least(x'01', x'0202')", "0100", "BINARY(2) NOT NULL");
> {code}
> The error is:
> Expected: is "0100"
>      but: was "01"
> However, the type of the result BINARY(2) is correct. But "01" is not a legal value for this type.
> This occurs because BINARY literal values do not always match their declared type. I think there are several paths in simplification code which can lead to this outcome.



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