[
https://issues.apache.org/jira/browse/TRAFODION-199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Atanu Mishra closed TRAFODION-199.
----------------------------------
Resolution: Fixed
Assignee: (was: Apache Trafodion)
Fix Version/s: 1.0 (pre-incubation)
> LP Bug: 1294831 - Row count returned from upsert-using-load-into <traf-tbl>
> from <hive-tbl> may be incorrect.
> -------------------------------------------------------------------------------------------------------------
>
> Key: TRAFODION-199
> URL: https://issues.apache.org/jira/browse/TRAFODION-199
> Project: Apache Trafodion
> Issue Type: Bug
> Components: sql-exe
> Reporter: Julie Thai
> Priority: Critical
> Fix For: 1.0 (pre-incubation)
>
>
> Symptom:
> Row count returned from 'upsert using load into...' is inconsistent with
> count(*) row count.
> >>upsert using load into mysch.orders select o_orderkey, o_custkey,
> >>o_orderstatus, o_totalprice, cast(o_orderdate as date), o_orderpriority,
> >>o_clerk, o_shippriority, o_comment from hive.hive.orders;
> --- 3000121 row(s) inserted.
> >>select count(*) from mysch.orders;
> (EXPR)
> --------------------
> 3000000
> --- 1 row(s) selected.
> To reproduce:
> 1. Setup hive table and load from text file (see attachment) with 3M rows:
> CREATE TABLE orders
> (
> O_ORDERKEY INT
> , O_CUSTKEY INT
> , O_ORDERSTATUS STRING
> , O_TOTALPRICE DOUBLE
> , O_ORDERDATE TIMESTAMP
> , O_ORDERPRIORITY STRING
> , O_CLERK STRING
> , O_SHIPPRIORITY INT
> , O_COMMENT STRING
> )
> row format delimited fields terminated by '|'
> ;
> load data local inpath './orders.tbl' into table orders;
> 2. In traf, create table and upsert-using-load from hive table:
> create schema MYSCH;
> CREATE TABLE MYSCH.ORDERS
> (
> O_ORDERKEY INT NO DEFAULT NOT NULL
> , O_CUSTKEY INT NO DEFAULT NOT NULL
> , O_ORDERSTATUS CHAR(1) CHARACTER SET ISO88591 NO
> DEFAULT
> NOT NULL
> , O_TOTALPRICE NUMERIC(12, 2) NO DEFAULT NOT NULL
> , O_ORDERDATE DATE NO DEFAULT NOT NULL
> , O_ORDERPRIORITY CHAR(15) CHARACTER SET ISO88591 NO
> DEFAULT NOT NULL
> , O_CLERK CHAR(15) CHARACTER SET ISO88591 NO
> DEFAULT NOT NULL
> , O_SHIPPRIORITY INT NO DEFAULT NOT NULL
> , O_COMMENT VARCHAR(79) CHARACTER SET ISO88591 NO
> DEFAULT NOT NULL
> , PRIMARY KEY (O_ORDERKEY ASC)
> )
> ;
> upsert using load into MYSCH.ORDERS
> select o_orderkey, o_custkey, o_orderstatus, o_totalprice,
> cast(o_orderdate as date), o_orderpriority, o_clerk,
> o_shippriority, o_comment from hive.hive.orders;
> select count(*) from MYSCH.ORDERS;
> Assigned to LaunchPad User khaled Bouaziz
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)