[
https://issues.apache.org/jira/browse/CALCITE-6065?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Runkang He updated CALCITE-6065:
--------------------------------
Description:
Add HEX and UNHEX functions (enabled in Hive and Spark library)
* HEX: Converts a BIGINT/CHARACTER/BINARY into a hexadecimal CHARACTER.
* UNHEX: Converts a hexadecimal-encoded CHARACTER into BINARY format.
Note that currently we have supported _TO_HEX and FROM_HEX function in BigQuery
library. These are two similar functions compared to HEX and_ _UNHEX_ _in_
_Hive_ _and Spark libraries. The similarities and differences are below:_
_UNHEX_ _and FROM_HEX have the same logic._
HEX can convert BIGINT/CHARACTER/BINARY value, while _TO_HEX can only convert
BINARY value._ _HEX_ _returns upper case of hexadecimal CHARACTER, while TO_HEX
returns lower case ones._
_See more about HEX in
[Hive|https://cwiki.apache.org/confluence/display/hive/languagemanual+udf#LanguageManualUDF-MathematicalFunctions]
and [Spark|https://spark.apache.org/docs/latest/api/sql/index.html#hex] doc,
and UNHEX in
[Hive|https://cwiki.apache.org/confluence/display/hive/languagemanual+udf#LanguageManualUDF-MathematicalFunctions]
and [Spark|https://spark.apache.org/docs/latest/api/sql/index.html#unhex] doc._
was:
Add HEX and UNHEX functions (enabled in Hive and Spark library)
* HEX: Converts a BIGINT/CHARACTER/BINARY into a hexadecimal CHARACTER.
* UNHEX: Converts a hexadecimal-encoded CHARACTER into BINARY format.
See more about HEX in
[Hive|https://cwiki.apache.org/confluence/display/hive/languagemanual+udf#LanguageManualUDF-MathematicalFunctions]
and [Spark|https://spark.apache.org/docs/latest/api/sql/index.html#hex] doc,
and UNHEX in
[Hive|https://cwiki.apache.org/confluence/display/hive/languagemanual+udf#LanguageManualUDF-MathematicalFunctions]
and [Spark|https://spark.apache.org/docs/latest/api/sql/index.html#unhex] doc.
> Add HEX and UNHEX functions (enabled in Hive and Spark library)
> ---------------------------------------------------------------
>
> Key: CALCITE-6065
> URL: https://issues.apache.org/jira/browse/CALCITE-6065
> Project: Calcite
> Issue Type: New Feature
> Components: core
> Affects Versions: 1.35.0
> Reporter: Runkang He
> Assignee: Runkang He
> Priority: Major
>
> Add HEX and UNHEX functions (enabled in Hive and Spark library)
> * HEX: Converts a BIGINT/CHARACTER/BINARY into a hexadecimal CHARACTER.
> * UNHEX: Converts a hexadecimal-encoded CHARACTER into BINARY format.
>
> Note that currently we have supported _TO_HEX and FROM_HEX function in
> BigQuery library. These are two similar functions compared to HEX and_
> _UNHEX_ _in_ _Hive_ _and Spark libraries. The similarities and differences
> are below:_
>
> _UNHEX_ _and FROM_HEX have the same logic._
> HEX can convert BIGINT/CHARACTER/BINARY value, while _TO_HEX can only convert
> BINARY value._ _HEX_ _returns upper case of hexadecimal CHARACTER, while
> TO_HEX returns lower case ones._
>
> _See more about HEX in
> [Hive|https://cwiki.apache.org/confluence/display/hive/languagemanual+udf#LanguageManualUDF-MathematicalFunctions]
> and [Spark|https://spark.apache.org/docs/latest/api/sql/index.html#hex] doc,
> and UNHEX in
> [Hive|https://cwiki.apache.org/confluence/display/hive/languagemanual+udf#LanguageManualUDF-MathematicalFunctions]
> and [Spark|https://spark.apache.org/docs/latest/api/sql/index.html#unhex]
> doc._
--
This message was sent by Atlassian Jira
(v8.20.10#820010)