[
https://issues.apache.org/jira/browse/CALCITE-7073?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Lucas Brenner updated CALCITE-7073:
-----------------------------------
Description:
Calcite uses {{org.apache.calcite.avatica.util.ByteString}} internally to
represent {{{}VARBINARY{}}}. However, when introducing a custom function that
returns {{{}ByteString{}}}, such as {{UNBASE64}} (which decodes a Base64 string
to bytes), its return type defaults to {{{}OTHER{}}}. This occurs because there
is no explicit mapping for {{ByteString}} in the
{{JavaToSqlTypeConversionRules}} class.
[This PR|https://github.com/apache/calcite/pull/4440] adds the necessary
mapping.
was:Calcite uses {{org.apache.calcite.avatica.util.ByteString}} internally to
represent {{{}VARBINARY{}}}. However, when introducing a custom function that
returns {{{}ByteString{}}}, such as {{UNBASE64}} (which decodes a Base64 string
to bytes), its return type defaults to {{{}OTHER{}}}. This occurs because there
is no explicit mapping for {{ByteString}} in the
{{JavaToSqlTypeConversionRules}} class.
> Fix: Calcite Fails to Map ByteString to VARBINARY
> -------------------------------------------------
>
> Key: CALCITE-7073
> URL: https://issues.apache.org/jira/browse/CALCITE-7073
> Project: Calcite
> Issue Type: Bug
> Components: core
> Reporter: Lucas Brenner
> Priority: Minor
> Labels: pull-request-available
>
> Calcite uses {{org.apache.calcite.avatica.util.ByteString}} internally to
> represent {{{}VARBINARY{}}}. However, when introducing a custom function that
> returns {{{}ByteString{}}}, such as {{UNBASE64}} (which decodes a Base64
> string to bytes), its return type defaults to {{{}OTHER{}}}. This occurs
> because there is no explicit mapping for {{ByteString}} in the
> {{JavaToSqlTypeConversionRules}} class.
>
> [This PR|https://github.com/apache/calcite/pull/4440] adds the necessary
> mapping.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)