Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-7321

split function doesn't work without from

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.16.0
    • Fix Version/s: 1.17.0
    • Component/s: Functions - Drill
    • Labels:
      None

      Description

      SELECT upper('foo') AS a /* OK */;
      +-----+
      |  a  |
      +-----+
      | foo |
      +-----+
      

      but

      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--.

      Note that

      SELECT split(a,',') AS a FROM (SELECT 'foo,bar,buz' AS a) /* OK */;
      +---------------------+
      |          a          |
      +---------------------+
      | ["foo","bar","buz"] |
      +---------------------+
      

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                volodymyr Vova Vysotskyi
                Reporter:
                benj641 benj
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: