carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vandana Yadav (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (CARBONDATA-1952) Incorrect Result displays while applying delete query on table
Date Fri, 05 Jan 2018 06:19:00 GMT

     [ https://issues.apache.org/jira/browse/CARBONDATA-1952?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Vandana Yadav closed CARBONDATA-1952.
-------------------------------------
    Resolution: Fixed

Not an issue, this is normal behavior of delete

> Incorrect Result displays while applying delete query on table
> --------------------------------------------------------------
>
>                 Key: CARBONDATA-1952
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-1952
>             Project: CarbonData
>          Issue Type: Bug
>          Components: hive-integration
>    Affects Versions: 1.3.0
>         Environment: spark 2.1
>            Reporter: Vandana Yadav
>            Priority: Minor
>         Attachments: 2000_UniqData.csv
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message