You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/01/18 09:29:06 UTC

[GitHub] [incubator-doris] caiconghui opened a new issue #2795: Support new show functions syntax to make user search function more conveniently

caiconghui opened a new issue #2795: Support new show functions syntax to make user search function more conveniently 
URL: https://github.com/apache/incubator-doris/issues/2795
 
 
   **Is your feature request related to a problem? Please describe.**
   old show function syntax can only show function that user defined, and not support filter to find function fast, which is not convenient for new doris user to use builtin functions or user defined functions
   
   **Describe the solution you'd like**
   Support show functions syntax like following:
   SHOW [FULL] [BUILTIN] FUNCTIONS [IN | FROM DB] [LIKE 'FUNCTION_PATTERN']
   And Support following Example to help user know how to use function, 
   DESC|DESCRIBE FUNCTION [DB.]FUNCTION_NAME
   
   mysql> show builtin functions in test like 'year%';
   +---------------+
   | Function Name |
   +---------------+
   | year          |
   | years_add     |
   | years_diff    |
   | years_sub     |
   +---------------+
   4 rows in set (0.00 sec)
   
   mysql> show full builtin functions in test like 'year%';
   +-------------------------------+-------------+---------------+-------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
   | Signature                     | Return Type | Function Type | Intermediate Type | Properties                                                                                                                                      |
   +-------------------------------+-------------+---------------+-------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
   | year(DATETIME)                | INT         | Scalar        | NULL              | {"symbol":"_ZN5doris18TimestampFunctions4yearEPN9doris_udf15FunctionContextERKNS1_11DateTimeValE","object_file":"","md5":""}                    |
   | years_add(DATETIME,INT)       | DATETIME    | Scalar        | NULL              | {"symbol":"_ZN5doris18TimestampFunctions9years_addEPN9doris_udf15FunctionContextERKNS1_11DateTimeValERKNS1_6IntValE","object_file":"","md5":""} |
   | years_diff(DATETIME,DATETIME) | BIGINT      | Scalar        | NULL              | {"symbol":"_ZN5doris18TimestampFunctions10years_diffEPN9doris_udf15FunctionContextERKNS1_11DateTimeValES6_","object_file":"","md5":""}          |
   | years_sub(DATETIME,INT)       | DATETIME    | Scalar        | NULL              | {"symbol":"_ZN5doris18TimestampFunctions9years_subEPN9doris_udf15FunctionContextERKNS1_11DateTimeValERKNS1_6IntValE","object_file":"","md5":""} |
   +-------------------------------+-------------+---------------+-------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
   4 rows in set (0.02 sec)
   
   mysql> 
   
   And describe function year will return the example about how to use function, this syntax is like sparksql or imapala syntax, which is more friendly for user fast know how to use functions  
   
   one example is like following:
   DESC FUNCTION max;
     +--------------------------------------------------------------+
     |function_desc                                                 |
     +--------------------------------------------------------------+
     |Function: max                                                 |
     |Class: org.apache.spark.sql.catalyst.expressions.aggregate.Max|
     |Usage: max(expr) - Returns the maximum value of `expr`.       |
     +--------------------------------------------------------------+
   
   
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] imay closed issue #2795: Support new show functions syntax to make user search function more conveniently

Posted by GitBox <gi...@apache.org>.
imay closed issue #2795: Support new show functions syntax to make user search function more conveniently 
URL: https://github.com/apache/incubator-doris/issues/2795
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org