HUE-7738 [editor] Add function description in autocomplete API

Review Request #15228 — Created June 11, 2020 and submitted

romain
hue
master
HUE-7738
hue
johan, ranade, romain, Sreenath, yingc
commit 947d2e1e98b6eb7e3ad2b6943fb7de98176739c9
Author: Romain <romain.rigaux@gmail.com>
Date:   Fri Jun 5 07:25:49 2020 -0700

    HUE-7738 [editor] Add function description in autocomplete API
    
    Hive only.
    
    e.g.
    
    $.post("/notebook/api/autocomplete/trunc", {
          "snippet": ko.mapping.toJSON({
              type: "41"
          }),
          "operation": "function"
        }, function(data) {
          console.log(ko.mapping.toJSON(data));
        });
    
    {"status":0,"message":"","function":{"name":"trunc","signature":"trunc(date, fmt)","description":"Returns returns date with the time portion of the day truncated to the unit specified by the format model fmt. If you omit fmt, then date is truncated to the nearest day. It now only supports 'MONTH'/'MON'/'MM' and 'YEAR'/'YYYY'/'YY' as format.\ndate is a string in the format 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd'. The time part of date is ignored.\nExample:\n  > SELECT trunc('2009-02-12', 'MM');\nOK\n '2009-02-01'\n > SELECT trunc('2015-10-27', 'YEAR');\nOK\n '2015-01-01'"}}

:100644 100644 116cf6dde6 c4f80f5767 M	apps/beeswax/src/beeswax/api.py
:100644 100644 7d456c3707 6a93208925 M	apps/beeswax/src/beeswax/api_tests.py
:100644 100644 6d907b8f95 67a258f95c M	apps/beeswax/src/beeswax/server/dbms.py
:000000 100644 0000000000 601c866a76 A	docs/designs/sql/autocomplete_udfs.md
:100644 100644 50942f73fa 44082f9ba9 M	docs/docs-site/content/developer/api/_index.md

new tests

johan
  1. Cool!

  2. 
      
romain
Review request changed

Status: Closed (submitted)

Loading...