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-3498) Implement TRIM, SUBSTRING as reference design for Table API
Date Tue, 01 Mar 2016 17:20:18 GMT

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

ASF GitHub Bot commented on FLINK-3498:

Github user twalthr commented on a diff in the pull request:

    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/codegen/calls/ScalarFunctions.scala
    @@ -49,6 +49,11 @@ object ScalarFunctions {
    +  addSqlFunctionTrim(
    --- End diff --
    `TRIM` is a special case because the runtime function takes other parameters than the
user can provide. In SQL `TRIM` has its own syntax `TRIM(BOTH '.' FROM str)`. `BOTH` is translated
into  a SQL Symbol but the runtime function uses two boolean arguments. That's why we cannot
pass the arguments directly to runtime function and need a special `TrimCallGenerator`. The
SQL Symbol is translated to an integer value (the same same value can also come from Expression
API) and is then translated to the two `boolean` parameters.

> Implement TRIM, SUBSTRING as reference design for Table API
> -----------------------------------------------------------
>                 Key: FLINK-3498
>                 URL: https://issues.apache.org/jira/browse/FLINK-3498
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table API
>            Reporter: Timo Walther
>            Assignee: Timo Walther
> As described in FLINK-3497 TRIM and SUBSTRING are the first scalar functions implemented
in Calcite and used in Table API.

This message was sent by Atlassian JIRA

View raw message