drill-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] (DRILL-4551) Add some missing functions that are generated by Tableau (cot, regex_matches, split_part, isdate)
Date Tue, 29 Mar 2016 23:38:25 GMT

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

ASF GitHub Bot commented on DRILL-4551:
---------------------------------------

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

    https://github.com/apache/drill/pull/452#discussion_r57818552
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/DateTypeFunctions.java
---
    @@ -40,6 +41,36 @@
     
     public class DateTypeFunctions {
     
    +    /**
    +     * Function to check if a varchar value can be cast to a date.
    +     *
    +     * At the time of writing this function, several other databases were checked
    +     * for behavior compatibility. There was not a consensus between oracle and
    +     * Sql server about the expected behavior of this function, and Postgres
    +     * lacks it completely.
    +     *
    +     * Sql Server appears to have both a DATEFORMAT and language locale setting
    +     * that can change the values accepted by this function. Oracle appears to
    +     * support several formats, some of which are not mentioned in the Sql
    +     * Server docs. With the lack of standardization, we decided to implement
    +     * this function so that it would only consider date strings that would be
    +     * accepted by the cast function as valid.
    +     */
    +    @SuppressWarnings("unused")
    +    @FunctionTemplate(name = "isdate", scope = FunctionTemplate.FunctionScope.SIMPLE,
nulls=NullHandling.NULL_IF_NULL,
    --- End diff --
    
    Have you checked isdate() returns null for null input in other system like oracle? I thought
it would return either true or false. 
     


> Add some missing functions that are generated by Tableau (cot, regex_matches, split_part,
isdate)
> -------------------------------------------------------------------------------------------------
>
>                 Key: DRILL-4551
>                 URL: https://issues.apache.org/jira/browse/DRILL-4551
>             Project: Apache Drill
>          Issue Type: Improvement
>            Reporter: Jason Altekruse
>            Assignee: Jason Altekruse
>
> Several of these functions do not appear to be standard SQL functions, but they are available
in several other popular databases like SQL Server, Oracle and Postgres.



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

Mime
View raw message