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/09 06:08:00 UTC

[jira] [Updated] (CARBONDATA-1682) Incorrect output on presto CLI after applying alter query on a table

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

Vandana Yadav updated CARBONDATA-1682:
--------------------------------------
    Priority: Minor  (was: Major)

> Incorrect output on presto CLI after applying alter query on a table
> --------------------------------------------------------------------
>
>                 Key: CARBONDATA-1682
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-1682
>             Project: CarbonData
>          Issue Type: Bug
>          Components: presto-integration
>    Affects Versions: 1.3.0
>         Environment: spark 2.1
>            Reporter: Vandana Yadav
>            Priority: Minor
>
> Incorrect output on presto CLI after applying alter query on a table
> Steps to reproduce:
> On beeline 
> 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) Execute Query:
> a)desc uniqdata;
> b) alter table uniqdata drop columns (cust_id);
> c)select cust_id from uniqdata;
> output:
> Error: org.apache.spark.sql.AnalysisException: cannot resolve '`cust_id`' given input columns: [doj, dob, double_column1, double_column2, active_emui_version, bigint_column1, decimal_column1, decimal_column2, cust_name, bigint_column2, integer_column1]; line 1 pos 7;
> 'Project ['cust_id]
> +- SubqueryAlias uniqdata
>    +- Relation[cust_name#3097,active_emui_version#3098,dob#3099,doj#3100,bigint_column1#3101L,bigint_column2#3102L,decimal_column1#3103,decimal_column2#3104,double_column1#3105,double_column2#3106,integer_column1#3107] CarbonDatasourceHadoopRelation [ Database name :newpresto, Table name :uniqdata, Schema :Some(StructType(StructField(cust_name,StringType,true), StructField(active_emui_version,StringType,true), StructField(dob,TimestampType,true), StructField(doj,TimestampType,true), StructField(bigint_column1,LongType,true), StructField(bigint_column2,LongType,true), StructField(decimal_column1,DecimalType(30,10),true), StructField(decimal_column2,DecimalType(36,10),true), StructField(double_column1,DoubleType,true), StructField(double_column2,DoubleType,true), StructField(integer_column1,IntegerType,true))) ] (state=,code=0)
> On Presto CLI:
> 1) Execute Query:
> select cust_id from uniqdata;
> 2)Expected Output: It should through an error same as on Beeline
> 3)Actual Output:
>  cust_id 
> ---------
> (0 rows)



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