flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-9853) add hex support in table api and sql
Date Sun, 15 Jul 2018 13:34:00 GMT

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

ASF GitHub Bot commented on FLINK-9853:
---------------------------------------

GitHub user xueyumusic opened a pull request:

    https://github.com/apache/flink/pull/6337

    [FLINK-9853][Tabel API & SQL] add HEX support 

    ## What is the purpose of the change
    This PR propose to add HEX in table api and sql, the syntax like mysql, which could take
int or string arguments. For a integer argument N, it returns a hexadecimal string representation
of the value of N. For a string argument str, it returns a hexadecimal string representation
of str where each byte of each character in str is converted to two hexadecimal digits. 
    
    Syntax:
    
    HEX(100) = 64
    
    HEX('This is a test String.') = '546869732069732061207465737420537472696e672e'
    
    ## Brief change log
      - *The expressionDsl, scalarSqlFunctions and mathExpressions to add hex*
      - *The FunctionGenerator to support hex generator*
    
    ## Verifying this change
    
    This change added tests and can be verified as follows:
    
    *(example:)*
      - *Added ScalaFunctionTests tests for table api and sql expressions*
    
    ## Does this pull request potentially affect one of the following parts:
    
      - Dependencies (does it add or upgrade a dependency): (no)
      - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no)
      - The serializers: (no)
      - The runtime per-record code paths (performance sensitive): (no)
      - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing,
Yarn/Mesos, ZooKeeper: (no)
      - The S3 file system connector: (no)
    
    ## Documentation
    
      - Does this pull request introduce a new feature? (yes)
      - If yes, how is the feature documented? (docs)


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/xueyumusic/flink hex

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/6337.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #6337
    
----
commit 8d3bef913bee1d4913ef3ae056e3d15d4cda2cec
Author: xueyu <278006819@...>
Date:   2018-07-15T12:01:15Z

    hex support

----


> add hex support in table api and sql
> ------------------------------------
>
>                 Key: FLINK-9853
>                 URL: https://issues.apache.org/jira/browse/FLINK-9853
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table API &amp; SQL
>            Reporter: xueyu
>            Priority: Major
>              Labels: pull-request-available
>
> like in mysql, HEX could take int or string arguments, For a integer argument N, it returns
a hexadecimal string representation of the value of N. For a string argument str, it returns
a hexadecimal string representation of str where each byte of each character in str is converted
to two hexadecimal digits. 
> Syntax:
> HEX(100) = 64
> HEX('This is a test String.') = '546869732069732061207465737420537472696e672e'
> See more: [link MySQL|https://dev.mysql.com/doc/refman/8.0/en/string-functions.html#function_hex]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message