Uploaded image for project: 'CarbonData'
  1. CarbonData
  2. CARBONDATA-392

sql coalesce function is having problem in carbon for null data

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      When query is as below
      select * from table where coalesce( name ,1) != 'Lily';
      null row is not displayed.

      1. Create table
      CREATE TABLE big_int(imei string,age int,task bigint,name string,country string,city string,sale int,num double,level decimal(10,3),quest bigint,productdate timestamp,enddate timestamp,PointId double,score decimal(10,3))STORED BY 'org.apache.carbondata.format' TBLPROPERTIES('dictionary_include' = 'imei,name,age,productdate,enddate,country ,city ,sale ,num ,PointId,level,score,task,quest',"COLUMNPROPERTIES.level.shared_column"= "share.level");
      2.LOAD DATA INPATH 'csvfile path' INTO TABLE big_int options ('DELIMITER'=',', 'QUOTECHAR'='"');

      below is content of csv file
      imei0,2147,9279,fegt,china,hangzhou,10000,100.05,100.055,10,2016-05-01 12:25:36,2016-05-01 21:14:48,1,1.005
      imei1,-2148,-9807,lrhkr,America,NewYork,1000,10.05,100.05,100,2016-05-02 19:25:15,2016-05-02 22:25:46,2,1.05
      imei2,2147,9279,dfegt,china,hangzhou,10000,100.05,100.055,10,2016-05-01 12:25:36,2016-05-01 21:14:48,1,1.005
      imei3,-217,-9206,lrhkr,America,NewYork,1000,100.005,100.05,100,2016-05-02 19:25:15,2016-05-02 22:25:46,2,1.05
      imei4,10,0,Lily,America,LA,20,15.5,45,12,16,2016-06-12 12:25:12,2016-06-15 13:52:17,15.5,21
      imei5,

      3. run select query as below
      select imei,name,country,city,productdate,enddate,age,task,sale,num,level,quest,pointid,score from big_int where coalesce( name ,1) != 'Lily';

      There is null data in load but same is not displayed

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            ashok.blend Ashok Kumar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment