[jira] [Updated] (CARBONDATA-610) Update is not working with String Datatype & Date Datatype

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (CARBONDATA-610) Update is not working with String Datatype & Date Datatype

Akash R Nilugal (Jira)

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

abhishek giri updated CARBONDATA-610:
-------------------------------------
     Attachment: Screenshot from 2017-01-10 12-32-48.png
    Description:
Update query is not working with spark 1.6 and String and date

Create Table Query = CREATE TABLE uniqdata (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");

Load data query = LOAD DATA INPATH 'hdfs://localhost:54310/tmp/testData/3000_UniqData.csv' into table uniqdata 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');
 
Query for String = update uniqdata set (CUST_NAME)=('tony stark');

Query for Date = update uniqdata set (dob)=('2016-12-11') where cust_name = 'CUST_NAME_01999';


After update NULL is being inserted as shown below:

---------------------+-------------------------+----------------------+-----------------------+------------------+--+
| cust_id  | cust_name  |    active_emui_version     |          dob           |          doj           | bigint_column1  | bigint_column2  |     decimal_column1     |     decimal_column2     |    double_column1    |    double_column2     | integer_column1  |
+----------+------------+----------------------------+------------------------+------------------------+-----------------+-----------------+-------------------------+-------------------------+----------------------+-----------------------+------------------+--+
| 10987    | NULL       | ACTIVE_EMUI_VERSION_01987  | 1975-06-11 01:00:03.0  | 1975-06-11 02:00:03.0  | 123372038841    | -223372034867   | 12345.6808882656        | 22345.6808882656        | 1.12345674897976E10  | -1.12345674897976E10  | 1988             |
| 10988    | NULL       | ACTIVE_EMUI_VERSION_01988  | 1975-06-12 01:00:03.0  | 1975-06-12 02:00:03.0  | 123372038842    | -223372034866   | 12345.6808892656        | 22345.6808892656        | 1.12345674897976E10  | -1.12345674897976E10  | 1989             |
| 10989    | NULL       | ACTIVE_EMUI_VERSION_01989  | 1975-06-13 01:00:03.0  | 1975-06-13 02:00:03.0  | 123372038843    | -223372034865   | 12345.6808902656        | 22345.6808902656        | 1.12345674897976E10  | -1.12345674897976E10  | 1990             |
| 10990    | NULL       | ACTIVE_EMUI_VERSION_01990  | 1975-06-14 01:00:03.0  | 1975-06-14 02:00:03.0  | 123372038844    | -223372034864   | 12345.6808912656        | 22345.6808912656        | 1.12345674897976E10  | -1.12345674897976E10  | 1991             |
| 10991    | NULL       | ACTIVE_EMUI_VERSION_01991  | 1975-06-15 01:00:03.0  | 1975-06-15 02:00:03.0  | 123372038845    | -223372034863   | 12345.6808922656        | 22345.6808922656        | 1.12345674897976E10  | -1.12345674897976E10  | 1992             |
| 10992    | NULL       | ACTIVE_EMUI_VERSION_01992  | 1975-06-16 01:00:03.0  | 1975-06-16 02:00:03.0  | 123372038846    | -223372034862   | 12345.6808932656        | 22345.6808932656        | 1.12345674897976E10  | -1.12345674897976E10  | 1993             |
| 10993    | NULL       | ACTIVE_EMUI_VERSION_01993  | 1975-06-17 01:00:03.0  | 1975-06-17 02:00:03.0  | 123372038847    | -223372034861   | 12345.6808942656        | 22345.6808942656        | 1.12345674897976E10  | -1.12345674897976E10  | 1994             |
| 10994    | NULL       | ACTIVE_EMUI_VERSION_01994  | 1975-06-18 01:00:03.0  | 1975-06-18 02:00:03.0  | 123372038848    | -223372034860   | 12345.6808952656        | 22345.6808952656        | 1.12345674897976E10  | -1.12345674897976E10  | 1995             |
| 10995    | NULL       | ACTIVE_EMUI_VERSION_01995  | 1975-06-19 01:00:03.0  | 1975-06-19 02:00:03.0  | 123372038849    | -223372034859   | 12345.6808962656        | 22345.6808962656        | 1.12345674897976E10  | -1.12345674897976E10  | 1996             |
| 10996    | NULL       | ACTIVE_EMUI_VERSION_01996  | 1975-06-20 01:00:03.0  | 1975-06-20 02:00:03.0  | 123372038850    | -223372034858   | 12345.6808972656        | 22345.6808972656        | 1.12345674897976E10  | -1.12345674897976E10  | 1997             |
| 10997    | NULL       | ACTIVE_EMUI_VERSION_01997  | 1975-06-21 01:00:03.0  | 1975-06-21 02:00:03.0  | 123372038851    | -223372034857   | 12345.6808982656        | 22345.6808982656        | 1.12345674897976E10  | -1.12345674897976E10  | 1998             |
| 10998    | NULL       | ACTIVE_EMUI_VERSION_01998  | 1975-06-22 01:00:03.0  | 1975-06-22 02:00:03.0  | 123372038852    | -223372034856   | 12345.6808992656        | 22345.6808992656        | 1.12345674897976E10  | -1.12345674897976E10  | 1999             |
+----------+------------+----------------------------+------------------------+------------------------+-----------------+-----------------+-------------------------+-------------------------+----------------------+-----------------------+------------------+--+

For Date snapshot is attached


  was:
Update query is not working with spark 1.6 and String

Create Table Query = CREATE TABLE uniqdata (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");

Load data query = LOAD DATA INPATH 'hdfs://localhost:54310/tmp/testData/3000_UniqData.csv' into table uniqdata 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');
 
Query = update uniqdata set (CUST_NAME)=('tony stark');

After update NULL is being inserted as shown below:

---------------------+-------------------------+----------------------+-----------------------+------------------+--+
| cust_id  | cust_name  |    active_emui_version     |          dob           |          doj           | bigint_column1  | bigint_column2  |     decimal_column1     |     decimal_column2     |    double_column1    |    double_column2     | integer_column1  |
+----------+------------+----------------------------+------------------------+------------------------+-----------------+-----------------+-------------------------+-------------------------+----------------------+-----------------------+------------------+--+
| 10987    | NULL       | ACTIVE_EMUI_VERSION_01987  | 1975-06-11 01:00:03.0  | 1975-06-11 02:00:03.0  | 123372038841    | -223372034867   | 12345.6808882656        | 22345.6808882656        | 1.12345674897976E10  | -1.12345674897976E10  | 1988             |
| 10988    | NULL       | ACTIVE_EMUI_VERSION_01988  | 1975-06-12 01:00:03.0  | 1975-06-12 02:00:03.0  | 123372038842    | -223372034866   | 12345.6808892656        | 22345.6808892656        | 1.12345674897976E10  | -1.12345674897976E10  | 1989             |
| 10989    | NULL       | ACTIVE_EMUI_VERSION_01989  | 1975-06-13 01:00:03.0  | 1975-06-13 02:00:03.0  | 123372038843    | -223372034865   | 12345.6808902656        | 22345.6808902656        | 1.12345674897976E10  | -1.12345674897976E10  | 1990             |
| 10990    | NULL       | ACTIVE_EMUI_VERSION_01990  | 1975-06-14 01:00:03.0  | 1975-06-14 02:00:03.0  | 123372038844    | -223372034864   | 12345.6808912656        | 22345.6808912656        | 1.12345674897976E10  | -1.12345674897976E10  | 1991             |
| 10991    | NULL       | ACTIVE_EMUI_VERSION_01991  | 1975-06-15 01:00:03.0  | 1975-06-15 02:00:03.0  | 123372038845    | -223372034863   | 12345.6808922656        | 22345.6808922656        | 1.12345674897976E10  | -1.12345674897976E10  | 1992             |
| 10992    | NULL       | ACTIVE_EMUI_VERSION_01992  | 1975-06-16 01:00:03.0  | 1975-06-16 02:00:03.0  | 123372038846    | -223372034862   | 12345.6808932656        | 22345.6808932656        | 1.12345674897976E10  | -1.12345674897976E10  | 1993             |
| 10993    | NULL       | ACTIVE_EMUI_VERSION_01993  | 1975-06-17 01:00:03.0  | 1975-06-17 02:00:03.0  | 123372038847    | -223372034861   | 12345.6808942656        | 22345.6808942656        | 1.12345674897976E10  | -1.12345674897976E10  | 1994             |
| 10994    | NULL       | ACTIVE_EMUI_VERSION_01994  | 1975-06-18 01:00:03.0  | 1975-06-18 02:00:03.0  | 123372038848    | -223372034860   | 12345.6808952656        | 22345.6808952656        | 1.12345674897976E10  | -1.12345674897976E10  | 1995             |
| 10995    | NULL       | ACTIVE_EMUI_VERSION_01995  | 1975-06-19 01:00:03.0  | 1975-06-19 02:00:03.0  | 123372038849    | -223372034859   | 12345.6808962656        | 22345.6808962656        | 1.12345674897976E10  | -1.12345674897976E10  | 1996             |
| 10996    | NULL       | ACTIVE_EMUI_VERSION_01996  | 1975-06-20 01:00:03.0  | 1975-06-20 02:00:03.0  | 123372038850    | -223372034858   | 12345.6808972656        | 22345.6808972656        | 1.12345674897976E10  | -1.12345674897976E10  | 1997             |
| 10997    | NULL       | ACTIVE_EMUI_VERSION_01997  | 1975-06-21 01:00:03.0  | 1975-06-21 02:00:03.0  | 123372038851    | -223372034857   | 12345.6808982656        | 22345.6808982656        | 1.12345674897976E10  | -1.12345674897976E10  | 1998             |
| 10998    | NULL       | ACTIVE_EMUI_VERSION_01998  | 1975-06-22 01:00:03.0  | 1975-06-22 02:00:03.0  | 123372038852    | -223372034856   | 12345.6808992656        | 22345.6808992656        | 1.12345674897976E10  | -1.12345674897976E10  | 1999             |
+----------+------------+----------------------------+------------------------+------------------------+-----------------+-----------------+-------------------------+-------------------------+----------------------+-----------------------+------------------+--+





> Update is not working with String Datatype & Date Datatype
> ----------------------------------------------------------
>
>                 Key: CARBONDATA-610
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-610
>             Project: CarbonData
>          Issue Type: Bug
>          Components: data-query
>    Affects Versions: 1.0.0-incubating
>         Environment: SPARK=1.6
>            Reporter: abhishek giri
>         Attachments: 3000_UniqData.csv, Screenshot from 2017-01-10 12-32-48.png
>
>
> Update query is not working with spark 1.6 and String and date
> Create Table Query = CREATE TABLE uniqdata (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");
> Load data query = LOAD DATA INPATH 'hdfs://localhost:54310/tmp/testData/3000_UniqData.csv' into table uniqdata 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');
>  
> Query for String = update uniqdata set (CUST_NAME)=('tony stark');
> Query for Date = update uniqdata set (dob)=('2016-12-11') where cust_name = 'CUST_NAME_01999';
> After update NULL is being inserted as shown below:
> ---------------------+-------------------------+----------------------+-----------------------+------------------+--+
> | cust_id  | cust_name  |    active_emui_version     |          dob           |          doj           | bigint_column1  | bigint_column2  |     decimal_column1     |     decimal_column2     |    double_column1    |    double_column2     | integer_column1  |
> +----------+------------+----------------------------+------------------------+------------------------+-----------------+-----------------+-------------------------+-------------------------+----------------------+-----------------------+------------------+--+
> | 10987    | NULL       | ACTIVE_EMUI_VERSION_01987  | 1975-06-11 01:00:03.0  | 1975-06-11 02:00:03.0  | 123372038841    | -223372034867   | 12345.6808882656        | 22345.6808882656        | 1.12345674897976E10  | -1.12345674897976E10  | 1988             |
> | 10988    | NULL       | ACTIVE_EMUI_VERSION_01988  | 1975-06-12 01:00:03.0  | 1975-06-12 02:00:03.0  | 123372038842    | -223372034866   | 12345.6808892656        | 22345.6808892656        | 1.12345674897976E10  | -1.12345674897976E10  | 1989             |
> | 10989    | NULL       | ACTIVE_EMUI_VERSION_01989  | 1975-06-13 01:00:03.0  | 1975-06-13 02:00:03.0  | 123372038843    | -223372034865   | 12345.6808902656        | 22345.6808902656        | 1.12345674897976E10  | -1.12345674897976E10  | 1990             |
> | 10990    | NULL       | ACTIVE_EMUI_VERSION_01990  | 1975-06-14 01:00:03.0  | 1975-06-14 02:00:03.0  | 123372038844    | -223372034864   | 12345.6808912656        | 22345.6808912656        | 1.12345674897976E10  | -1.12345674897976E10  | 1991             |
> | 10991    | NULL       | ACTIVE_EMUI_VERSION_01991  | 1975-06-15 01:00:03.0  | 1975-06-15 02:00:03.0  | 123372038845    | -223372034863   | 12345.6808922656        | 22345.6808922656        | 1.12345674897976E10  | -1.12345674897976E10  | 1992             |
> | 10992    | NULL       | ACTIVE_EMUI_VERSION_01992  | 1975-06-16 01:00:03.0  | 1975-06-16 02:00:03.0  | 123372038846    | -223372034862   | 12345.6808932656        | 22345.6808932656        | 1.12345674897976E10  | -1.12345674897976E10  | 1993             |
> | 10993    | NULL       | ACTIVE_EMUI_VERSION_01993  | 1975-06-17 01:00:03.0  | 1975-06-17 02:00:03.0  | 123372038847    | -223372034861   | 12345.6808942656        | 22345.6808942656        | 1.12345674897976E10  | -1.12345674897976E10  | 1994             |
> | 10994    | NULL       | ACTIVE_EMUI_VERSION_01994  | 1975-06-18 01:00:03.0  | 1975-06-18 02:00:03.0  | 123372038848    | -223372034860   | 12345.6808952656        | 22345.6808952656        | 1.12345674897976E10  | -1.12345674897976E10  | 1995             |
> | 10995    | NULL       | ACTIVE_EMUI_VERSION_01995  | 1975-06-19 01:00:03.0  | 1975-06-19 02:00:03.0  | 123372038849    | -223372034859   | 12345.6808962656        | 22345.6808962656        | 1.12345674897976E10  | -1.12345674897976E10  | 1996             |
> | 10996    | NULL       | ACTIVE_EMUI_VERSION_01996  | 1975-06-20 01:00:03.0  | 1975-06-20 02:00:03.0  | 123372038850    | -223372034858   | 12345.6808972656        | 22345.6808972656        | 1.12345674897976E10  | -1.12345674897976E10  | 1997             |
> | 10997    | NULL       | ACTIVE_EMUI_VERSION_01997  | 1975-06-21 01:00:03.0  | 1975-06-21 02:00:03.0  | 123372038851    | -223372034857   | 12345.6808982656        | 22345.6808982656        | 1.12345674897976E10  | -1.12345674897976E10  | 1998             |
> | 10998    | NULL       | ACTIVE_EMUI_VERSION_01998  | 1975-06-22 01:00:03.0  | 1975-06-22 02:00:03.0  | 123372038852    | -223372034856   | 12345.6808992656        | 22345.6808992656        | 1.12345674897976E10  | -1.12345674897976E10  | 1999             |
> +----------+------------+----------------------------+------------------------+------------------------+-----------------+-----------------+-------------------------+-------------------------+----------------------+-----------------------+------------------+--+
> For Date snapshot is attached



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)