[jira] [Commented] (TRAFODION-2267) ALTER TABLE RENAME .. CASCADE option not supported

2016-10-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on TRAFODION-2267:
---

Github user robertamarton commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/760#discussion_r83070053
  
--- Diff: docs/messages_guide/src/asciidoc/_chapters/ddl_msgs.adoc ---
@@ -3044,3 +3044,146 @@ statement.
 *Recovery:* Remove the creation of triggers from the CREATE SCHEMA
 statement and resubmit. Create triggers in separate statements.
 
+<<<
+[[SQL-1420]]
+== SQL 1420
+
+```
+Column  cannot be dropped or altered as it is part of the 
table's primary key.
+```
+
+*Cause:* You attempted to drop a column that is a part of a primary key.
+
+*Effect:* The operation fails.
+
+*Recovery:* Correct the column name or table name as appropriate and 
resubmit.
+
+[[SQL-1421]]
+== SQL 1421 
+
+```
+Column  cannot be dropped or altered as it is used in the 
secondary index .
+```
+
+*Cause:* You attempted to drop a column, but that column is used by the 
secondary index named.
+
+*Effect:* The operation fails.
+
+*Recovery:* If the secondary index is no longer needed, drop it and 
resubmit. If the column
+name or table name are incorrect, correct them and resubmit.
+
+[[SQL-1422]]
+== SQL 1422 
+
+```
+An invalid HBase name was specified in this DDL statement. A valid name 
can only contain these characters: [a-zA-Z_0-9-.]
+```
+
+*Cause:* You attempted to use a name containing an invalid character for a 
{project-name} object that is
+stored in HBase.
+
+*Effect:* The operation fails.
+
+*Recovery:* Correct the name and resubmit.
+
+<<<
+[[SQL-1423]]
+== SQL 1423
+
+```
+Insert into metadata table  failed.
+```
+
+*Cause:* During an INITIALIZE TRAFODION, UPGRADE operation, a write to 
metadata table  failed. There may 
+be additional messages giving details of the failure.
+
+*Effect:* The upgrade operation fails.
+
+*Recovery:* None. Contact the {project-name} User Distribution List. 
Include any additional messages.
+
+[[SQL-1424]]
+== SQL 1424 
+
+```
+Column  cannot be dropped as that would leave the table with 
no user defined columns.
+```
+
+*Cause:* You attempted to drop the only remaining user-defined column in 
the table.
+
+*Effect:* The operation fails.
+
+*Recovery:* If the table is no longer needed, simply drop the table.
+
+[[SQL-1425]]
+== SQL 1425 
+
+```
+This operation could not be performed on . 
+```
+
+*Cause:* You attempted an operation on table  but the 
operation could not
+be performed.  gives more details.
+
+*Effect:* The operation fails.
+
+*Recovery:* Correct any issues indicated by  as appropriate and 
resubmit.
+
+<<<
+[[SQL-1426]]
+== SQL 1426
+
+```
+An invalid HBase column name  was specified. A valid name 
must be of the format:   :
+```
+
+*Cause:* When accessing an external HBase table (for example, using _ROW_ 
format), you specified
+an invalid HBase column name.
+
+*Effect:* The operation fails.
+
+*Recovery:* Correct the column name and resubmit.
+
+[[SQL-1427]]
+== SQL 1427 
+
+```
+Table cannot be renamed. 
+```
+
+*Cause:* You attempted to perform ALTER TABLE RENAME but the rename could 
not be performed.
+The  explains why.
+
+*Effect:* The operation fails.
+
+*Recovery:* Perform the operations suggested by  and resubmit.
+
+[[SQL-1428]]
+== SQL 1428 
+
+```
+Metadata definitions could not be created and preloaded in global 
MDdescInfo struct. Make sure that metadata table definition syntax is correct.
+```
+
+*Cause:* This is a {project-name} internal error. It is highly unlikely 
that you will 
+encounter this error unless you are making code changes to {project-name} 
yourself.
+
+*Effect:* The operation fails.
+
+*Recovery:* None. Contact the {project-name} Developer Distribution List.
+
+<<<
+[[SQL-1429]]
+== SQL 1429
+
+```
+Inserts into _ROW_ format external hbase tables can only use the VALUES 
clause and must use the column_create function to create values.
+```
--- End diff --

hbase ->HBase?


> ALTER TABLE RENAME .. CASCADE option not supported
> --
>
> Key: TRAFODION-2267
> URL: https://issues.apache.org/jira/browse/TRAFODION-2267
> Project: Apache Trafodion
>  Issue Type: Documentation
>  

[jira] [Commented] (TRAFODION-2267) ALTER TABLE RENAME .. CASCADE option not supported

2016-10-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on TRAFODION-2267:
---

Github user robertamarton commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/760#discussion_r83070635
  
--- Diff: docs/messages_guide/src/asciidoc/_chapters/ddl_msgs.adoc ---
@@ -3044,3 +3044,146 @@ statement.
 *Recovery:* Remove the creation of triggers from the CREATE SCHEMA
 statement and resubmit. Create triggers in separate statements.
 
+<<<
+[[SQL-1420]]
+== SQL 1420
+
+```
+Column  cannot be dropped or altered as it is part of the 
table's primary key.
+```
+
+*Cause:* You attempted to drop a column that is a part of a primary key.
+
+*Effect:* The operation fails.
+
+*Recovery:* Correct the column name or table name as appropriate and 
resubmit.
+
+[[SQL-1421]]
+== SQL 1421 
+
+```
+Column  cannot be dropped or altered as it is used in the 
secondary index .
+```
+
+*Cause:* You attempted to drop a column, but that column is used by the 
secondary index named.
+
+*Effect:* The operation fails.
+
+*Recovery:* If the secondary index is no longer needed, drop it and 
resubmit. If the column
+name or table name are incorrect, correct them and resubmit.
+
+[[SQL-1422]]
+== SQL 1422 
+
+```
+An invalid HBase name was specified in this DDL statement. A valid name 
can only contain these characters: [a-zA-Z_0-9-.]
+```
+
+*Cause:* You attempted to use a name containing an invalid character for a 
{project-name} object that is
+stored in HBase.
+
+*Effect:* The operation fails.
+
+*Recovery:* Correct the name and resubmit.
+
+<<<
+[[SQL-1423]]
+== SQL 1423
+
+```
+Insert into metadata table  failed.
+```
+
+*Cause:* During an INITIALIZE TRAFODION, UPGRADE operation, a write to 
metadata table  failed. There may 
+be additional messages giving details of the failure.
+
+*Effect:* The upgrade operation fails.
+
+*Recovery:* None. Contact the {project-name} User Distribution List. 
Include any additional messages.
+
+[[SQL-1424]]
+== SQL 1424 
+
+```
+Column  cannot be dropped as that would leave the table with 
no user defined columns.
+```
+
+*Cause:* You attempted to drop the only remaining user-defined column in 
the table.
+
+*Effect:* The operation fails.
+
+*Recovery:* If the table is no longer needed, simply drop the table.
+
+[[SQL-1425]]
+== SQL 1425 
+
+```
+This operation could not be performed on . 
+```
+
+*Cause:* You attempted an operation on table  but the 
operation could not
+be performed.  gives more details.
+
+*Effect:* The operation fails.
+
+*Recovery:* Correct any issues indicated by  as appropriate and 
resubmit.
+
+<<<
+[[SQL-1426]]
+== SQL 1426
+
+```
+An invalid HBase column name  was specified. A valid name 
must be of the format:   :
+```
+
+*Cause:* When accessing an external HBase table (for example, using _ROW_ 
format), you specified
+an invalid HBase column name.
+
+*Effect:* The operation fails.
+
+*Recovery:* Correct the column name and resubmit.
+
+[[SQL-1427]]
+== SQL 1427 
+
+```
+Table cannot be renamed. 
+```
+
+*Cause:* You attempted to perform ALTER TABLE RENAME but the rename could 
not be performed.
+The  explains why.
+
--- End diff --

nie - In this Cause - "The  explains why." is used.  In message 
1425 " gives more details", may want to make both the same.


> ALTER TABLE RENAME .. CASCADE option not supported
> --
>
> Key: TRAFODION-2267
> URL: https://issues.apache.org/jira/browse/TRAFODION-2267
> Project: Apache Trafodion
>  Issue Type: Documentation
>  Components: documentation
>Affects Versions: 2.0-incubating
>Reporter: Atanu Mishra
>Assignee: David Wayne Birdsall
>Priority: Minor
>
> Alter table rename ... cascade' is listed in the SQL Reference Manual version 
> 2.0.0 on http://trafodion.incubator.apache.org/ [^] as a supported statement. 
> It has the following to say about the cascade option:
> cascade:
> specifies that indexes and constraints on the renamed object will be renamed.
> However, the cascade option is no longer supported. It now returns a 1427 
> error like the following:
> >>alter table t1 rename to t2 cascade;
> *** ERROR[1427] Table cannot be renamed. Reason: Cascade option not supported.
> --- SQL operation failed with errors.



--

[jira] [Commented] (TRAFODION-2267) ALTER TABLE RENAME .. CASCADE option not supported

2016-10-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on TRAFODION-2267:
---

Github user robertamarton commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/760#discussion_r83069409
  
--- Diff: docs/messages_guide/src/asciidoc/_chapters/ddl_msgs.adoc ---
@@ -3044,3 +3044,146 @@ statement.
 *Recovery:* Remove the creation of triggers from the CREATE SCHEMA
 statement and resubmit. Create triggers in separate statements.
 
+<<<
+[[SQL-1420]]
+== SQL 1420
+
+```
+Column  cannot be dropped or altered as it is part of the 
table's primary key.
+```
+
+*Cause:* You attempted to drop a column that is a part of a primary key.
+
+*Effect:* The operation fails.
+
+*Recovery:* Correct the column name or table name as appropriate and 
resubmit.
+
+[[SQL-1421]]
+== SQL 1421 
+
+```
+Column  cannot be dropped or altered as it is used in the 
secondary index .
+```
+
+*Cause:* You attempted to drop a column, but that column is used by the 
secondary index named.
+
+*Effect:* The operation fails.
+
+*Recovery:* If the secondary index is no longer needed, drop it and 
resubmit. If the column
+name or table name are incorrect, correct them and resubmit.
+
+[[SQL-1422]]
+== SQL 1422 
+
+```
+An invalid HBase name was specified in this DDL statement. A valid name 
can only contain these characters: [a-zA-Z_0-9-.]
+```
+
+*Cause:* You attempted to use a name containing an invalid character for a 
{project-name} object that is
+stored in HBase.
+
--- End diff --

I assume {project-name} gets changed to Trafodion during document rendering.


> ALTER TABLE RENAME .. CASCADE option not supported
> --
>
> Key: TRAFODION-2267
> URL: https://issues.apache.org/jira/browse/TRAFODION-2267
> Project: Apache Trafodion
>  Issue Type: Documentation
>  Components: documentation
>Affects Versions: 2.0-incubating
>Reporter: Atanu Mishra
>Assignee: David Wayne Birdsall
>Priority: Minor
>
> Alter table rename ... cascade' is listed in the SQL Reference Manual version 
> 2.0.0 on http://trafodion.incubator.apache.org/ [^] as a supported statement. 
> It has the following to say about the cascade option:
> cascade:
> specifies that indexes and constraints on the renamed object will be renamed.
> However, the cascade option is no longer supported. It now returns a 1427 
> error like the following:
> >>alter table t1 rename to t2 cascade;
> *** ERROR[1427] Table cannot be renamed. Reason: Cascade option not supported.
> --- SQL operation failed with errors.



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


[jira] [Commented] (TRAFODION-2267) ALTER TABLE RENAME .. CASCADE option not supported

2016-10-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on TRAFODION-2267:
---

Github user DaveBirdsall commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/760#discussion_r83070340
  
--- Diff: docs/messages_guide/src/asciidoc/_chapters/ddl_msgs.adoc ---
@@ -3044,3 +3044,146 @@ statement.
 *Recovery:* Remove the creation of triggers from the CREATE SCHEMA
 statement and resubmit. Create triggers in separate statements.
 
+<<<
+[[SQL-1420]]
+== SQL 1420
+
+```
+Column  cannot be dropped or altered as it is part of the 
table's primary key.
+```
+
+*Cause:* You attempted to drop a column that is a part of a primary key.
+
+*Effect:* The operation fails.
+
+*Recovery:* Correct the column name or table name as appropriate and 
resubmit.
+
+[[SQL-1421]]
+== SQL 1421 
+
+```
+Column  cannot be dropped or altered as it is used in the 
secondary index .
+```
+
+*Cause:* You attempted to drop a column, but that column is used by the 
secondary index named.
+
+*Effect:* The operation fails.
+
+*Recovery:* If the secondary index is no longer needed, drop it and 
resubmit. If the column
+name or table name are incorrect, correct them and resubmit.
+
+[[SQL-1422]]
+== SQL 1422 
+
+```
+An invalid HBase name was specified in this DDL statement. A valid name 
can only contain these characters: [a-zA-Z_0-9-.]
+```
+
+*Cause:* You attempted to use a name containing an invalid character for a 
{project-name} object that is
+stored in HBase.
+
--- End diff --

Correct.


> ALTER TABLE RENAME .. CASCADE option not supported
> --
>
> Key: TRAFODION-2267
> URL: https://issues.apache.org/jira/browse/TRAFODION-2267
> Project: Apache Trafodion
>  Issue Type: Documentation
>  Components: documentation
>Affects Versions: 2.0-incubating
>Reporter: Atanu Mishra
>Assignee: David Wayne Birdsall
>Priority: Minor
>
> Alter table rename ... cascade' is listed in the SQL Reference Manual version 
> 2.0.0 on http://trafodion.incubator.apache.org/ [^] as a supported statement. 
> It has the following to say about the cascade option:
> cascade:
> specifies that indexes and constraints on the renamed object will be renamed.
> However, the cascade option is no longer supported. It now returns a 1427 
> error like the following:
> >>alter table t1 rename to t2 cascade;
> *** ERROR[1427] Table cannot be renamed. Reason: Cascade option not supported.
> --- SQL operation failed with errors.



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


[jira] [Commented] (TRAFODION-2267) ALTER TABLE RENAME .. CASCADE option not supported

2016-10-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on TRAFODION-2267:
---

Github user DaveBirdsall commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/760#discussion_r83070370
  
--- Diff: docs/messages_guide/src/asciidoc/_chapters/ddl_msgs.adoc ---
@@ -3044,3 +3044,146 @@ statement.
 *Recovery:* Remove the creation of triggers from the CREATE SCHEMA
 statement and resubmit. Create triggers in separate statements.
 
+<<<
+[[SQL-1420]]
+== SQL 1420
+
+```
+Column  cannot be dropped or altered as it is part of the 
table's primary key.
+```
+
+*Cause:* You attempted to drop a column that is a part of a primary key.
+
+*Effect:* The operation fails.
+
+*Recovery:* Correct the column name or table name as appropriate and 
resubmit.
+
+[[SQL-1421]]
+== SQL 1421 
+
+```
+Column  cannot be dropped or altered as it is used in the 
secondary index .
+```
+
+*Cause:* You attempted to drop a column, but that column is used by the 
secondary index named.
+
+*Effect:* The operation fails.
+
+*Recovery:* If the secondary index is no longer needed, drop it and 
resubmit. If the column
+name or table name are incorrect, correct them and resubmit.
+
+[[SQL-1422]]
+== SQL 1422 
+
+```
+An invalid HBase name was specified in this DDL statement. A valid name 
can only contain these characters: [a-zA-Z_0-9-.]
+```
+
+*Cause:* You attempted to use a name containing an invalid character for a 
{project-name} object that is
+stored in HBase.
+
+*Effect:* The operation fails.
+
+*Recovery:* Correct the name and resubmit.
+
+<<<
+[[SQL-1423]]
+== SQL 1423
+
+```
+Insert into metadata table  failed.
+```
+
+*Cause:* During an INITIALIZE TRAFODION, UPGRADE operation, a write to 
metadata table  failed. There may 
+be additional messages giving details of the failure.
+
+*Effect:* The upgrade operation fails.
+
+*Recovery:* None. Contact the {project-name} User Distribution List. 
Include any additional messages.
+
+[[SQL-1424]]
+== SQL 1424 
+
+```
+Column  cannot be dropped as that would leave the table with 
no user defined columns.
+```
+
+*Cause:* You attempted to drop the only remaining user-defined column in 
the table.
+
+*Effect:* The operation fails.
+
+*Recovery:* If the table is no longer needed, simply drop the table.
+
+[[SQL-1425]]
+== SQL 1425 
+
+```
+This operation could not be performed on . 
+```
+
+*Cause:* You attempted an operation on table  but the 
operation could not
+be performed.  gives more details.
+
+*Effect:* The operation fails.
+
+*Recovery:* Correct any issues indicated by  as appropriate and 
resubmit.
+
+<<<
+[[SQL-1426]]
+== SQL 1426
+
+```
+An invalid HBase column name  was specified. A valid name 
must be of the format:   :
+```
+
+*Cause:* When accessing an external HBase table (for example, using _ROW_ 
format), you specified
+an invalid HBase column name.
+
+*Effect:* The operation fails.
+
+*Recovery:* Correct the column name and resubmit.
+
+[[SQL-1427]]
+== SQL 1427 
+
+```
+Table cannot be renamed. 
+```
+
+*Cause:* You attempted to perform ALTER TABLE RENAME but the rename could 
not be performed.
+The  explains why.
+
+*Effect:* The operation fails.
+
+*Recovery:* Perform the operations suggested by  and resubmit.
+
+[[SQL-1428]]
+== SQL 1428 
+
+```
+Metadata definitions could not be created and preloaded in global 
MDdescInfo struct. Make sure that metadata table definition syntax is correct.
+```
+
+*Cause:* This is a {project-name} internal error. It is highly unlikely 
that you will 
+encounter this error unless you are making code changes to {project-name} 
yourself.
+
+*Effect:* The operation fails.
+
+*Recovery:* None. Contact the {project-name} Developer Distribution List.
+
+<<<
+[[SQL-1429]]
+== SQL 1429
+
+```
+Inserts into _ROW_ format external hbase tables can only use the VALUES 
clause and must use the column_create function to create values.
+```
--- End diff --

Oops... I'll fix this.


> ALTER TABLE RENAME .. CASCADE option not supported
> --
>
> Key: TRAFODION-2267
> URL: https://issues.apache.org/jira/browse/TRAFODION-2267
> Project: Apache Trafodion
>  Issue Type: Documentation
>  

[jira] [Updated] (TRAFODION-2280) Query optimizations based on uniqueness don't work on salted tables

2016-10-12 Thread Hans Zeller (JIRA)

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

Hans Zeller updated TRAFODION-2280:
---
Description: 
Rohit Jain noticed this problem. When we have an IN subquery that produces a 
table with unique values, then we should use an inner join in the query plan. 
However, we see a semi-join when the subquery references a salted table. The 
problem is that the uniqueness constraint generated for salted tables is not 
optimal. Another example is a groupby on a unique column - the optimizer should 
eliminate the groupby, but this does not happen for salted tables.

Here are some example queries to demonstrate the problem:

{noformat}
create table tsalt(a integer not null primary key, b integer) salt using 4 
partitions;
create table tnosalt(a integer not null primary key, b integer);

insert into tsalt values (1,1), (2,2), (3,3);
insert into tnosalt select * from tsalt;

prepare s1 from
-- display
select * from tnosalt where b in (select a from tsalt);
explain options 'f' s1;
-- uses a semi-join, but a join would be sufficient

prepare s2 from
-- display
select * from tnosalt where b in (select a from tnosalt);
explain options 'f' s2;
-- uses a regular inner join

explain options 'f'
select distinct a from tsalt;
-- the plan has an unnecessary group by

explain options 'f'
select distinct a from tnosalt;
-- the groupby is eliminated
{noformat}


  was:
Rohit Jain noticed this problem. When we have an IN subquery that produces a 
table with unique values, then we should use an inner join in the query plan. 
However, we see a semi-join when the subquery references a salted table. The 
problem is that the uniqueness constraint generated for salted tables is not 
optimal. Another example is a groupby on a unique column - the optimizer should 
eliminate the groupby, but this does not happen for salted tables.

Here are some example queries to demonstrate the problem:

create table tsalt(a integer not null primary key, b integer) salt using 4 
partitions;
create table tnosalt(a integer not null primary key, b integer);

insert into tsalt values (1,1), (2,2), (3,3);
insert into tnosalt select * from tsalt;

prepare s1 from
-- display
select * from tnosalt where b in (select a from tsalt);
explain options 'f' s1;
-- uses a semi-join, but a join would be sufficient

prepare s2 from
-- display
select * from tnosalt where b in (select a from tnosalt);
explain options 'f' s2;
-- uses a regular inner join

explain options 'f'
select distinct a from tsalt;
-- the plan has an unnecessary group by

explain options 'f'
select distinct a from tnosalt;
-- the groupby is eliminated



> Query optimizations based on uniqueness don't work on salted tables
> ---
>
> Key: TRAFODION-2280
> URL: https://issues.apache.org/jira/browse/TRAFODION-2280
> Project: Apache Trafodion
>  Issue Type: Bug
>  Components: sql-cmp
>Affects Versions: 2.0-incubating
> Environment: Any
>Reporter: Hans Zeller
>Assignee: Hans Zeller
> Fix For: 2.1-incubating
>
>
> Rohit Jain noticed this problem. When we have an IN subquery that produces a 
> table with unique values, then we should use an inner join in the query plan. 
> However, we see a semi-join when the subquery references a salted table. The 
> problem is that the uniqueness constraint generated for salted tables is not 
> optimal. Another example is a groupby on a unique column - the optimizer 
> should eliminate the groupby, but this does not happen for salted tables.
> Here are some example queries to demonstrate the problem:
> {noformat}
> create table tsalt(a integer not null primary key, b integer) salt using 4 
> partitions;
> create table tnosalt(a integer not null primary key, b integer);
> insert into tsalt values (1,1), (2,2), (3,3);
> insert into tnosalt select * from tsalt;
> prepare s1 from
> -- display
> select * from tnosalt where b in (select a from tsalt);
> explain options 'f' s1;
> -- uses a semi-join, but a join would be sufficient
> prepare s2 from
> -- display
> select * from tnosalt where b in (select a from tnosalt);
> explain options 'f' s2;
> -- uses a regular inner join
> explain options 'f'
> select distinct a from tsalt;
> -- the plan has an unnecessary group by
> explain options 'f'
> select distinct a from tnosalt;
> -- the groupby is eliminated
> {noformat}



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


[jira] [Work started] (TRAFODION-2280) Query optimizations based on uniqueness don't work on salted tables

2016-10-12 Thread Hans Zeller (JIRA)

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

Work on TRAFODION-2280 started by Hans Zeller.
--
> Query optimizations based on uniqueness don't work on salted tables
> ---
>
> Key: TRAFODION-2280
> URL: https://issues.apache.org/jira/browse/TRAFODION-2280
> Project: Apache Trafodion
>  Issue Type: Bug
>  Components: sql-cmp
>Affects Versions: 2.0-incubating
> Environment: Any
>Reporter: Hans Zeller
>Assignee: Hans Zeller
> Fix For: 2.1-incubating
>
>
> Rohit Jain noticed this problem. When we have an IN subquery that produces a 
> table with unique values, then we should use an inner join in the query plan. 
> However, we see a semi-join when the subquery references a salted table. The 
> problem is that the uniqueness constraint generated for salted tables is not 
> optimal. Another example is a groupby on a unique column - the optimizer 
> should eliminate the groupby, but this does not happen for salted tables.
> Here are some example queries to demonstrate the problem:
> {noformat}
> create table tsalt(a integer not null primary key, b integer) salt using 4 
> partitions;
> create table tnosalt(a integer not null primary key, b integer);
> insert into tsalt values (1,1), (2,2), (3,3);
> insert into tnosalt select * from tsalt;
> prepare s1 from
> -- display
> select * from tnosalt where b in (select a from tsalt);
> explain options 'f' s1;
> -- uses a semi-join, but a join would be sufficient
> prepare s2 from
> -- display
> select * from tnosalt where b in (select a from tnosalt);
> explain options 'f' s2;
> -- uses a regular inner join
> explain options 'f'
> select distinct a from tsalt;
> -- the plan has an unnecessary group by
> explain options 'f'
> select distinct a from tnosalt;
> -- the groupby is eliminated
> {noformat}



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


[jira] [Created] (TRAFODION-2281) Unable to install Kerberos

2016-10-12 Thread Roberta Marton (JIRA)
Roberta Marton created TRAFODION-2281:
-

 Summary: Unable to install Kerberos
 Key: TRAFODION-2281
 URL: https://issues.apache.org/jira/browse/TRAFODION-2281
 Project: Apache Trafodion
  Issue Type: Bug
  Components: Build Infrastructure
Reporter: Roberta Marton
Assignee: Roberta Marton


Errors were encountered when trying to install Kerberos on a distro where 
Kerberos was already installed.  The script used incorrect keytabs for HBase 
and HDFS, and the Trafodion keytab directory was not create properly.



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


[jira] [Commented] (TRAFODION-2281) Unable to install Kerberos

2016-10-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on TRAFODION-2281:
---

GitHub user robertamarton opened a pull request:

https://github.com/apache/incubator-trafodion/pull/761

TRAFODION-2281 - Unable to install Kerberos

Fixed a couple of problems with security installation scripts:

- Need to source config file in traf_secure_config before checking 
HADOOP_TYPE
- Need to check for answer regarding creation of keytabs directory
- Perform traf_user_prompt after determining if LDAP is enabled
- Fixed issue with traf_authentication_setup with ldapcheck results

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/robertamarton/incubator-trafodion 
secure_scripts

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-trafodion/pull/761.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #761


commit 2eec5840536ccc88b91361e197a3826484c05189
Author: Roberta Marton 
Date:   2016-10-12T19:28:21Z

TRAFODION-2281 - Unable to install Kerberos

Fixed a couple of problems with security installation scripts:

- Need to source config file in traf_secure_config before checking 
HADOOP_TYPE
- Need to check for answer regarding creation of keytabs directory
- Perform traf_user_prompt after determining if LDAP is enabled
- Fixed issue with traf_authentication_setup with ldapcheck results




> Unable to install Kerberos
> --
>
> Key: TRAFODION-2281
> URL: https://issues.apache.org/jira/browse/TRAFODION-2281
> Project: Apache Trafodion
>  Issue Type: Bug
>  Components: Build Infrastructure
>Reporter: Roberta Marton
>Assignee: Roberta Marton
>
> Errors were encountered when trying to install Kerberos on a distro where 
> Kerberos was already installed.  The script used incorrect keytabs for HBase 
> and HDFS, and the Trafodion keytab directory was not create properly.



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


[jira] [Commented] (TRAFODION-2262) Mxosrvr or Java core with the stack trace pointing to log4Cxx functions

2016-10-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on TRAFODION-2262:
---

Github user asfgit closed the pull request at:

https://github.com/apache/incubator-trafodion/pull/754


> Mxosrvr or Java core with the stack trace pointing to log4Cxx functions
> ---
>
> Key: TRAFODION-2262
> URL: https://issues.apache.org/jira/browse/TRAFODION-2262
> Project: Apache Trafodion
>  Issue Type: Bug
>  Components: sql-general
>Reporter: Dennis Markt
>Assignee: Selvaganesan Govindarajan
>
> There appears to be two types of cores generated but I can't seem to find the 
> other back trace you mentioned Selva.  Please add the bt or more information 
> to make this Case more useful.
> Thanks,
> Dennis



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


[jira] [Created] (TRAFODION-2279) revoke all doesn't revoke column privileges

2016-10-12 Thread Gao, Rui-Xian (JIRA)
Gao, Rui-Xian created TRAFODION-2279:


 Summary: revoke all doesn't revoke column privileges
 Key: TRAFODION-2279
 URL: https://issues.apache.org/jira/browse/TRAFODION-2279
 Project: Apache Trafodion
  Issue Type: Bug
  Components: sql-security
 Environment: centos6.7
cdh5.4.8
Reporter: Gao, Rui-Xian
Assignee: Roberta Marton


'revoke all' doesn't revoke column privileges.

>>create table tabl1(a int, b int);

--- SQL operation complete.
>>grant select(a) on tabl1 to qauser1;

--- SQL operation complete.
>>grant delete on tabl1 to qauser1;

--- SQL operation complete.
>>showddl tabl1;

CREATE TABLE TRAFODION.RACHEL_SCH.TABL1
  (
AINT DEFAULT NULL NOT SERIALIZED
  , BINT DEFAULT NULL NOT SERIALIZED
  )
 ATTRIBUTES ALIGNED FORMAT
;

-- GRANT SELECT, INSERT, DELETE, UPDATE, REFERENCES ON 
TRAFODION.RACHEL_SCH.TABL1 TO DB__ROOT WITH GRANT OPTION;
  GRANT DELETE ON TRAFODION.RACHEL_SCH.TABL1 TO QAUSER1;
GRANT SELECT(A) ON
  TRAFODION.RACHEL_SCH.TABL1 TO QAUSER1;

--- SQL operation complete.
>>revoke all on tabl1 from qauser1;

--- SQL operation complete.
>>showddl tabl1;

CREATE TABLE TRAFODION.RACHEL_SCH.TABL1
  (
AINT DEFAULT NULL NOT SERIALIZED
  , BINT DEFAULT NULL NOT SERIALIZED
  )
 ATTRIBUTES ALIGNED FORMAT
;

-- GRANT SELECT, INSERT, DELETE, UPDATE, REFERENCES ON 
TRAFODION.RACHEL_SCH.TABL1 TO DB__ROOT WITH GRANT OPTION;
  GRANT SELECT(A) ON TRAFODION.RACHEL_SCH.TABL1 TO QAUSER1;

--- SQL operation complete.




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


[jira] [Commented] (TRAFODION-2277) Remove some obsolete code

2016-10-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on TRAFODION-2277:
---

GitHub user DaveBirdsall opened a pull request:

https://github.com/apache/incubator-trafodion/pull/759

[TRAFODION-2277] Remove obsolete entry-sequenced code from compiler

I removed obsolete code concerning NSK-style entry-sequenced files from the 
optimizer and from the error messages. There is a little bit of code in the 
parser which remains, and is currently stubbed out. I left that there on the 
chance that in the future we implement a new entry-sequenced concept within 
Trafodion.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/DaveBirdsall/incubator-trafodion Trafodion2277

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-trafodion/pull/759.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #759






> Remove some obsolete code
> -
>
> Key: TRAFODION-2277
> URL: https://issues.apache.org/jira/browse/TRAFODION-2277
> Project: Apache Trafodion
>  Issue Type: Improvement
>  Components: sql-cmp
>Affects Versions: 2.1-incubating
> Environment: All
>Reporter: David Wayne Birdsall
>Assignee: David Wayne Birdsall
>Priority: Minor
>
> Remove obsolete code pertaining to NonStop SQL/MP entry-seqeuenced files.



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


[jira] [Commented] (TRAFODION-2010) UPDATE/DELETE cannot generate a parallel plan properly

2016-10-12 Thread David Wayne Birdsall (JIRA)

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

David Wayne Birdsall commented on TRAFODION-2010:
-

This is a duplicate of JIRA TRAFODION-1253 and JIRA TRAFODION-25.

In JIRA TRAFODION-25, I added costing code for insert and delete. I did the 
insert code first and I don't think it is very good code. The delete code is 
better.

There is some shared code between update and delete (they share a class; some 
methods are used for both). In doing the update code it is probably best to 
keep this, and to follow the example for delete.



> UPDATE/DELETE cannot generate a parallel plan properly
> --
>
> Key: TRAFODION-2010
> URL: https://issues.apache.org/jira/browse/TRAFODION-2010
> Project: Apache Trafodion
>  Issue Type: Bug
>Reporter: liu ming
>Assignee: Yang, Yongfeng
>
> For big UPDATE/DELETE, that is, affecting a lot of rows, for example, 10M 
> rows to update, Trafodion cannot generate a proper parallel plan by default. 
> So very slow.
> Reproduce steps:
> DDL
> CREATE TABLE T113B
>   (
> UNIQ INT NO DEFAULT NOT NULL 
>   , C100KINT DEFAULT NULL  
>   , C10K INT DEFAULT NULL  
>   , C1K  INT DEFAULT NULL 
>   , C100 INT DEFAULT NULL 
>   , C10  INT DEFAULT NULL  
>   , C1   INT DEFAULT NULL  
>   , C0   INT DEFAULT NULL ,
>   Primary key(uniq)
>   )
>   SALT USING 80 PARTITIONS
> ATTRIBUTES ALIGNED FORMAT
> ;
>  
> Populate data:
> upsert using load into t113b select
> 0 + (10 * x10) + (1 * x1) + (1000 * x1000) +
> (100 * x100) + (10 * x10) +( 1 * x1),
> 0 + (1 * x1) + (1000 * x1000) + (100 * x100) +
> (10 * x10) +( 1 * x1),
> 0 + (1000 * x1000) + (100 * x100) + (10 * x10) + (1 * x1),
> 0 + (100 * x100) + (10 * x10) + (1 * x1),
> 0 + (10 * x10) + (1 * x1),
> 0 + (1 * x1),
> 0,
> X0
> from (values(0)) t
> transpose 0,1,2,3,4,5,6,7,8,9 as x10
> transpose 0,1,2,3,4,5,6,7,8,9 as x1
> transpose 0,1,2,3,4,5,6,7,8,9 as x1000
> transpose 0,1,2,3,4,5,6,7,8,9 as x100
> transpose 0,1,2,3,4,5,6,7,8,9 as x10
> transpose 0,1,2,3,4,5,6,7,8,9 as x1
> transpose 0,1,2,3,4,5,6,7,8,9 as x0;
>  
> The update DML
> explain options 'f' update t113b set c0 = 0 where c1 = 0;
> DELETE is similar.



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


[jira] [Created] (TRAFODION-2282) Optimizer histogram cache is sometimes never refreshed

2016-10-12 Thread David Wayne Birdsall (JIRA)
David Wayne Birdsall created TRAFODION-2282:
---

 Summary: Optimizer histogram cache is sometimes never refreshed
 Key: TRAFODION-2282
 URL: https://issues.apache.org/jira/browse/TRAFODION-2282
 Project: Apache Trafodion
  Issue Type: Bug
  Components: sql-cmp
Affects Versions: 2.1-incubating
 Environment: All
Reporter: David Wayne Birdsall
Assignee: David Wayne Birdsall
 Fix For: 2.1-incubating


Here's the scenario:

In session 1, create a table T1 and populate it with, say, 20 or more rows.

In session 2, prepare a query that selects from T1. For example, select 
A,COUNT(*) FROM T1 GROUP BY A. The query should compile fine, but you should 
see missing statistics warning messages (warning codes 6007 and 6008).

In session 1, do "update statistics for table t1 on every column"

In session 2, prepare other queries over a period of time. What should happen 
is that after about an hour, the Optimizer decides to refresh the histograms. 
However, due to a bug, it might never do so. So, the missing statistics 
warnings (6007, 6008) never go away. Worse, the prepares never benefit from the 
statistics so plan choice may be poor.




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


[jira] [Commented] (TRAFODION-2267) ALTER TABLE RENAME .. CASCADE option not supported

2016-10-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on TRAFODION-2267:
---

GitHub user DaveBirdsall opened a pull request:

https://github.com/apache/incubator-trafodion/pull/760

[TRAFODION-2267] Fix ALTER TABLE RENAME documentation

Problem: The SQL Reference manual describes a CASCADE keyword for ALTER 
TABLE RENAME, however if you try to use it, you get error message 1427, "Table 
cannot be renamed. Reason: Cascade option not supported."

Supporting this option seems like a fair amount of work, so for the moment, 
we've simply removed mention of CASCADE from the SQL reference manual.

While working on this issue, I noticed that the DDL messages section of the 
Messages Guide is woefully out-of-date. Among other things, it lacks several 
messages including the message 1427 mentioned above. Fixing all of that is a 
big job, but with this set of changes I did a small part of it. I added 
documentation for messages 1420-1429.

While doing this I noticed that ALTER TABLE RENAME to an invalid HBase name 
produced a very ugly 8448 error (unlike CREATE TABLE and DROP TABLE which 
produce a nice tidy error 1422 in this case). I fixed the error reporting code 
in ALTER TABLE RENAME so that we now get the nice error 1422 instead.


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/DaveBirdsall/incubator-trafodion Trafodion2267

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-trafodion/pull/760.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #760


commit 12ff1c4ef840c91374338ad8102f3d0c764364bb
Author: Dave Birdsall 
Date:   2016-10-12T17:57:57Z

[TRAFODION-2267] Fix ALTER TABLE RENAME documentation




> ALTER TABLE RENAME .. CASCADE option not supported
> --
>
> Key: TRAFODION-2267
> URL: https://issues.apache.org/jira/browse/TRAFODION-2267
> Project: Apache Trafodion
>  Issue Type: Documentation
>  Components: documentation
>Affects Versions: 2.0-incubating
>Reporter: Atanu Mishra
>Assignee: David Wayne Birdsall
>Priority: Minor
>
> Alter table rename ... cascade' is listed in the SQL Reference Manual version 
> 2.0.0 on http://trafodion.incubator.apache.org/ [^] as a supported statement. 
> It has the following to say about the cascade option:
> cascade:
> specifies that indexes and constraints on the renamed object will be renamed.
> However, the cascade option is no longer supported. It now returns a 1427 
> error like the following:
> >>alter table t1 rename to t2 cascade;
> *** ERROR[1427] Table cannot be renamed. Reason: Cascade option not supported.
> --- SQL operation failed with errors.



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


[jira] [Created] (TRAFODION-2280) Query optimizations based on uniqueness don't work on salted tables

2016-10-12 Thread Hans Zeller (JIRA)
Hans Zeller created TRAFODION-2280:
--

 Summary: Query optimizations based on uniqueness don't work on 
salted tables
 Key: TRAFODION-2280
 URL: https://issues.apache.org/jira/browse/TRAFODION-2280
 Project: Apache Trafodion
  Issue Type: Bug
  Components: sql-cmp
Affects Versions: 2.0-incubating
 Environment: Any
Reporter: Hans Zeller
Assignee: Hans Zeller
 Fix For: 2.1-incubating


Rohit Jain noticed this problem. When we have an IN subquery that produces a 
table with unique values, then we should use an inner join in the query plan. 
However, we see a semi-join when the subquery references a salted table. The 
problem is that the uniqueness constraint generated for salted tables is not 
optimal. Another example is a groupby on a unique column - the optimizer should 
eliminate the groupby, but this does not happen for salted tables.

Here are some example queries to demonstrate the problem:

create table tsalt(a integer not null primary key, b integer) salt using 4 
partitions;
create table tnosalt(a integer not null primary key, b integer);

insert into tsalt values (1,1), (2,2), (3,3);
insert into tnosalt select * from tsalt;

prepare s1 from
-- display
select * from tnosalt where b in (select a from tsalt);
explain options 'f' s1;
-- uses a semi-join, but a join would be sufficient

prepare s2 from
-- display
select * from tnosalt where b in (select a from tnosalt);
explain options 'f' s2;
-- uses a regular inner join

explain options 'f'
select distinct a from tsalt;
-- the plan has an unnecessary group by

explain options 'f'
select distinct a from tnosalt;
-- the groupby is eliminated




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