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

split function doesn't work without from

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.16.0
    • 1.17.0
    • Functions - Drill
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: