You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2026/01/10 18:52:00 UTC
[jira] [Comment Edited] (CALCITE-7368) The validator accepts CAST(INT TO BINARY), but the runtime does not implement them
[ https://issues.apache.org/jira/browse/CALCITE-7368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18051040#comment-18051040 ]
Julian Hyde edited comment on CALCITE-7368 at 1/10/26 6:51 PM:
---------------------------------------------------------------
Can you give some examples? Does the BINARY value have length 4 for all integer values, even small numbers like 0 and -1?
It’s probably wise to implement for TINYINT, SMALLINT, BIGINT also. We wouldn’t want values to be implicitly cast to INTEGER.
was (Author: julianhyde):
Can you give some examples? Does the BINARY value have length 4 for all integer values, even small numbers like 0 and -1.
It’s probably wise to implement for TINYINT, SMALLINT, BIGINT also. We wouldn’t want values to be implicitly cast to INTEGER.
> The validator accepts CAST(INT TO BINARY), but the runtime does not implement them
> ----------------------------------------------------------------------------------
>
> Key: CALCITE-7368
> URL: https://issues.apache.org/jira/browse/CALCITE-7368
> Project: Calcite
> Issue Type: New Feature
> Components: core
> Affects Versions: 1.41.0
> Reporter: Mihai Budiu
> Priority: Minor
>
> Most SQL dialects which support this feature seem to convert integers to big endian values, and then truncate or pad on the left when the size of the target BINARY does not exactly match the integer's size.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)