[jira] [Created] (TRAFODION-2081) Up a not existed physical node will enter into pdsh window and stop there

2016-06-20 Thread Jianguo Zhou (Jason) (JIRA)
Jianguo Zhou (Jason) created TRAFODION-2081:
---

 Summary: Up a not existed physical node will enter into pdsh 
window and stop there
 Key: TRAFODION-2081
 URL: https://issues.apache.org/jira/browse/TRAFODION-2081
 Project: Apache Trafodion
  Issue Type: Bug
  Components: foundation
Affects Versions: 2.1-incubating
Reporter: Jianguo Zhou (Jason)


I happened to type a tailing ';' after the node name, then it will alert 
internal error happened because node name doesn't exit, and then enter into 
pdsh> window as following (and have to enter exit), even if after exit pdsh, it 
will keep trying to merge a no existed node and hang there (have to press Ctr + 
C to stop it):

[$Z0005IJ] %up gyvm-14.novalocal;
[$Z0005IJ] Error: Internal error while looking up physical node map, node name 
does not exist, node name=gyvm-14.novalocal;
pdsh> up gyvm-14.novalocal
pdsh> exit
[$Z0005IJ] 06/21/2016-07:14:27 - Node gyvm-14.novalocal; is merging to existing 
cluster.




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


[jira] [Commented] (TRAFODION-2072) long char columns cause non-deterministic behavior

2016-06-20 Thread ASF GitHub Bot (JIRA)

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

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

GitHub user anoopsharma00 opened a pull request:

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

JIRA TRAFODION-2072 plus few more

-- long varchars (> 32K) are handled for traf (regular and aligned)
   and hive tables
-- showddl for hive tables shows traf and hive definitions
-- traf external tables can optionally take columns attrs that would
   overwrite corresponding hive col attrs
-- metadata is updated with info no whether col attrs were specified
-- 'repeat' function can optionally take a max length parameter
-- error is returned if an external table is created for non-hive
-- tests added to regress/seabase/TEST031 and hive/TEST009

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

$ git pull https://github.com/anoopsharma00/incubator-trafodion 
ansharma_longvc_br

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

https://github.com/apache/incubator-trafodion/pull/552.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 #552


commit b39f7524104659a2ca14cb09ddf6cab817491211
Author: Anoop Sharma 
Date:   2016-06-20T23:07:19Z

JIRA TRAFODION-2072 plus few more

-- long varchars (> 32K) are handled for traf (regular and aligned)
   and hive tables
-- showddl for hive tables shows traf and hive definitions
-- traf external tables can optionally take columns attrs that would
   overwrite corresponding hive col attrs
-- metadata is updated with info no whether col attrs were specified
-- 'repeat' function can optionally take a max length parameter
-- error is returned if an external table is created for non-hive
-- tests added to regress/seabase/TEST031 and hive/TEST009




> long char columns cause non-deterministic behavior 
> ---
>
> Key: TRAFODION-2072
> URL: https://issues.apache.org/jira/browse/TRAFODION-2072
> Project: Apache Trafodion
>  Issue Type: Bug
>Reporter: Anoop Sharma
>Assignee: Anoop Sharma
>
> If a table has char/varchar columns that are more than 32K,
> they show non-deterministic behavior.
> This may show up for hbase format, aligned format or hive
> tables.
> Sometimes columns are truncated at 2-byte boundary,
> sometimes large columns may cause hangs or other issues.
> In the example below, the select hangs:
> >>cqd traf_max_character_col_length '100';
> --- SQL operation complete.
> >>create table tlvc2 (z int, b char(10), c varchar(10), a 
> >>varchar(100))
> +>   attribute aligned format;
> --- SQL operation complete.
> >>
> >>insert into tlvc2 values (1, 'abc', repeat('a', 10), repeat ('b', 
> >>10));
> --- 1 row(s) inserted.
> >>
> >>select char_length(a) from tlvc2;



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


[jira] [Resolved] (TRAFODION-2039) Add support for ALTER LIBRARY FILE ''

2016-06-20 Thread Suresh Subbiah (JIRA)

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

Suresh Subbiah resolved TRAFODION-2039.
---
Resolution: Fixed

> Add support for ALTER LIBRARY FILE ''
> 
>
> Key: TRAFODION-2039
> URL: https://issues.apache.org/jira/browse/TRAFODION-2039
> Project: Apache Trafodion
>  Issue Type: Improvement
>  Components: sql-general
>Affects Versions: 2.0-incubating
>Reporter: Suresh Subbiah
>Assignee: Suresh Subbiah
>
> Add suppport for an ALTER statement that will allow the file associated with 
> a library object to be changed.
> ALTER LIBRARY FILE ' ;'



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


[jira] [Closed] (TRAFODION-2039) Add support for ALTER LIBRARY FILE ''

2016-06-20 Thread Suresh Subbiah (JIRA)

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

Suresh Subbiah closed TRAFODION-2039.
-

> Add support for ALTER LIBRARY FILE ''
> 
>
> Key: TRAFODION-2039
> URL: https://issues.apache.org/jira/browse/TRAFODION-2039
> Project: Apache Trafodion
>  Issue Type: Improvement
>  Components: sql-general
>Affects Versions: 2.0-incubating
>Reporter: Suresh Subbiah
>Assignee: Suresh Subbiah
>
> Add suppport for an ALTER statement that will allow the file associated with 
> a library object to be changed.
> ALTER LIBRARY FILE ' ;'



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


[jira] [Commented] (TRAFODION-2074) Create index should avoid populating the index within a transaction

2016-06-20 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/incubator-trafodion/pull/550#discussion_r67742763
  
--- Diff: core/sql/generator/GenPreCode.cpp ---
@@ -2824,44 +2823,33 @@ short DDLExpr::ddlXnsInfo(NABoolean , 
NABoolean )
(ddlNode->getOperatorType() == DDL_ALTER_TABLE_DROP_COLUMN) ||
(ddlNode->getOperatorType() == 
DDL_ALTER_TABLE_ALTER_COLUMN_DATATYPE) ||
(ddlNode->getOperatorType() == DDL_DROP_TABLE)))
-{
-  // transaction will be started and commited in called methods.
-  xnCanBeStarted = FALSE;
-}
-
-  isDDLxn = FALSE;
-  if ((ddlXns()) || 
-  ((ddlNode && ddlNode->castToStmtDDLNode() &&
-ddlNode->castToStmtDDLNode()->ddlXns(
-isDDLxn = TRUE;
-
-  // ddl transactions are on.
-  // Following commands currently require transactions be started and
-  // committed in the called methods.
-  if ((ddlXns()) &&
-  (
-   (purgedataHbase()) ||
-   (upgradeRepos())
-   )
-  )
-{
-  // transaction will be started and commited in called methods.
-  xnCanBeStarted = FALSE;
-}
-
-  // ddl transactions are on.
-  // Cleanup and alter commands requires transactions to be started and 
commited
-  // in the called method.
-  if ((ddlNode && ddlNode->castToStmtDDLNode() &&
-   ddlNode->castToStmtDDLNode()->ddlXns()) &&
-  ((ddlNode->getOperatorType() == DDL_CLEANUP_OBJECTS) ||
-   (ddlNode->getOperatorType() == DDL_ALTER_TABLE_DROP_COLUMN) ||
-   (ddlNode->getOperatorType() == 
DDL_ALTER_TABLE_ALTER_COLUMN_DATATYPE)))
-{
-  // transaction will be started and commited in called methods.
-  xnCanBeStarted = FALSE;
-}
-
+ {
+// transaction will be started and commited in called methods.
+xnCanBeStarted = FALSE;
+ }
+ isDDLxn = FALSE;
+  }
+  else  // When the DDL transaction is turned on
+  {
+ isDDLxn = FALSE;
+ if (ddlNode && ddlNode->castToStmtDDLNode() &&
+ddlNode->castToStmtDDLNode()->ddlXns())
+ isDDLxn = TRUE;
+
+ if (purgedataHbase() || upgradeRepos())
+// transaction will be started and commited in called methods.
+xnCanBeStarted = FALSE;
+ if ((ddlNode && ddlNode->castToStmtDDLNode() &&
+  ddlNode->castToStmtDDLNode()->ddlXns()) &&
+((ddlNode->getOperatorType() == DDL_CLEANUP_OBJECTS) ||
+ (ddlNode->getOperatorType() == DDL_ALTER_TABLE_DROP_COLUMN) ||
+ (ddlNode->getOperatorType() == DDL_CREATE_INDEX) ||
--- End diff --

Good catch. I will check and fix it.


> Create index should avoid populating the index within a transaction
> ---
>
> Key: TRAFODION-2074
> URL: https://issues.apache.org/jira/browse/TRAFODION-2074
> Project: Apache Trafodion
>  Issue Type: Improvement
>  Components: sql-exe
>Affects Versions: 2.0-incubating
>Reporter: Selvaganesan Govindarajan
>Assignee: Selvaganesan Govindarajan
> Fix For: 2.1-incubating
>
>
> Populating the index is done via load command. Load command doesn't need 
> transaction. Transactions in Trafodion have 2hr expiry period. If the load 
> takes more than 2 hours to populate the index the create index will always 
> fail. 



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


[jira] [Commented] (TRAFODION-2074) Create index should avoid populating the index within a transaction

2016-06-20 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/incubator-trafodion/pull/550#discussion_r67742676
  
--- Diff: core/sql/exp/ExpHbaseInterface.h ---
@@ -62,22 +62,6 @@ class ExHbaseAccessStats;
 
 Int64 getTransactionIDFromContext();
 
-using namespace apache::thrift;
-using namespace apache::thrift::protocol;
-using namespace apache::thrift::transport;
-
-using namespace apache::hadoop::hbase::thrift;
-
-namespace {
-
-  typedef std::vector StrVec;
--- End diff --

Yes. We can do this as a different PR because I suspect it would involve 
more code changes.


> Create index should avoid populating the index within a transaction
> ---
>
> Key: TRAFODION-2074
> URL: https://issues.apache.org/jira/browse/TRAFODION-2074
> Project: Apache Trafodion
>  Issue Type: Improvement
>  Components: sql-exe
>Affects Versions: 2.0-incubating
>Reporter: Selvaganesan Govindarajan
>Assignee: Selvaganesan Govindarajan
> Fix For: 2.1-incubating
>
>
> Populating the index is done via load command. Load command doesn't need 
> transaction. Transactions in Trafodion have 2hr expiry period. If the load 
> takes more than 2 hours to populate the index the create index will always 
> fail. 



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


[jira] [Commented] (TRAFODION-2074) Create index should avoid populating the index within a transaction

2016-06-20 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/incubator-trafodion/pull/550#discussion_r67742390
  
--- Diff: core/sql/executor/ExHbaseAccess.cpp ---
@@ -1153,6 +1153,32 @@ Lng32 
ExHbaseAccessTcb::createSQRowFromHbaseFormat(Int64 *latestRowTimestamp)
  ex_assert(FALSE, "Attr not found -2");
  
  char * defVal = attr->getDefaultValue();
+  if (! defVal)
+{
+  char * colVal = (char*)
+hbaseAccessTdb().listOfFetchedColNames()->get(idx);
+
+  Text colFam, colName;
+  extractColFamilyAndName(colVal, colFam, colName);
+
+  Int64 v = 0;
+  if (colName.length() == sizeof(char))
+v = *(char*)colName.data();
+  else if (colName.length() == sizeof(unsigned short))
+v = *(UInt16*)colName.data();
+  else if (colName.length() == sizeof(Lng32))
+v = *(ULng32*)colName.data();
+
+  char buf[10];
--- End diff --

Done. Changed it buf[20] 


> Create index should avoid populating the index within a transaction
> ---
>
> Key: TRAFODION-2074
> URL: https://issues.apache.org/jira/browse/TRAFODION-2074
> Project: Apache Trafodion
>  Issue Type: Improvement
>  Components: sql-exe
>Affects Versions: 2.0-incubating
>Reporter: Selvaganesan Govindarajan
>Assignee: Selvaganesan Govindarajan
> Fix For: 2.1-incubating
>
>
> Populating the index is done via load command. Load command doesn't need 
> transaction. Transactions in Trafodion have 2hr expiry period. If the load 
> takes more than 2 hours to populate the index the create index will always 
> fail. 



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


[jira] [Commented] (TRAFODION-2074) Create index should avoid populating the index within a transaction

2016-06-20 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/incubator-trafodion/pull/550#discussion_r67742257
  
--- Diff: core/sql/executor/ExHbaseAccess.cpp ---
@@ -1153,6 +1153,32 @@ Lng32 
ExHbaseAccessTcb::createSQRowFromHbaseFormat(Int64 *latestRowTimestamp)
  ex_assert(FALSE, "Attr not found -2");
  
  char * defVal = attr->getDefaultValue();
+  if (! defVal)
+{
+  char * colVal = (char*)
+hbaseAccessTdb().listOfFetchedColNames()->get(idx);
+
+  Text colFam, colName;
+  extractColFamilyAndName(colVal, colFam, colName);
+
+  Int64 v = 0;
+  if (colName.length() == sizeof(char))
+v = *(char*)colName.data();
+  else if (colName.length() == sizeof(unsigned short))
+v = *(UInt16*)colName.data();
+  else if (colName.length() == sizeof(Lng32))
--- End diff --

Done



> Create index should avoid populating the index within a transaction
> ---
>
> Key: TRAFODION-2074
> URL: https://issues.apache.org/jira/browse/TRAFODION-2074
> Project: Apache Trafodion
>  Issue Type: Improvement
>  Components: sql-exe
>Affects Versions: 2.0-incubating
>Reporter: Selvaganesan Govindarajan
>Assignee: Selvaganesan Govindarajan
> Fix For: 2.1-incubating
>
>
> Populating the index is done via load command. Load command doesn't need 
> transaction. Transactions in Trafodion have 2hr expiry period. If the load 
> takes more than 2 hours to populate the index the create index will always 
> fail. 



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


[jira] [Commented] (TRAFODION-2074) Create index should avoid populating the index within a transaction

2016-06-20 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/incubator-trafodion/pull/550#discussion_r67738650
  
--- Diff: core/sql/generator/GenPreCode.cpp ---
@@ -2824,44 +2823,33 @@ short DDLExpr::ddlXnsInfo(NABoolean , 
NABoolean )
(ddlNode->getOperatorType() == DDL_ALTER_TABLE_DROP_COLUMN) ||
(ddlNode->getOperatorType() == 
DDL_ALTER_TABLE_ALTER_COLUMN_DATATYPE) ||
(ddlNode->getOperatorType() == DDL_DROP_TABLE)))
-{
-  // transaction will be started and commited in called methods.
-  xnCanBeStarted = FALSE;
-}
-
-  isDDLxn = FALSE;
-  if ((ddlXns()) || 
-  ((ddlNode && ddlNode->castToStmtDDLNode() &&
-ddlNode->castToStmtDDLNode()->ddlXns(
-isDDLxn = TRUE;
-
-  // ddl transactions are on.
-  // Following commands currently require transactions be started and
-  // committed in the called methods.
-  if ((ddlXns()) &&
-  (
-   (purgedataHbase()) ||
-   (upgradeRepos())
-   )
-  )
-{
-  // transaction will be started and commited in called methods.
-  xnCanBeStarted = FALSE;
-}
-
-  // ddl transactions are on.
-  // Cleanup and alter commands requires transactions to be started and 
commited
-  // in the called method.
-  if ((ddlNode && ddlNode->castToStmtDDLNode() &&
-   ddlNode->castToStmtDDLNode()->ddlXns()) &&
-  ((ddlNode->getOperatorType() == DDL_CLEANUP_OBJECTS) ||
-   (ddlNode->getOperatorType() == DDL_ALTER_TABLE_DROP_COLUMN) ||
-   (ddlNode->getOperatorType() == 
DDL_ALTER_TABLE_ALTER_COLUMN_DATATYPE)))
-{
-  // transaction will be started and commited in called methods.
-  xnCanBeStarted = FALSE;
-}
-
+ {
+// transaction will be started and commited in called methods.
+xnCanBeStarted = FALSE;
+ }
+ isDDLxn = FALSE;
+  }
+  else  // When the DDL transaction is turned on
+  {
+ isDDLxn = FALSE;
+ if (ddlNode && ddlNode->castToStmtDDLNode() &&
+ddlNode->castToStmtDDLNode()->ddlXns())
+ isDDLxn = TRUE;
+
+ if (purgedataHbase() || upgradeRepos())
+// transaction will be started and commited in called methods.
+xnCanBeStarted = FALSE;
+ if ((ddlNode && ddlNode->castToStmtDDLNode() &&
+  ddlNode->castToStmtDDLNode()->ddlXns()) &&
+((ddlNode->getOperatorType() == DDL_CLEANUP_OBJECTS) ||
+ (ddlNode->getOperatorType() == DDL_ALTER_TABLE_DROP_COLUMN) ||
+ (ddlNode->getOperatorType() == DDL_CREATE_INDEX) ||
--- End diff --

Should POPULATE INDEX be added to this list?
I see that DDL_POPULATE_INDEX is an enum. I don't know though if popindex 
is a utility that manages its own trandactions and takes care not to use one 
for the load part. It may be worthwhile to check.


> Create index should avoid populating the index within a transaction
> ---
>
> Key: TRAFODION-2074
> URL: https://issues.apache.org/jira/browse/TRAFODION-2074
> Project: Apache Trafodion
>  Issue Type: Improvement
>  Components: sql-exe
>Affects Versions: 2.0-incubating
>Reporter: Selvaganesan Govindarajan
>Assignee: Selvaganesan Govindarajan
> Fix For: 2.1-incubating
>
>
> Populating the index is done via load command. Load command doesn't need 
> transaction. Transactions in Trafodion have 2hr expiry period. If the load 
> takes more than 2 hours to populate the index the create index will always 
> fail. 



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


[jira] [Commented] (TRAFODION-2074) Create index should avoid populating the index within a transaction

2016-06-20 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/incubator-trafodion/pull/550#discussion_r67737444
  
--- Diff: core/sql/exp/ExpHbaseInterface.h ---
@@ -62,22 +62,6 @@ class ExHbaseAccessStats;
 
 Int64 getTransactionIDFromContext();
 
-using namespace apache::thrift;
-using namespace apache::thrift::protocol;
-using namespace apache::thrift::transport;
-
-using namespace apache::hadoop::hbase::thrift;
-
-namespace {
-
-  typedef std::vector StrVec;
--- End diff --

Do we have any other Thrift dependencies? I remember seeing some mention of 
thrift in the makefiles. It will be an added bonus if those could be removed 
too.


> Create index should avoid populating the index within a transaction
> ---
>
> Key: TRAFODION-2074
> URL: https://issues.apache.org/jira/browse/TRAFODION-2074
> Project: Apache Trafodion
>  Issue Type: Improvement
>  Components: sql-exe
>Affects Versions: 2.0-incubating
>Reporter: Selvaganesan Govindarajan
>Assignee: Selvaganesan Govindarajan
> Fix For: 2.1-incubating
>
>
> Populating the index is done via load command. Load command doesn't need 
> transaction. Transactions in Trafodion have 2hr expiry period. If the load 
> takes more than 2 hours to populate the index the create index will always 
> fail. 



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


[jira] [Commented] (TRAFODION-1745) show more related info when TRANSLATE run into SQL Error

2016-06-20 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/incubator-trafodion/pull/547#discussion_r67723546
  
--- Diff: core/sql/exp/exp_conv.cpp ---
@@ -4280,6 +4341,9 @@ unicodeToSByteTarget(
if ( allowInvalidCodePoint == FALSE )
{
   ExRaiseSqlError(heap, diagsArea, 
EXE_INVALID_CHAR_IN_TRANSLATE_FUNC);
+  char hexstr[256];
+  memset(hexstr,0,256);
+  *(*diagsArea) << DgString0("UNICODE") << DgString1("ISO88591") 
<< DgString2(stringToHex(hexstr,256,source,sourceLen));
--- End diff --

It's a bit more robust to say, sizeof(hexstr) rather than hard-coding 256.


> show more related info when TRANSLATE run into SQL Error
> 
>
> Key: TRAFODION-1745
> URL: https://issues.apache.org/jira/browse/TRAFODION-1745
> Project: Apache Trafodion
>  Issue Type: Improvement
>Reporter: liu ming
>Assignee: liu ming
>
> The current error message for a TRANSLATE error can be :
> 8690 "An invalid character value encountered in TRANSLATE function."
> Need to show more helping info for easier debug, and user friendly.
> to include a short section of offending source data (may be in hex form), 
> source charset, and target charset.
> Checking other SQL errors related if possible.



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


[jira] [Commented] (TRAFODION-1745) show more related info when TRANSLATE run into SQL Error

2016-06-20 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/incubator-trafodion/pull/547#discussion_r67723426
  
--- Diff: core/sql/exp/exp_conv.cpp ---
@@ -4280,6 +4341,9 @@ unicodeToSByteTarget(
if ( allowInvalidCodePoint == FALSE )
{
   ExRaiseSqlError(heap, diagsArea, 
EXE_INVALID_CHAR_IN_TRANSLATE_FUNC);
+  char hexstr[256];
+  memset(hexstr,0,256);
--- End diff --

The memset is unneeded since stringToHex also does a memset, but it doesn't 
hurt any.


> show more related info when TRANSLATE run into SQL Error
> 
>
> Key: TRAFODION-1745
> URL: https://issues.apache.org/jira/browse/TRAFODION-1745
> Project: Apache Trafodion
>  Issue Type: Improvement
>Reporter: liu ming
>Assignee: liu ming
>
> The current error message for a TRANSLATE error can be :
> 8690 "An invalid character value encountered in TRANSLATE function."
> Need to show more helping info for easier debug, and user friendly.
> to include a short section of offending source data (may be in hex form), 
> source charset, and target charset.
> Checking other SQL errors related if possible.



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


[jira] [Commented] (TRAFODION-2074) Create index should avoid populating the index within a transaction

2016-06-20 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/incubator-trafodion/pull/550#discussion_r67720952
  
--- Diff: core/sql/executor/ExHbaseAccess.cpp ---
@@ -1153,6 +1153,32 @@ Lng32 
ExHbaseAccessTcb::createSQRowFromHbaseFormat(Int64 *latestRowTimestamp)
  ex_assert(FALSE, "Attr not found -2");
  
  char * defVal = attr->getDefaultValue();
+  if (! defVal)
+{
+  char * colVal = (char*)
+hbaseAccessTdb().listOfFetchedColNames()->get(idx);
+
+  Text colFam, colName;
+  extractColFamilyAndName(colVal, colFam, colName);
+
+  Int64 v = 0;
+  if (colName.length() == sizeof(char))
+v = *(char*)colName.data();
+  else if (colName.length() == sizeof(unsigned short))
+v = *(UInt16*)colName.data();
+  else if (colName.length() == sizeof(Lng32))
--- End diff --

Should be sizeof(ULng32), but since that is the same as sizeof(Lng32), this 
is an unobservable bug


> Create index should avoid populating the index within a transaction
> ---
>
> Key: TRAFODION-2074
> URL: https://issues.apache.org/jira/browse/TRAFODION-2074
> Project: Apache Trafodion
>  Issue Type: Improvement
>  Components: sql-exe
>Affects Versions: 2.0-incubating
>Reporter: Selvaganesan Govindarajan
>Assignee: Selvaganesan Govindarajan
> Fix For: 2.1-incubating
>
>
> Populating the index is done via load command. Load command doesn't need 
> transaction. Transactions in Trafodion have 2hr expiry period. If the load 
> takes more than 2 hours to populate the index the create index will always 
> fail. 



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


[jira] [Commented] (TRAFODION-1698) ODBC: trafodion doesn't support API SQLForeignKeys

2016-06-20 Thread ASF GitHub Bot (JIRA)

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

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

GitHub user xwq opened a pull request:

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

[TRAFODION-1698]ODBC: trafodion doesn't support API SQLForeignKeys



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

$ git pull https://github.com/xwq/incubator-trafodion master

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

https://github.com/apache/incubator-trafodion/pull/551.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 #551


commit f02977b53a651d5e0e2102e91ed6153c79f4f1a7
Author: Weiqing Xu 
Date:   2016-06-20T11:17:53Z

[TRAFODION-1698]ODBC: trafodion doesn't support API SQLForeignKeys




> ODBC: trafodion doesn't support API SQLForeignKeys
> --
>
> Key: TRAFODION-1698
> URL: https://issues.apache.org/jira/browse/TRAFODION-1698
> Project: Apache Trafodion
>  Issue Type: Improvement
>  Components: connectivity-dcs
>Affects Versions: 1.0 (pre-incubation), 2.0-incubating
> Environment: client platform: windows7, windows8, centos6.7, suse11
>Reporter: Gao, Rui-Xian
>Assignee: Weiqing Xu
>
> API SQLForeignKeys returned error that the API  type is not supported.
> To reproduce --
> create table TDV5WYPAQVA (V5WYPAQVJJ  char(10) CHARACTER SET ucs2 not null 
> not droppable, PDO_6ERNAZ  char(10) CHARACTER SET ucs2, primary 
> key(V5WYPAQVJJ)) NO PARTITION
> create table TDV5WYPAQVB (LRO90EZUSH  char(10) CHARACTER SET ucs2 not null 
> not droppable, IKLI4HXBSC  char(10) CHARACTER SET ucs2, primary 
> key(LRO90EZUSH), foreign key (IKLI4HXBSC) references TDV5WYPAQVA(V5WYPAQVJJ)) 
> NO PARTITION
> create table TDV5WYPAQVC (BG1TCQFK2X  char(10) CHARACTER SET ucs2 not null 
> not droppable, W8UMGMNY7F  char(10) CHARACTER SET ucs2, primary 
> key(BG1TCQFK2X), foreign key (W8UMGMNY7F) references TDV5WYPAQVB(LRO90EZUSH)) 
> NO PARTITION
> ==
> SQLForeignKeys(hstmt, TRAFODION, 9, RACHEL_ODBCTEST_L, 17, TDV5WYPAQVA, 11, 
> TRAFODION, 9, RACHEL_ODBCTEST_L, 17, , 0)
> 10:46:03  ***ERROR: SQLForeignKeys: Expected: SQL_SUCCESS Actual: SQL_ERROR
>File: ../../../../src/coast/coast_unified/src/forkeys.c   Line: 302
>State: HYC00
>Native Error: 1
>Error: [Trafodion ODBC Driver][DCS Server] OPTIONAL FEATURE NOT 
> IMPLEMENTED.UNSUPPORTED INPUT SMD API TYPE



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


[jira] [Created] (TRAFODION-2079) [3rd party tool-Squirrel] indexes won't show up on objects panel, sql command line works fine

2016-06-20 Thread Gao, Rui-Xian (JIRA)
Gao, Rui-Xian created TRAFODION-2079:


 Summary: [3rd party tool-Squirrel] indexes won't show up on 
objects panel, sql command line works fine
 Key: TRAFODION-2079
 URL: https://issues.apache.org/jira/browse/TRAFODION-2079
 Project: Apache Trafodion
  Issue Type: Bug
  Components: client-jdbc-t4
Affects Versions: 2.1-incubating
 Environment: Squirrel 3.7
server info -- esgynDBadv R2.1, centos 6.7, hbase1.0 cdh5.4.8
Reporter: Gao, Rui-Xian
Assignee: Kevin Xu
Priority: Minor


click table name from objects panel, indexes won't show up.

But checking from sql command line, indexes will be returned.

>>get indexes on table BTSEL04;

Indexes on Table RACHEL_SCH.BTSEL04
===

BTSEL04A
BTSEL04B




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


[jira] [Created] (TRAFODION-2078) [3rd party tool-Squirrel] query cancel is not supported

2016-06-20 Thread Gao, Rui-Xian (JIRA)
Gao, Rui-Xian created TRAFODION-2078:


 Summary: [3rd party tool-Squirrel] query cancel is not supported
 Key: TRAFODION-2078
 URL: https://issues.apache.org/jira/browse/TRAFODION-2078
 Project: Apache Trafodion
  Issue Type: Bug
  Components: client-jdbc-t4
Affects Versions: 2.1-incubating
 Environment: Squirrel 3.7
server info -- esgynDBadv R2.1, centos6.7, hbase1.0, cdh5.4.8
Reporter: Gao, Rui-Xian
Assignee: Kevin Xu



can't cancel query from squirrel, syntax error returned --

control query cancel qid 
'MXID11073282123331732153682000206U300_483_XX';

Error: *** ERROR[15001] A syntax error occurred at or before: 
control query cancel qid 'MXID11073282123331732153682000206U300
_483_XX';
   ^ (87 characters from start of SQL statement) [2016-06-20 17:21:38]
SQLState:  42000
ErrorCode: -15001
Error: *** ERROR[8822] The statement was not prepared. [2016-06-20 17:21:38]
SQLState:  X08MU
ErrorCode: -8822



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


[jira] [Updated] (TRAFODION-2077) [3rd party tool Squirrel] parameter is not support

2016-06-20 Thread Gao, Rui-Xian (JIRA)

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

Gao, Rui-Xian updated TRAFODION-2077:
-
Summary: [3rd party tool Squirrel] parameter is not support   (was: 
[Squirrel] parameter is not support )

> [3rd party tool Squirrel] parameter is not support 
> ---
>
> Key: TRAFODION-2077
> URL: https://issues.apache.org/jira/browse/TRAFODION-2077
> Project: Apache Trafodion
>  Issue Type: Bug
>  Components: client-jdbc-t4
>Affects Versions: 2.1-incubating
> Environment: Squirrel 3.7
> server info -- esgynDBadv R2.1, centos 6.7, hbase 1.0, cdh5.4.8
>Reporter: Gao, Rui-Xian
>Assignee: Kevin Xu
>
> set parameter will get syntax error with Squirrel --
> set param ?p1 B;
> Error: *** ERROR[15001] A syntax error occurred at or before:
> set param ?p1 B;
> ^ (9 characters from start of SQL statement) 



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


[jira] [Created] (TRAFODION-2077) [Squirrel] parameter is not support

2016-06-20 Thread Gao, Rui-Xian (JIRA)
Gao, Rui-Xian created TRAFODION-2077:


 Summary: [Squirrel] parameter is not support 
 Key: TRAFODION-2077
 URL: https://issues.apache.org/jira/browse/TRAFODION-2077
 Project: Apache Trafodion
  Issue Type: Bug
  Components: client-jdbc-t4
Affects Versions: 2.1-incubating
 Environment: Squirrel 3.7
server info -- esgynDBadv R2.1, centos 6.7, hbase 1.0, cdh5.4.8
Reporter: Gao, Rui-Xian
Assignee: Kevin Xu


set parameter will get syntax error with Squirrel --

set param ?p1 B;

Error: *** ERROR[15001] A syntax error occurred at or before:
set param ?p1 B;
^ (9 characters from start of SQL statement) 




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


[jira] [Created] (TRAFODION-2076) [Squirrel] call spj will return error though the procedure is actually executed successfully

2016-06-20 Thread Gao, Rui-Xian (JIRA)
Gao, Rui-Xian created TRAFODION-2076:


 Summary: [Squirrel] call spj will return error though the 
procedure is actually executed successfully 
 Key: TRAFODION-2076
 URL: https://issues.apache.org/jira/browse/TRAFODION-2076
 Project: Apache Trafodion
  Issue Type: Bug
  Components: client-jdbc-t4
Affects Versions: 2.1-incubating
 Environment: Squirrel 3.7
server info -- esgynDBadv R2.1, centos6.7, hbase1.0, cdh5.4.8
Reporter: Gao, Rui-Xian
Assignee: Kevin Xu
Priority: Minor


create library qa_dfr file '/home/trafodion/QALibs/SPJ/dfr.jar'
Create procedure createTable()
external name 'TestDDL.createTable'
LIBRARY qa_dfr
language java
   NO TRANSACTION REQUIRED
parameter style java;
call createTable();

Following error will be returned --
java.lang.ClassCastException: org.trafodion.jdbc.t4.TrafT4Statement cannot be 
cast to org.trafodion.jdbc.t4.TrafT4CallableStatement

But actually the table is created successfully.



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


[jira] [Created] (TRAFODION-2075) [3rd party tool] Squirrel doesn't support prepare/explain/excute, will return syntax error

2016-06-20 Thread Gao, Rui-Xian (JIRA)
Gao, Rui-Xian created TRAFODION-2075:


 Summary: [3rd party tool] Squirrel doesn't support 
prepare/explain/excute, will return syntax error
 Key: TRAFODION-2075
 URL: https://issues.apache.org/jira/browse/TRAFODION-2075
 Project: Apache Trafodion
  Issue Type: Bug
  Components: client-jdbc-t4
Affects Versions: 2.1-incubating
 Environment: squirrel 3.7
server with esgynDBadv R2.1, centos 6.7, hbase1.0 cdh 5.4.8
Reporter: Gao, Rui-Xian
Assignee: Kevin Xu


Prepare/explain/execute statement is not supported --

prepare xx from select * from btsel02;

Error: *** ERROR[15001] A syntax error occurred at or before: 
prepare xx from select * from btsel02;
 ^ (22 characters from start of SQL statement) [2016-06-20 
17:07:00]
SQLState:  42000
ErrorCode: -15001
Error: *** ERROR[8822] The statement was not prepared. [2016-06-20 17:07:00]
SQLState:  X08MU
ErrorCode: -8822



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


[jira] [Updated] (TRAFODION-1743) Unable to create a volatile table in a stored procedure

2016-06-20 Thread Jian Jin (JIRA)

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

Jian Jin updated TRAFODION-1743:

Assignee: mashengchen  (was: Jian Jin)

> Unable to create a volatile table in a stored procedure
> ---
>
> Key: TRAFODION-1743
> URL: https://issues.apache.org/jira/browse/TRAFODION-1743
> Project: Apache Trafodion
>  Issue Type: Bug
>  Components: sql-general
>Reporter: Roberta Marton
>Assignee: mashengchen
>
> Wrote an SPJ that creates a volatile table.  The following error is returned:
> create stmt: create volatile table ABC_2016_01_07_19_32_29_11(version int not 
> null, time_lct char(26) character set ISO88591 not null, user_name char(128) 
> character set ISO88591 not null, grant_depth int not null, seq_num largeint 
> generated by default as identity , grant_details varchar (500) character set 
> ISO88591 not null) ;
> @Thu Jan 07 19:32:31 GMT 2016: ERROR: unable to create the results table *** 
> ERROR[15001] A syntax error occurred at or before:
> CREATE VOLATILE SCHEMA;
>  ^ (22 characters from start of SQL statement)
> The same create statement works fine through sqlci



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


[jira] [Work started] (TRAFODION-1743) Unable to create a volatile table in a stored procedure

2016-06-20 Thread Jian Jin (JIRA)

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

Work on TRAFODION-1743 started by Jian Jin.
---
> Unable to create a volatile table in a stored procedure
> ---
>
> Key: TRAFODION-1743
> URL: https://issues.apache.org/jira/browse/TRAFODION-1743
> Project: Apache Trafodion
>  Issue Type: Bug
>  Components: sql-general
>Reporter: Roberta Marton
>Assignee: Jian Jin
>
> Wrote an SPJ that creates a volatile table.  The following error is returned:
> create stmt: create volatile table ABC_2016_01_07_19_32_29_11(version int not 
> null, time_lct char(26) character set ISO88591 not null, user_name char(128) 
> character set ISO88591 not null, grant_depth int not null, seq_num largeint 
> generated by default as identity , grant_details varchar (500) character set 
> ISO88591 not null) ;
> @Thu Jan 07 19:32:31 GMT 2016: ERROR: unable to create the results table *** 
> ERROR[15001] A syntax error occurred at or before:
> CREATE VOLATILE SCHEMA;
>  ^ (22 characters from start of SQL statement)
> The same create statement works fine through sqlci



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