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

Casting the output of xpath_string hive function results in a function not found error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • Future
    • Functions - Hive
    • None

    Description

      git.commit.id.abbrev=4baf9e7

      The below query works :

      select xpath_string ('<a><b id="5"><c/></b><b id="2"><c/></b></a>','/descendant::c/ancestor::b/@id') from dfs.`cross-sources`.`fewtypes_null.parquet` limit 1;
      +---------+
      | EXPR$0  |
      +---------+
      | 5       |
      +---------+
      

      However when I try to add a cast to the above query, it fails

      select cast(xpath_string ('<a><b id="5"><c/></b><b id="2"><c/></b></a>','/descendant::c/ancestor::b/@id') as int) from dfs.`cross-sources`.`fewtypes_null.parquet` limit 1;
      Error: SYSTEM ERROR: org.apache.drill.exec.exception.SchemaChangeException: Failure while trying to materialize incoming schema.  Errors:
       
      Error in expression at index -1.  Error: Missing function implementation: [castBIGINT(VAR16CHAR-OPTIONAL)].  Full expression: --UNKNOWN EXPRESSION--..
      
      Fragment 0:0
      
      [Error Id: 4037a41e-73c8-4a6b-a5d2-b5a949aba933 on qa-node190.qa.lab:31010] (state=,code=0)
      

      I attached the log file. Let me know if you need anything more.

      Attachments

        1. error.log
          17 kB
          Rahul Kumar Challapalli

        Activity

          People

            Unassigned Unassigned
            rkins Rahul Kumar Challapalli
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: