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

[jira] [Comment Edited] (CARBONDATA-1743) Carbon1.3.0-Pre-AggregateTable - Query returns no value if run at the time of pre-aggregate table creation

    [ https://issues.apache.org/jira/browse/CARBONDATA-1743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16285692#comment-16285692 ] 

Ramakrishna S edited comment on CARBONDATA-1743 at 12/11/17 9:54 AM:
---------------------------------------------------------------------

Same behaviour found if pre-agg table is created along with the parent table load, NULL values will be inserted to pre-agg table.

0: jdbc:hive2://10.18.98.34:23040> select * from lineitem1_agr_line limit 2;
+-----------------------+-------------------------+----------------------------+--+
| lineitem1_l_shipdate  | lineitem1_l_returnflag  | lineitem1_l_partkey_count  |
+-----------------------+-------------------------+----------------------------+--+
| NULL                  | NULL                    | NULL                       |
| NULL                  | NULL                    | NULL                       |
+-----------------------+-------------------------+----------------------------


was (Author: ram@huawei):
Same behaviour found if pre-agg table is created along with the parent table load, NULL values will be inserted to pre-agg table.

> Carbon1.3.0-Pre-AggregateTable - Query returns no value if run at the time of pre-aggregate table creation
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: CARBONDATA-1743
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-1743
>             Project: CarbonData
>          Issue Type: Bug
>          Components: data-load
>    Affects Versions: 1.3.0
>         Environment: Test - 3 node ant cluster
>            Reporter: Ramakrishna S
>            Assignee: Kunal Kapoor
>              Labels: DFX
>             Fix For: 1.3.0
>
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> Steps:
> 1. Create table and load with large data
> create table if not exists lineitem4(L_SHIPDATE string,L_SHIPMODE string,L_SHIPINSTRUCT string,L_RETURNFLAG string,L_RECEIPTDATE string,L_ORDERKEY string,L_PARTKEY string,L_SUPPKEY   string,L_LINENUMBER int,L_QUANTITY double,L_EXTENDEDPRICE double,L_DISCOUNT double,L_TAX double,L_LINESTATUS string,L_COMMITDATE string,L_COMMENT  string) STORED BY 'org.apache.carbondata.format' TBLPROPERTIES ('table_blocksize'='128','NO_INVERTED_INDEX'='L_SHIPDATE,L_SHIPMODE,L_SHIPINSTRUCT,L_RETURNFLAG,L_RECEIPTDATE,L_ORDERKEY,L_PARTKEY,L_SUPPKEY','sort_columns'='');
> load data inpath "hdfs://hacluster/user/test/lineitem.tbl.1" into table lineitem4 options('DELIMITER'='|','FILEHEADER'='L_ORDERKEY,L_PARTKEY,L_SUPPKEY,L_LINENUMBER,L_QUANTITY,L_EXTENDEDPRICE,L_DISCOUNT,L_TAX,L_RETURNFLAG,L_LINESTATUS,L_SHIPDATE,L_COMMITDATE,L_RECEIPTDATE,L_SHIPINSTRUCT,L_SHIPMODE,L_COMMENT');
> 2. Create a pre-aggregate table 
> create datamap agr_lineitem4 ON TABLE lineitem4 USING "org.apache.carbondata.datamap.AggregateDataMapHandler" as select L_RETURNFLAG,L_LINESTATUS,sum(L_QUANTITY),sum(L_EXTENDEDPRICE) from lineitem4 group by  L_RETURNFLAG, L_LINESTATUS;
> 3. Run aggregate query at the same time
>  select l_returnflag,l_linestatus,sum(l_quantity),sum(l_extendedprice) from lineitem4 group by l_returnflag, l_linestatus;
> *+Expected:+*: aggregate query should fetch data either from main table or pre-aggregate table.
> *+Actual:+* aggregate query does not return data until the pre-aggregate table is created
> 0: jdbc:hive2://10.18.98.48:23040> select l_returnflag,l_linestatus,sum(l_quantity),sum(l_extendedprice) from lineitem4 group by l_returnflag, l_linestatus;
> +---------------+---------------+------------------+-----------------------+--+
> | l_returnflag  | l_linestatus  | sum(l_quantity)  | sum(l_extendedprice)  |
> +---------------+---------------+------------------+-----------------------+--+
> +---------------+---------------+------------------+-----------------------+--+
> No rows selected (1.74 seconds)
> 0: jdbc:hive2://10.18.98.48:23040> select l_returnflag,l_linestatus,sum(l_quantity),sum(l_extendedprice) from lineitem4 group by l_returnflag, l_linestatus;
> +---------------+---------------+------------------+-----------------------+--+
> | l_returnflag  | l_linestatus  | sum(l_quantity)  | sum(l_extendedprice)  |
> +---------------+---------------+------------------+-----------------------+--+
> +---------------+---------------+------------------+-----------------------+--+
> No rows selected (0.746 seconds)
> 0: jdbc:hive2://10.18.98.48:23040> select l_returnflag,l_linestatus,sum(l_quantity),sum(l_extendedprice) from lineitem4 group by l_returnflag, l_linestatus;
> +---------------+---------------+------------------+------------------------+--+
> | l_returnflag  | l_linestatus  | sum(l_quantity)  |  sum(l_extendedprice)  |
> +---------------+---------------+------------------+------------------------+--+
> | N             | F             | 2.9808092E7      | 4.471079473931997E10   |
> | A             | F             | 1.145546488E9    | 1.717580824169429E12   |
> | N             | O             | 2.31980219E9     | 3.4789002701143467E12  |
> | R             | F             | 1.146403932E9    | 1.7190627928317903E12  |
> +---------------+---------------+------------------+------------------------+--+
> 4 rows selected (0.8 seconds)
> 0: jdbc:hive2://10.18.98.48:23040> select l_returnflag,l_linestatus,sum(l_quantity),sum(l_extendedprice) from lineitem4 group by l_returnflag, l_linestatus;
> +---------------+---------------+------------------+------------------------+--+
> | l_returnflag  | l_linestatus  | sum(l_quantity)  |  sum(l_extendedprice)  |
> +---------------+---------------+------------------+------------------------+--+
> | N             | F             | 2.9808092E7      | 4.471079473931997E10   |
> | A             | F             | 1.145546488E9    | 1.717580824169429E12   |
> | N             | O             | 2.31980219E9     | 3.4789002701143467E12  |
> | R             | F             | 1.146403932E9    | 1.7190627928317903E12  |
> +---------------+---------------+------------------+------------------------+--+



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