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

Keuntae Park edited comment on TAJO-382 at 12/18/13 1:34 AM:
-------------------------------------------------------------

Sorry, I have a mistake on understanding unicode conversion.
As '\034' is octal code, it is 28 and its unicode equivalent is '\u001C'
So, the returned result of decode('0x0a0x1C0x09', 'hex'), '\n\u001C\t', is just 
unicode expression of '\n\034\t'.

I think there is no problem.

And this patch looks good to me.


was (Author: sirpkt):
Sorry, I have a mistake on understanding unicode conversion.
As '\034' is octal code, it is 28 and its unicode equivalent is '\u001C'
So, the returned result of decode('0x0a0x1C0x09', 'hex'), '\n\u001C\t', is just 
unicode expression of '\n\034\t'.

I think there is no problem.

And this patch looks good to me :)

> Implement encode function
> -------------------------
>
>                 Key: TAJO-382
>                 URL: https://issues.apache.org/jira/browse/TAJO-382
>             Project: Tajo
>          Issue Type: New Feature
>            Reporter: Seungun Choe
>            Assignee: Seungun Choe
>            Priority: Minor
>         Attachments: TAJO-382.patch, TAJO-382_2.patch
>
>
> Function : encode(data bytea, format text)
> Description : Encode binary data into a textual representation. Supported 
> formats are: base64, hex, escape. escape converts zero bytes and high-bit-set 
> bytes to octal sequences (\nnn) and doubles backslashes.
> Example : encode(E'123\\000\\001', 'base64')  -->  MTIzAAE=



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Reply via email to