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

Incorrect Result displays while applying delete query on table

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.3.0
    • None
    • hive-integration
    • None
    • spark 2.1

    Description

      Incorrect Result while applying delete query on the table.

      Steps to reproduce:
      1)Create table:
      CREATE TABLE uniqdata_delete (CUST_ID int,CUST_NAME String,ACTIVE_EMUI_VERSION string, DOB timestamp, DOJ timestamp, BIGINT_COLUMN1 bigint,BIGINT_COLUMN2 bigint,DECIMAL_COLUMN1 decimal(30,10), DECIMAL_COLUMN2 decimal(36,10),Double_COLUMN1 double, Double_COLUMN2 double, INTEGER_COLUMN1 int) STORED BY 'org.apache.carbondata.format' TBLPROPERTIES ("TABLE_BLOCKSIZE"= "256 MB")

      2)Load Data Into table:
      LOAD DATA INPATH 'HDFS_URL/BabuStore/Data/uniqdata/2000_UniqData.csv' into table uniqdata_delete OPTIONS('FILEHEADER'='CUST_ID,CUST_NAME,ACTIVE_EMUI_VERSION,DOB,DOJ,BIGINT_COLUMN1,BIGINT_COLUMN2,DECIMAL_COLUMN1,DECIMAL_COLUMN2,Double_COLUMN1,Double_COLUMN2,INTEGER_COLUMN1')

      3)Execute Query:
      a) select count from uniqdata_delete;
      Output:
      -----------+

      count(1)

      -----------+

      2013

      -----------+
      1 row selected (0.203 seconds)

      b)delete from uniqdata_delete where CUST_ID NOT IN(9996,9999);

      c) select count from uniqdata_delete;
      output:
      -----------+

      count(1)

      -----------+

      14

      -----------+
      1 row selected (0.22 seconds)

      d) select * from uniqdata_delete;
      output:
      -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

      cust_id cust_name active_emui_version dob doj bigint_column1 bigint_column2 decimal_column1 decimal_column2 double_column1 double_column2 integer_column1

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

      NULL     NULL NULL NULL NULL NULL NULL NULL NULL NULL
      NULL     NULL NULL 1233720368578 NULL NULL NULL NULL NULL NULL
      NULL     NULL NULL NULL -223372036854 NULL NULL NULL NULL NULL
      NULL     NULL NULL NULL NULL 12345678901.1234000000 NULL NULL NULL NULL
      NULL     NULL NULL NULL NULL NULL 22345678901.1234000000 NULL NULL NULL
      NULL     NULL NULL NULL NULL NULL NULL 1.12345674897976E10 NULL NULL
      NULL     NULL NULL NULL NULL NULL NULL NULL -1.12345674897976E10 NULL
      NULL     NULL NULL NULL NULL NULL NULL NULL NULL 0
      NULL     NULL 1970-01-01 12:00:03.0 NULL NULL NULL NULL NULL NULL NULL
      NULL     1970-01-01 11:00:03.0 NULL NULL NULL NULL NULL NULL NULL NULL
      NULL   ACTIVE_EMUI_VERSION_00000 NULL NULL NULL NULL NULL NULL NULL NULL NULL
      NULL CUST_NAME_00000   NULL NULL NULL NULL NULL NULL NULL NULL NULL
      9996 CUST_NAME_00996 ACTIVE_EMUI_VERSION_00996 1972-09-23 01:00:03.0 1972-09-23 02:00:03.0 123372037850 -223372035858 12345679897.1234000000 22345679897.1234000000 1.12345674897976E10 -1.12345674897976E10 997
      9999 CUST_NAME_00999 ACTIVE_EMUI_VERSION_00999 1972-09-26 01:00:03.0 1972-09-26 02:00:03.0 123372037853 -223372035855 12345679900.1234000000 22345679900.1234000000 1.12345674897976E10 -1.12345674897976E10 1000

      -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      14 rows selected (0.377 seconds)

      4) Expected Result: It should delete all rows except rows whose cust_included in delete query.

      5) Actual Result: It did not delete all rows except that mentioned rows.

      Attachments

        1. 2000_UniqData.csv
          367 kB
          Vandana Yadav

        Activity

          People

            Unassigned Unassigned
            Vandana7 Vandana Yadav
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: