phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-995) ADD ENCODE AND LPAD functions
Date Wed, 11 Jun 2014 13:55:01 GMT

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

Hudson commented on PHOENIX-995:
--------------------------------

SUCCESS: Integrated in Phoenix | 3.0 | Hadoop1 #118 (See [https://builds.apache.org/job/Phoenix-3.0-hadoop1/118/])
PHOENIX-995 Add ENCODE and LPAD functions (Thomas D'Silva). (stoens: rev 56390c426fe5b9a70ce9729e368f847f8709ac7a)
* phoenix-core/src/it/java/org/apache/phoenix/end2end/SortOrderFIT.java
* phoenix-core/src/main/java/org/apache/phoenix/expression/function/LpadFunction.java
* phoenix-core/src/test/java/org/apache/phoenix/util/TestUtil.java
* phoenix-core/src/it/java/org/apache/phoenix/end2end/LpadFunctionIT.java
* phoenix-core/src/main/java/org/apache/phoenix/exception/UndecodableByteException.java
* phoenix-core/src/main/java/org/apache/phoenix/util/StringUtil.java
* phoenix-core/src/main/java/org/apache/phoenix/expression/function/EncodeFunction.java
* phoenix-core/src/it/java/org/apache/phoenix/end2end/EncodeFunctionIT.java
* phoenix-core/src/main/java/org/apache/phoenix/expression/ExpressionType.java
* phoenix-core/src/test/java/org/apache/phoenix/util/StringUtilTest.java
* phoenix-core/src/main/java/org/apache/phoenix/expression/function/SubstrFunction.java
* phoenix-core/src/main/java/org/apache/phoenix/expression/function/EncodeFormat.java
* phoenix-core/src/main/java/org/apache/phoenix/expression/function/LengthFunction.java
* phoenix-core/src/main/java/org/apache/phoenix/util/Base62Encoder.java
* phoenix-core/src/test/java/org/apache/phoenix/expression/SortOrderExpressionTest.java
* phoenix-core/src/test/java/org/apache/phoenix/util/Base62EncoderTest.java


> ADD ENCODE AND LPAD functions 
> ------------------------------
>
>                 Key: PHOENIX-995
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-995
>             Project: Phoenix
>          Issue Type: New Feature
>            Reporter: Thomas D'Silva
>            Assignee: Thomas D'Silva
>         Attachments: PHOENIX-995.patch
>
>
> Add ENCODE(input number, format encodeformat) which can be used to convert a base 10
number to a  base 62 number
> Add LPAD(input string, length int [, fill string]) which can be used to left pad an input
string. 
> Together these two functions can be used to generate IDs using sequences, for example:
> {code:sql}
> CREATE SEQUENCE foo.bar START WITH 0 INCREMENT BY 62
> SELECT LPAD(ENCODE(NEXT VALUE FOR foo.bar,'BASE62'), 10,'0') FROM SYSTEM."SEQUENCE"
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message