[jira] [Resolved] (TRAFODION-1566) Ungraceful failure when transaction size limit reached

2016-07-01 Thread liu ming (JIRA)

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

liu ming resolved TRAFODION-1566.
-
   Resolution: Duplicate
Fix Version/s: 2.1-incubating

dup with TRAFODION-2046

> Ungraceful failure when transaction size limit reached
> --
>
> Key: TRAFODION-1566
> URL: https://issues.apache.org/jira/browse/TRAFODION-1566
> Project: Apache Trafodion
>  Issue Type: Bug
>  Components: dtm, sql-exe
>Affects Versions: 1.3-incubating
>Reporter: David Wayne Birdsall
>Assignee: liu ming
>Priority: Minor
> Fix For: 2.1-incubating
>
>
> When exceeding transaction size limits, DELETE fails with a puzzling error 
> message.
> The following script produces the problem on a workstation (using 
> install_local_hadoop, so the HMaster process is handling all four regions). 
> Best results if the setup section is done in a separate sqlci from the 
> deleteTest section (so you get current statistics):
> ?section setup
> create schema DeleteFailure;
> set schema DeleteFailure;
> -- create a table saltx with 458752 (=7*65536) rows, and another table
> -- salty, that is a copy of saltx
> CREATE TABLE saltx
>   (
> AINT NO DEFAULT NOT NULL NOT DROPPABLE
>   SERIALIZED
>   , BINT NO DEFAULT NOT NULL NOT DROPPABLE
>   SERIALIZED
>   , CVARCHAR(20) CHARACTER SET ISO88591 
> COLLATE
>   DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE SERIALIZED
>   , PRIMARY KEY (A ASC, B ASC)
>   )
>   SALT USING 4 PARTITIONS
> ;
> insert into saltx values (1,1,'hi there!'),
>   (2,1,'bye there!'),(3,1,'Happy Tuesday!'),(4,1,'Huckleberry Pie');
> insert into saltx select a+4,b,c from saltx;
> insert into saltx select a+8,b,c from saltx;
> insert into saltx select a+16,b,c from saltx;
> insert into saltx select a+32,b,c from saltx;
> insert into saltx select a+64,b,c from saltx;
> insert into saltx select a+128,b,c from saltx;
> insert into saltx select a+256,b,c from saltx;
> insert into saltx select a+512,b,c from saltx;
> insert into saltx select a+1024,b,c from saltx;
> upsert into saltx select a+2048,b,c from saltx;
> upsert into saltx select a+4096,b,c from saltx;
> upsert into saltx select a+8192,b,c from saltx;
> upsert into saltx select a+16384,b,c from saltx;
> upsert into saltx select a+32768,b,c from saltx;
> upsert using load into saltx select a,b+1,c from saltx;
> upsert using load into saltx select a,b+2,c from saltx where b = 1;
> upsert using load into saltx select a,b+3,c from saltx where b = 1;
> upsert using load into saltx select a,b+4,c from saltx where b = 1;
> upsert using load into saltx select a,b+5,c from saltx where b = 1;
> upsert using load into saltx select a,b+6,c from saltx where b = 1;
> update statistics for table saltx on every column;
> create table salty like saltx;
> upsert using load into salty select * from saltx;
> update statistics for table salty on every column;
> ?section deleteTest
> set schema DeleteFailure;
> set param ?b '4';  -- change it to '5' and the delete will succeed
> prepare xx from delete from saltx where b > ?b;  
> explain options 'f' xx;
> execute xx; -- fails with ungracious error message
> Here is a log showing the deleteTest section failing:
> [birdsall@dev02 IUDCosting]$ sqlci
> Apache Trafodion Conversational Interface 1.3.0
> Copyright (c) 2015 Apache Software Foundation
> >>obey deleteFailure.sql(deleteTest);
> >>?section deleteTest
> >>
> >>set schema DeleteFailure;
> --- SQL operation complete.
> >>
> >>set param ?b '4';
> >>  -- change it to '5' and the delete will succeed
> >>
> >>prepare xx from delete from saltx where b > ?b;
> --- SQL command prepared.
> >>
> >>explain options 'f' xx;
> LC   RC   OP   OPERATOR  OPT   DESCRIPTION   CARD
>          -
> 4.5rootx 1.52E+005
> 3.4esp_exchange1:4(hash2)1.52E+005
> 123tuple_flow1.52E+005
> ..2trafodion_vsbb_deletSALTX 1.00E+000
> ..1trafodion_scan  SALTX 1.52E+005
> --- SQL operation complete.
> >>
> >>execute xx;
> *** ERROR[8448] Unable to access Hbase interface. Call to 
> ExpHbaseInterface::nextRow returned error HBASE_ACCESS_ERROR(-706). Cause: 
> java.util.concurrent.ExecutionException: java.io.IOException: PerformScan 
> error on coprocessor call, scannerID: 14 java.io.IOException: performScan 
> encountered Exception txID: 70081 Exception: 
> org.apache.hadoop.hbase.exceptions.OutOfOrderScannerNextException: 
> 

[jira] [Commented] (TRAFODION-1673) Implement the WITH clause in Trafodion SQL for simple use cases

2016-07-01 Thread liu ming (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-1673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15359961#comment-15359961
 ] 

liu ming commented on TRAFODION-1673:
-

It can be first implemented using sub-query, that is, to replace each WITH 
clause by a sub query. (RenamedTable)

CTE mentioned by QiFan is a great idea, and we can set it as a final goal. To 
meet the functional requirement, we can simply use subquery in the first 
iteration.

> Implement the WITH clause in Trafodion SQL for simple use cases
> ---
>
> Key: TRAFODION-1673
> URL: https://issues.apache.org/jira/browse/TRAFODION-1673
> Project: Apache Trafodion
>  Issue Type: New Feature
>  Components: sql-cmp
>Reporter: Hans Zeller
>Assignee: liu ming
>
> We keep running into queries that use a WITH clause to define a temporary 
> view that can be used once or multiple times in a FROM clause in the query.
> For non-recursive queries, the WITH clause could probably be handled very 
> similar to a view. When it is defined, we create an in-memory view 
> descriptor, containing the name and the definition. When it is used in a FROM 
> clause, we could go through a code path similar to that of a view - bind the 
> (temporary) view text and substitute it in the query. The fix could probably 
> be handled entirely in the binder.
> This JIRA is *not* about recursive queries, those would require a lot more 
> effort, involving many components in addition to the binder.



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


[jira] [Work started] (TRAFODION-1673) Implement the WITH clause in Trafodion SQL for simple use cases

2016-07-01 Thread liu ming (JIRA)

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

Work on TRAFODION-1673 started by liu ming.
---
> Implement the WITH clause in Trafodion SQL for simple use cases
> ---
>
> Key: TRAFODION-1673
> URL: https://issues.apache.org/jira/browse/TRAFODION-1673
> Project: Apache Trafodion
>  Issue Type: New Feature
>  Components: sql-cmp
>Reporter: Hans Zeller
>Assignee: liu ming
>
> We keep running into queries that use a WITH clause to define a temporary 
> view that can be used once or multiple times in a FROM clause in the query.
> For non-recursive queries, the WITH clause could probably be handled very 
> similar to a view. When it is defined, we create an in-memory view 
> descriptor, containing the name and the definition. When it is used in a FROM 
> clause, we could go through a code path similar to that of a view - bind the 
> (temporary) view text and substitute it in the query. The fix could probably 
> be handled entirely in the binder.
> This JIRA is *not* about recursive queries, those would require a lot more 
> effort, involving many components in addition to the binder.



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