You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "benj (JIRA)" <ji...@apache.org> on 2019/07/10 12:38:00 UTC

[jira] [Created] (DRILL-7321) split function doesn't work without from

benj created DRILL-7321:
---------------------------

             Summary: split function doesn't work without from
                 Key: DRILL-7321
                 URL: https://issues.apache.org/jira/browse/DRILL-7321
             Project: Apache Drill
          Issue Type: Bug
          Components: Functions - Drill
    Affects Versions: 1.16.0
            Reporter: benj


{code:java}
SELECT upper('foo') AS a /* OK */;
+-----+
|  a  |
+-----+
| foo |
+-----+
{code}
but
{code:java}
SELECT split('foo,bar,buz',',') AS a /* NOK */;
Error: PLAN ERROR: Failure while materializing expression in constant expression evaluator [SPLIT('foo,bar,buz', ',')].  Errors:
Error in expression at index -1.  Error: Only ProjectRecordBatch could have complex writer function. You are using complex writer function split in a non-project operation!.  Full expression: --UNKNOWN EXPRESSION--.{code}
Note that
{code:java}
SELECT split(a,',') AS a FROM (SELECT 'foo,bar,buz' AS a) /* OK */;
+---------------------+
|          a          |
+---------------------+
| ["foo","bar","buz"] |
+---------------------+
{code}
 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)