Return-Path: X-Original-To: apmail-tajo-dev-archive@minotaur.apache.org Delivered-To: apmail-tajo-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 8509D10D75 for ; Thu, 9 Jan 2014 01:04:14 +0000 (UTC) Received: (qmail 88619 invoked by uid 500); 9 Jan 2014 01:04:14 -0000 Delivered-To: apmail-tajo-dev-archive@tajo.apache.org Received: (qmail 88538 invoked by uid 500); 9 Jan 2014 01:04:14 -0000 Mailing-List: contact dev-help@tajo.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tajo.incubator.apache.org Delivered-To: mailing list dev@tajo.incubator.apache.org Received: (qmail 88529 invoked by uid 99); 9 Jan 2014 01:04:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Jan 2014 01:04:14 +0000 X-ASF-Spam-Status: No, hits=-2000.1 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 09 Jan 2014 01:04:12 +0000 Received: (qmail 88438 invoked by uid 99); 9 Jan 2014 01:03:50 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Jan 2014 01:03:50 +0000 Date: Thu, 9 Jan 2014 01:03:50 +0000 (UTC) From: "hyoungjunkim (JIRA)" To: dev@tajo.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (TAJO-482) Implements listing functions and describing a specified function. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/TAJO-482?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] hyoungjunkim reassigned TAJO-482: --------------------------------- Assignee: hyoungjunkim > Implements listing functions and describing a specified function. > ----------------------------------------------------------------- > > Key: TAJO-482 > URL: https://issues.apache.org/jira/browse/TAJO-482 > Project: Tajo > Issue Type: Sub-task > Components: function/udf > Reporter: hyoungjunkim > Assignee: hyoungjunkim > Priority: Minor > Fix For: 0.8-incubating > > > I propose function related commands in Tajo's shell. This command is similar to PostgreSQL but a little different. > - \df: list all functions > - \df : list all functions which have a specified name(PostgreSQL uses a pattern matching). > {code} > tajo> \df > List of functions > Name | Result data type | Argument data types | Type > -----+------------------+---------------------+------------- > avg | FLOAT8 | INT8 | AGGREGATION > sum | INT8 | INT8 | AGGREGATION > sum | INT4 | INT4 | AGGREGATION > sum | FLOAT4 | FLOAT4 | AGGREGATION > ... > (80 rows) > tajo> \df sum > List of functions > Name | Result data type | Argument data types | Type > -----+------------------+---------------------+------------- > sum | INT8 | INT8 | AGGREGATION > sum | INT4 | INT4 | AGGREGATION > sum | FLOAT4 | FLOAT4 | AGGREGATION > (3 rows) > Function: INT8 sum(expr INT8) > Description: The sum of a set of numbers. > Example: > > select sum(*) > {code} > When describing a specified function > if all functions have same description, prints out first function description. Otherwise prints out all function. > {code} > tajo> \df to_char > List of functions > Name | Result data type | Argument data types | Type > --------+-------------------+---------------------+------------- > to_char | TEXT | TIMETSTAMP, TEXT | GENERAL > to_char | TEXT | INT4 | GENERAL > (2 rows) > Function: TEXT to_char(timestamp TIMETSTAMP, pattern TEXT) > Description: convert time stamp to string. > Example: > > select to_char(current_timestamp, 'HH12:MI:SS'); > 11:34:52 > Function: TEXT to_char(pattern INT4) > Description: convert time stamp to string. > Example: > > select to_char(25, '000'); > 025 > {code} -- This message was sent by Atlassian JIRA (v6.1.5#6160)