Using the backticks worked. Thanks for the tip. +------------+ | EXPR$0 | +------------+ | ah | +------------+ 1 row selected (1.448 seconds)
The docs ["right(str text, n int)"] don't mention anything about using backticks? On Sat, Feb 14, 2015 at 4: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? > > >
