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

Cannot cast hive binary to varchar

    XMLWordPrintableJSON

Details

    Description

      git.commit.id.abbrev=710f829

      The below query fails with a fragment initialization error

      select cast(col1 as varchar(10)) from hive.temp_bin;
      Error: PARSE ERROR: From line 1, column 8 to line 1, column 32: Cast function cannot convert value of type BINARY(1) to type VARCHAR(10)
      
      
      [Error Id: e7937c82-a249-4596-895f-eae2c54cfd45 on qa-node191.qa.lab:31010] (state=,code=0)
      

      Data creation steps :

      create table temp_bin (col1 BINARY) STORED AS TEXTFILE;
      insert overwrite table temp_bin select encode('abc', 'UTF-8') from temp limit 1;
      

      I attached the error logs.

      Attachments

        1. DRILL-3328-1.patch
          1 kB
          Venki Korukanti
        2. error.log
          6 kB
          Rahul Kumar Challapalli

        Activity

          People

            vkorukanti Venki Korukanti
            rkins Rahul Kumar Challapalli
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: