Just to be clear it is `right` and `left` (enclosing back-ticks). My
previous reply might have shown a star enclosing them - that was *bold
*format not
being handled correctly.

On Sat, Feb 14, 2015 at 1:26 AM, Abhishek Girish <[email protected]> wrote:

> Hi Minnow,
>
> Can you try this:
>
> > select *`right`*('blahblah',2) from sys.options limit 1;
>
> +------------+
> |   EXPR$0   |
> +------------+
> | ah         |
> +------------+
> 1 row selected (0.046 seconds)
>
> > select *`left`*('blahblah',2) from sys.options limit 1;
> +------------+
> |   EXPR$0   |
> +------------+
> | bl         |
> +------------+
> 1 row selected (0.039 seconds)
>
> Regards,
> Abhishek
>
> On Fri, Feb 13, 2015 at 6:59 PM, Minnow Noir <[email protected]> wrote:
>
>> right() is documented on the wiki (
>> https://cwiki.apache.org/confluence/display/DRILL/SQL+Functions, last
>> edited 6 weeks ago), but doesn't seem to be a valid function:
>>
>> use sys;
>> 0: jdbc:drill:zk=local> select right("blahblah",2) from version;
>> Query failed: Query failed: Failure parsing SQL. Encountered "right" at
>> line 1, column 8.
>>
>> It doesn't show up in the list of expected functions:
>>
>>   "POWER" ...
>>     "RANK" ...
>>     "ROW_NUMBER" ...
>>     "SQRT" ...
>>     "STDDEV_POP" ...
>>
>> What am I missing?
>>
>
>

Reply via email to