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

NumberFormatException when casting empty string to int in hbase/maprdb

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2.0
    • None
    • Functions - Drill
    • None

    Description

      Queries to null values in HBase with no data when casting to Integer results in NumberFormatException:

      Data 
      
      row1,1,2 
      row2,,4 
      row3,5,6 
      row4,7,8 
      
      Create Table 
      
      $ maprcli table create -path /user/cmatta/projects/cmatta_test 
      $ maprcli table cf create -path /user/cmatta/projects/cmatta_test -cfname a 
      
      Load into Hbase table: 
      
      hbase org.apache.hadoop.hbase.mapreduce.ImportTsv -Dimporttsv.separator=',' -Dimporttsv.columns=HBASE_ROW_KEY,a:c1,a:c2 /user/cmatta/projects/cmatta_test maprfs:///user/cmatta/projects/testdata_hbase_null 
      
      0: jdbc:drill:> select cast(x.`row_key` as varchar(128)) as `row_key`, CAST(x.`a`.`c1` as INTEGER) from maprfs.cmatta.`cmatta_test` x; 
      Error: SYSTEM ERROR: NumberFormatException: 
      
      Fragment 0:0 
      
      [Error Id: 05a0e5ed-d830-4926-a442-569c9d70d0b4 on se-node11.se.lab:31010] (state=,code=0) 
      

      Attachments

        Activity

          People

            vitalii Vitalii Diravka
            vitalii Vitalii Diravka
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: