Return-Path: X-Original-To: apmail-metamodel-dev-archive@minotaur.apache.org Delivered-To: apmail-metamodel-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 79644180D9 for ; Sat, 3 Oct 2015 22:11:27 +0000 (UTC) Received: (qmail 68815 invoked by uid 500); 3 Oct 2015 22:11:27 -0000 Delivered-To: apmail-metamodel-dev-archive@metamodel.apache.org Received: (qmail 68780 invoked by uid 500); 3 Oct 2015 22:11:27 -0000 Mailing-List: contact dev-help@metamodel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@metamodel.apache.org Delivered-To: mailing list dev@metamodel.apache.org Received: (qmail 68767 invoked by uid 99); 3 Oct 2015 22:11:27 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Oct 2015 22:11:27 +0000 Date: Sat, 3 Oct 2015 22:11:27 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@metamodel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (METAMODEL-192) Basic type-conversion (scalar) functions TO_NUMBER, TO_STRING, TO_DATE and TO_BOOLEAN MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/METAMODEL-192?page=3Dcom.atlass= ian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1= 4942479#comment-14942479 ]=20 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__ =20 This is my first attempt at implementing METAMODEL-192, which thereby i= s 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 inte= resting ( @ardlema ?) as inspiration for similar scalar functions (SUBSTRIN= G 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/da= tatype-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 =20 ---- commit 94d08404647e53352a07ac37692000aa319a06b4 Author: Kasper S=C3=B8rensen Date: 2015-10-03T20:15:50Z METAMODEL-192: Updated ScalarFunction interface and added ToXx function= s commit 018a666df5e9dc21e7db9c3ca7f0f041c9986570 Author: Kasper S=C3=B8rensen Date: 2015-10-03T20:27:17Z Cleaned up the function inheritance patterns, using @Override etc. commit 3cb4cd8d7c475533f92292baee55e463adca2a57 Author: Kasper S=C3=B8rensen 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 an= d TO_BOOLEAN > -------------------------------------------------------------------------= ------------ > > Key: METAMODEL-192 > URL: https://issues.apache.org/jira/browse/METAMODEL-192 > Project: Apache MetaModel > Issue Type: Improvement > Reporter: Kasper S=C3=B8rensen > Assignee: Kasper S=C3=B8rensen > > With the addition of scalar functions, we should have a basic set of buil= t-in functions. > This issue represents the need to have basic type-conversion functions fo= r converting values into a new data type. I propose to add 4 built-in funct= ions for that: > TO_STRING > TO_NUMBER > TO_DATE > TO_BOOLEAN > When possible this conversion should obviously be done by the backing dat= abase. 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)