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

Lefty Leverenz commented on HIVE-10518:
---------------------------------------

Doc note:  [~apivovarov] updated the wiki to correct the underscores for the 
encode & decode UDFs.

* [Operators and UDFs -- String Functions | 
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF#LanguageManualUDF-StringFunctions]

> Replace US_ASCII charset with US-ASCII in encode and decode description
> -----------------------------------------------------------------------
>
>                 Key: HIVE-10518
>                 URL: https://issues.apache.org/jira/browse/HIVE-10518
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>            Reporter: Alexander Pivovarov
>            Assignee: Alexander Pivovarov
>            Priority: Trivial
>         Attachments: HIVE-10518.1.patch
>
>
> GenericUDFEncode line 45 says
> {code}
> extended = "Possible options for the character set are 'US_ASCII', 
> 'ISO-8859-1',\n" +
> {code}
> But Java Charset API says that valid ASCII charset value is US-ASCII
> https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html
> java.nio.charset.StandardCharset line 44
> {code}
> public static final Charset US_ASCII = Charset.forName("US-ASCII");
> {code}
> http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/7u40-b43/java/nio/charset/StandardCharsets.java#StandardCharsets
> So, US_ASCII (with underscore) is java constant name
> But the value is "US-ASCII" (with hyphen)
> TestGenericUDFEncode JUnit tests uses 'US-ASCII' from the beginning (line 34).
> https://github.com/apache/hive/blob/master/ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFEncode.java



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to