You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by "Vandana Yadav (JIRA)" <ji...@apache.org> on 2017/11/24 07:28:00 UTC

[jira] [Closed] (CARBONDATA-1675) Incorrect result displays after applying drop column query on a table

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

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

this issue is resolved with https://github.com/apache/carbondata/pull/1486 PR.

> Incorrect result displays after applying drop column query on a table
> ---------------------------------------------------------------------
>
>                 Key: CARBONDATA-1675
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-1675
>             Project: CarbonData
>          Issue Type: Bug
>          Components: presto-integration
>    Affects Versions: 1.3.0
>         Environment: spark 2.1
>            Reporter: Vandana Yadav
>            Assignee: anubhav tarar
>            Priority: Minor
>
> Incorrect result displays after applying drop column query on a table
> Steps to reproduce:
> 1) Create table:
> 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")
> 2) Load data
> LOAD DATA INPATH 'hdfs://localhost:54310/Data/uniqdata/2000_UniqData.csv' into table uniqdata OPTIONS('DELIMITER'=',' , 'QUOTECHAR'='"','BAD_RECORDS_ACTION'='FORCE','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:
> desc uniqdata
> output:
> +----------------------+-----------------+----------+--+
> |       col_name       |    data_type    | comment  |
> +----------------------+-----------------+----------+--+
> | CUST_ID              | int             | NULL     |
> | CUST_NAME            | string          | NULL     |
> | ACTIVE_EMUI_VERSION  | string          | NULL     |
> | DOB                  | timestamp       | NULL     |
> | DOJ                  | timestamp       | NULL     |
> | BIGINT_COLUMN1       | bigint          | NULL     |
> | BIGINT_COLUMN2       | bigint          | NULL     |
> | DECIMAL_COLUMN1      | decimal(30,10)  | NULL     |
> | DECIMAL_COLUMN2      | decimal(36,10)  | NULL     |
> | Double_COLUMN1       | double          | NULL     |
> | Double_COLUMN2       | double          | NULL     |
> | INTEGER_COLUMN1      | int             | NULL     |
> +----------------------+-----------------+----------+--+
> 12 rows selected (0.041 seconds)
>  
> Start Presto server
> sudo ./bin/launcher run
> run presto CLI:
> ./presto --server localhost:9000 --catalog carbondata --schema newpresto
> On Presto CLI:
> 1) Execute Query:
> a) desc uniqdata;
> output:
>        Column        |      Type      | Extra | Comment 
> ---------------------+----------------+-------+---------
>  cust_id             | integer        |       |         
>  cust_name           | varchar        |       |         
>  active_emui_version | varchar        |       |         
>  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     | integer        |       |         
> (12 rows)
> b) Now on Beeline execute the drop column query on the table which is :
> alter table uniqdata drop columns (CUST_ID)
> c)desc uniqdata;
> Expected output: it should display updated table description as on beeline
> Actual output: 
> on beeline:
> 0: jdbc:hive2://localhost:10000> desc uniqdata;
> +----------------------+-----------------+----------+--+
> |       col_name       |    data_type    | comment  |
> +----------------------+-----------------+----------+--+
> | cust_name            | string          | NULL     |
> | active_emui_version  | string          | NULL     |
> | dob                  | timestamp       | NULL     |
> | doj                  | timestamp       | NULL     |
> | bigint_column1       | bigint          | NULL     |
> | bigint_column2       | bigint          | NULL     |
> | decimal_column1      | decimal(30,10)  | NULL     |
> | decimal_column2      | decimal(36,10)  | NULL     |
> | double_column1       | double          | NULL     |
> | double_column2       | double          | NULL     |
> | integer_column1      | int             | NULL     |
> +----------------------+-----------------+----------+--+
> 11 rows selected (0.039 seconds)
> On presto CLI
> presto:newpresto> desc uniqdata;
>        Column        |      Type      | Extra | Comment 
> ---------------------+----------------+-------+---------
>  cust_id             | integer        |       |         
>  cust_name           | varchar        |       |         
>  active_emui_version | varchar        |       |         
>  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     | integer        |       |         
> (12 rows)



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