You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Huaisi Xu (JIRA)" <ji...@apache.org> on 2016/02/10 06:02:18 UTC
[jira] [Commented] (AVRO-1797) Schema parser should not expect
ctrl-char (ASCII: 0-31) to be escaped in default value for bytes
[ https://issues.apache.org/jira/browse/AVRO-1797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15140311#comment-15140311 ]
Huaisi Xu commented on AVRO-1797:
---------------------------------
At least the C version of AVRO library is broken in bytes manipulation as well. JSON string cannot have any control character. Default value for all bytes backed type fails.
> Schema parser should not expect ctrl-char (ASCII: 0-31) to be escaped in default value for bytes
> ------------------------------------------------------------------------------------------------
>
> Key: AVRO-1797
> URL: https://issues.apache.org/jira/browse/AVRO-1797
> Project: Avro
> Issue Type: Bug
> Components: c, java
> Affects Versions: 1.7.4
> Environment: Hive, Impala
> Reporter: Huaisi Xu
> Priority: Critical
>
> In https://avro.apache.org/docs/1.7.7/spec.html#schema_complex, "Default values for bytes and fixed fields are JSON strings, where Unicode code points 0-255 are mapped to unsigned 8-bit byte values 0-255.". The example provided is: bytes || string || "\u00FF".
> However, if I try to create a table schema with default bytes value for a decimal field to be i.e. "\u0031", I will have "Illegal unquoted character ((CTRL-CHAR, code 31)): has to be escaped using backslash to be included in string value.". Anything less than 32 fails.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)