tajo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keuntae Park (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (TAJO-382) Implement encode function
Date Tue, 17 Dec 2013 06:02:11 GMT

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

Keuntae Park edited comment on TAJO-382 at 12/17/13 6:02 AM:
-------------------------------------------------------------

It passes 'mvn clean install'
However, it seems that this patch cannot handle '\nnn' type escape characters like '\034',
'\022'.

When I call encode('\n\034\t', 'hex'), I got 0x0a0x1C0x09
However, decode('0x0a0x1C0x09', 'hex') does not return '\n\034\t'.

Would you check this please?


was (Author: sirpkt):
It passes 'mvn clean install'
However, it seems that this patch cannot handle '\nnn' type escape characters like '\034',
'\022'.

When I call encode('\n\034\t', 'hex'), I got 0x0a0x120x09
However, decode('0x0a0x1C0x09', 'hex') does not return '\n\034\t'.

Would you check this please?

> 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)

Mime
View raw message