You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@metamodel.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/10/04 00:11:27 UTC

[jira] [Commented] (METAMODEL-192) Basic type-conversion (scalar) functions TO_NUMBER, TO_STRING, TO_DATE and TO_BOOLEAN

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

ASF GitHub Bot commented on METAMODEL-192:
------------------------------------------

GitHub user kaspersorensen opened a pull request:

    https://github.com/apache/metamodel/pull/55

    Metamodel 192/datatype conversion functions

    __Do not merge yet__
    
    This is my first attempt at implementing METAMODEL-192, which thereby is also the first time we make pluggable ScalarFunctions available. I wanted to share it early on since I think some people will find the approach interesting ( @ardlema ?) as inspiration for similar scalar functions (SUBSTRING etc.) ... Please let me know if you think the approach is good or not.

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

    $ git pull https://github.com/kaspersorensen/metamodel METAMODEL-192/datatype-conversion-functions

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

    https://github.com/apache/metamodel/pull/55.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 #55
    
----
commit 94d08404647e53352a07ac37692000aa319a06b4
Author: Kasper Sørensen <i....@gmail.com>
Date:   2015-10-03T20:15:50Z

    METAMODEL-192: Updated ScalarFunction interface and added ToXx functions

commit 018a666df5e9dc21e7db9c3ca7f0f041c9986570
Author: Kasper Sørensen <i....@gmail.com>
Date:   2015-10-03T20:27:17Z

    Cleaned up the function inheritance patterns, using @Override etc.

commit 3cb4cd8d7c475533f92292baee55e463adca2a57
Author: Kasper Sørensen <i....@gmail.com>
Date:   2015-10-03T22:09:11Z

    METAMODEL-192: First impl for client-side eval. JDBC not covered yet.

----


> Basic type-conversion (scalar) functions TO_NUMBER, TO_STRING, TO_DATE and TO_BOOLEAN
> -------------------------------------------------------------------------------------
>
>                 Key: METAMODEL-192
>                 URL: https://issues.apache.org/jira/browse/METAMODEL-192
>             Project: Apache MetaModel
>          Issue Type: Improvement
>            Reporter: Kasper Sørensen
>            Assignee: Kasper Sørensen
>
> With the addition of scalar functions, we should have a basic set of built-in functions.
> This issue represents the need to have basic type-conversion functions for converting values into a new data type. I propose to add 4 built-in functions for that:
> TO_STRING
> TO_NUMBER
> TO_DATE
> TO_BOOLEAN
> When possible this conversion should obviously be done by the backing database. But initially we should also cover all data context implementations by having a client-side application of it.



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