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

drill fails to display binary in hive correctly

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.1.0
    • Storage - Hive
    • None

    Description

      Hive table ddl

      create table alldrilltypes
      (c1 int, c2 boolean, c3 double, c4 string,
      c9 tinyint, c10 smallint, c11 float, c12 bigint,
      c19 binary);

      doing a select from drill works but c19 shows up as binary

      0: jdbc:drill:schema=hive> SELECT c1,c2,c3,c4,c9,c10,c11,c12,c19 from alldrilltypes;
      --------------------------------------------------------------------------------------------

      c1 c2 c3 c4 c9 c10 c11 c12 c19

      --------------------------------------------------------------------------------------------

      null null null null null null null null null
      -1 false -1.1   -1 -1 -1.0 -1 null
      1 true 1.1 1 1 1 1.0 1 [B@661725c1

      --------------------------------------------------------------------------------------------

      A cast does not work either:
      SELECT c1,c2,c3,c4,c9,c10,c11,c12,cast(c19 as varchar) from alldrilltypes;
      message: "Failure while parsing sql. < ValidationException:[ org.eigenbase.util.EigenbaseContextException: From line 1, column 35 to line 1, column 54 ] < EigenbaseContextException:[ From line 1, column 35 to line 1, column 54 ] < SqlValidatorException:[ Cast function cannot convert value of type BINARY(1) to type VARCHAR(1) ]"

      Attachments

        Activity

          People

            mehant Mehant Baid
            inramana Ramana Inukonda Nagaraj
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: