You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Quanlong Huang (Jira)" <ji...@apache.org> on 2020/11/25 07:53:00 UTC

[jira] [Commented] (IMPALA-9576) Add built-in functions for BINARY columns

    [ https://issues.apache.org/jira/browse/IMPALA-9576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17238584#comment-17238584 ] 

Quanlong Huang commented on IMPALA-9576:
----------------------------------------

For encode/decode functions, we currently only support base64encode and base64decode. Hive supports encode/decode for arbitrary encodings:

||Return Type||Name(Signature)||Description||
|binary|encode(string src, string charset)|Encodes the first argument into a BINARY using the provided character set (one of 'US-ASCII', 'ISO-8859-1', 'UTF-8', 'UTF-16BE', 'UTF-16LE', 'UTF-16'). If either argument is null, the result will also be null. (As of Hive 0.12.0.)|
|string|decode(binary bin, string charset)|Decodes the first argument into a String using the provided character set (one of 'US-ASCII', 'ISO-8859-1', 'UTF-8', 'UTF-16BE', 'UTF-16LE', 'UTF-16'). If either argument is null, the result will also be null. (As of Hive 0.12.0.)|

https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF#LanguageManualUDF-StringFunctions

> Add built-in functions for BINARY columns
> -----------------------------------------
>
>                 Key: IMPALA-9576
>                 URL: https://issues.apache.org/jira/browse/IMPALA-9576
>             Project: IMPALA
>          Issue Type: Sub-task
>          Components: Backend, Frontend
>            Reporter: Csaba Ringhofer
>            Priority: Major
>
> Hive supports a few built-in functions for BINARY columns according to
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF
> Already supported in Impala for STRING:
> - hex, unhex
> - concat
> - decode, encode
> - substr/substring
> Currently not supported in Impala for STRING:
> - base64, unbase64
> - binary (a special casting syntax just for BINARY)
> - md5, sha, sha1, sha2, crc32
> - aes_encrypt/aes_decrypt 
> At the first glance I think that what we should implement in Impala is:
> - all the functions that already work for STRING
> - base64, unbase64 (needed for text files anyway)
> - binary() - may worth adding to get closer to Hive SQL, but can cause problems as the name is the same as a keyword



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org