[jira] [Commented] (TRAFODION-3134) ODBC need SQLTablePrivileges support on mxosrvr

2018-07-10 Thread ASF GitHub Bot (JIRA)


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

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

GitHub user Weixin-Xu opened a pull request:

https://github.com/apache/trafodion/pull/1638

[TRAFODION-3134] odbc support SQLTablePrivileges



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

$ git pull https://github.com/Weixin-Xu/incubator-trafodion odbc3

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

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


commit 3ec2f29a196ed0895223dbf1f3c87067273e246a
Author: Weixin-Xu 
Date:   2018-07-10T07:48:28Z

odbc support SQLTablePrivileges




> ODBC need SQLTablePrivileges support on mxosrvr
> ---
>
> Key: TRAFODION-3134
> URL: https://issues.apache.org/jira/browse/TRAFODION-3134
> Project: Apache Trafodion
>  Issue Type: New Feature
>  Components: connectivity-mxosrvr
>Affects Versions: 2.4
>Reporter: XuWeixin
>Assignee: XuWeixin
>Priority: Major
> Fix For: 2.4
>
>
> On ODBC Driver, feature was completed.
> But on mxosrvr, error will return when ODBC clinet call API 
> SQLTablePrivileges 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TRAFODION-3131) Use of reserved words as names fails in many places

2018-07-10 Thread ASF GitHub Bot (JIRA)


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

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

GitHub user DaveBirdsall opened a pull request:

https://github.com/apache/trafodion/pull/1637

[TRAFODION-3131] Fix some reserved and non-reserved word issues

This set of changes does the following:

1. Fixes some issues with reserved words not being recognized as reserved 
words.
2. Updates core/TEST037 to include test cases for some recently added 
functions (CRC32, MD5, SHA, SHA1 and SHA2)
3. Updates the expected results for core/TEST037.

Note: I'm aware that the comments in core/TEST037 are not perfectly aligned 
with the expected results. (But they are much more aligned than they were.) 
Will leave further improvements to follow-up work.

Note: I considered refactoring common/ComResWords.cpp and the "prettify SQL 
text" functions in common/NAString.cpp, moving them to the parser and changing 
them to use the ParKeyWords table in parser/ParKeyWords.cpp. I wanted to do 
this to simplify development, consolidating three keyword tables into one. I 
started down this path and discovered that this was far from easy; moreover I 
concluded that it wouldn't actually simplify development much. So I fell back 
to the position of merely adding thorough documentation to 
parser/ParKeyWords.cpp, giving instructions on how to keep these tables in sync.

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

$ git pull https://github.com/DaveBirdsall/trafodion Trafodion3131

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

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


commit 8ed5ca2070d28e6a331ded03ea1a02af5e15c932
Author: Dave Birdsall 
Date:   2018-07-10T21:51:28Z

[TRAFODION-3131] Fix some reserved and non-reserved word issues




> Use of reserved words as names fails in many places
> ---
>
> Key: TRAFODION-3131
> URL: https://issues.apache.org/jira/browse/TRAFODION-3131
> Project: Apache Trafodion
>  Issue Type: Bug
>  Components: sql-cmp
>Affects Versions: 2.3
>Reporter: David Wayne Birdsall
>Assignee: David Wayne Birdsall
>Priority: Major
> Attachments: jira.sql.txt
>
>
> It should be possible to use a reserved word (e.g., "YEAR") as an identifier 
> if it is made into a delimited identifier (that is, upper-cased and 
> surrounded with double-quotes). The sqlci session below demonstrates several 
> examples where this fails:
> {quote}>>obey jira.sql;
> >>-- script to reproduce various problems with reserved words 
> >>
> >>?section tablename
> >>
> >>-- reserved word as a table name fails in various places
> >>
> >>create table "DELETE" (c1 int);
> --- SQL operation complete.
> >>invoke "DELETE";
> *** ERROR[15001] A syntax error occurred at or before: 
> TABLE TRAFODION.SCH.DELETE;
>  ^ (26 characters from start of SQL statement)
> *** ERROR[15001] A syntax error occurred at or before: 
> TABLE ;
>  ^ (7 characters from start of SQL statement)
> *** ERROR[8822] The statement was not prepared.
> >>showddl "DELETE";
> CREATE TABLE TRAFODION.SCH.DELETE
>  (
>  C1 INT DEFAULT NULL NOT SERIALIZED
>  )
>  ATTRIBUTES ALIGNED FORMAT
> ;
> -- GRANT SELECT, INSERT, DELETE, UPDATE, REFERENCES ON TRAFODION.SCH.DELETE 
> TO DB__ROOT WITH GRANT OPTION;
> --- SQL operation complete.
> >>insert into "DELETE" values (1);
> *** ERROR[8448] Unable to access Hbase interface. Call to 
> ExpHbaseInterface::checkAndInsertRow returned error HBASE_ACCESS_ERROR(-706). 
> Cause: java.lang.IllegalArgumentException: Table qualifier must not be empty
> org.apache.hadoop.hbase.TableName.isLegalTableQualifierName(TableName.java:179)
> org.apache.hadoop.hbase.TableName.isLegalTableQualifierName(TableName.java:149)
> org.apache.hadoop.hbase.TableName.(TableName.java:322)
> org.apache.hadoop.hbase.TableName.createTableNameIfNecessary(TableName.java:358)
> org.apache.hadoop.hbase.TableName.valueOf(TableName.java:418)
> org.apache.hadoop.hbase.client.HTable.(HTable.java:274)
> org.apache.hadoop.hbase.client.transactional.TransactionalTable.(TransactionalTable.java:138)
> org.apache.hadoop.hbase.client.transactional.RMInterface.(RMInterface.java:159)
> org.trafodion.sql.HTableClient.init(HTableClient.java:348)
> org.trafodion.sql.HBaseClient.getHTableClient(HBaseClient.java:1008)
> org.trafodion.sql.HBaseClient.insertRow(HBaseClient.java:1964).
> --- 0 row(s) inserted.
> >>delete from "DELETE" where c1=1;
> *** ERROR[8448] Unable to access Hbase interface. Call to 
> 

[jira] [Commented] (TRAFODION-3127) to_char enhancement

2018-07-10 Thread ASF GitHub Bot (JIRA)


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

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

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

https://github.com/apache/trafodion/pull/1632#discussion_r201484661
  
--- Diff: core/sql/exp/exp_datetime.cpp ---
@@ -3294,6 +3338,39 @@ convertMonthToStr(Lng32 value, char *, UInt32 
width)
   result += width;
 }
 
+static void
+convertDayOfWeekToStr(Lng32 value, char *, NABoolean bAbbreviation, 
UInt32 width)
+{
+  const char* dayofweek[] =
+  {
+"SUNDAY   ",
+"MONDAY   ",
+"TUESDAY  ",
+"WEDNESDAY",
+"THURSDAY ",
+"FRIDAY   ",
+"SATURDAY "
+  };
+
+  const char* dayofweek_abb[] =
+  {
+"SUN",
+"MON",
+"TUE",
+"WED",
+"THU",
+"FRI",
+"SAT"
+  };
+
+  if (bAbbreviation)
+strcpy(result, dayofweek_abb[value-1]);
+  else
+strcpy(result, dayofweek[value-1]);
+  // Update result pointer to point to end of string.
+  result += width;
--- End diff --

Why width instead of strlen(result)? (This is probably OK; I'm just 
curious.)


> to_char enhancement
> ---
>
> Key: TRAFODION-3127
> URL: https://issues.apache.org/jira/browse/TRAFODION-3127
> Project: Apache Trafodion
>  Issue Type: Improvement
>Reporter: chenyunren
>Assignee: chenyunren
>Priority: Major
>
> |Pattern|Description|EXP.|
> |HH|  hour of day (00-23)|TO_CHAR (TIME '23:05:10','HH')
>  result:23|
> |HH12|  hour of day (01-12)|TO_CHAR (TIME '23:05:10','HH')
>  result:11|
> |HH24|hour of day (00-23)|TO_CHAR (TIME '23:05:10','HH')
>  result:23|
> |MI|minute (00-59)|TO_CHAR (TIME '23:05:10','MI')
>  result:05|
> |SS|second (00-59)|TO_CHAR (TIME '23:05:10','SS')
>  result:10|
> ||year (4  digits)|TO_CHAR (TIMESTAMP '2016-03-01 12:05:10','')
>  result:2016|
> |Y|Last digit of the year (0-9)| TO_CHAR (TIMESTAMP '2016-03-01 12:05:10','Y')
>  result:6|
> |YY|Last two digits of the year (00-99)| TO_CHAR (TIMESTAMP '2016-03-01 
> 12:05:10','YY')
>  result:16|
> |YYY|Last three digits of the year (000-999)| TO_CHAR (TIMESTAMP '2016-03-01 
> 12:05:10','YYY')
>  result:016|
> |MON|month(3 chars in English)|TO_CHAR (TIMESTAMP '2016-03-01 12:05:10','MON')
>  result:MAR|
> |MM|month(01-12)|TO_CHAR(DATE '2006-12-01','MM')
>  result:12|
> |DY|name of day(3 chars in English) |TO_CHAR (TIMESTAMP '2016-03-01 
> 12:05:10','DY')
>  result:TUE|
> |DAY|Name of day, padded with blanks to length of 9 characters. 
> SUNDAY|TO_CHAR (TIMESTAMP '2016-03-01 12:05:10','DY')
> result:TUESDAY|
> |CC|century|TO_CHAR (TIMESTAMP '2016-03-01 12:05:10','CC')
>  result:21|
> |D|day of week(Sunday (1) to Saturday (7))|TO_CHAR (TIMESTAMP '2016-03-01 
> 12:05:10','D')
>  result:3|
> |DD|day of month(01-31)|TO_CHAR(DATE '2006-12-01','DD')
>  result:01|
> |DDD|day of year(1-366)|TO_CHAR(DATE '2006-12-01','DDD')
>  result:335|
> |W|week of month(1-5)|TO_CHAR(DATE '2006-12-31','W')
>  result:5|
> |WW|week number of year(1-53).The first week starts on the first day of the 
> month.|TO_CHAR(DATE '2006-01-02','WW')
>  result:01|
> |J|Julian day (number of days since January 1, 4713 BC)|TO_CHAR(TIMESTAMP 
> '2001-01-07 00:00:00','J')
>  result:2451917|
> |Q|The quarter of the year (1 - 4)|TO_CHAR(DATE '2006-12-01','Q')
>  result:4|



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (TRAFODION-3135) Remove some obsolete cruft from the SQL parser and related modules

2018-07-10 Thread David Wayne Birdsall (JIRA)
David Wayne Birdsall created TRAFODION-3135:
---

 Summary: Remove some obsolete cruft from the SQL parser and 
related modules
 Key: TRAFODION-3135
 URL: https://issues.apache.org/jira/browse/TRAFODION-3135
 Project: Apache Trafodion
  Issue Type: Improvement
  Components: sql-cmp
Affects Versions: 2.3
Reporter: David Wayne Birdsall
Assignee: David Wayne Birdsall


Modules parser/ParKeyWords.cpp and common/ComResWords.cpp contain code that is 
specific to SQL/MP, a predecessor product. That code is obsolete. Removing this 
code will make parser maintenance a bit simpler.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TRAFODION-2743) windows ODBC 64 need support LOB

2018-07-10 Thread ASF GitHub Bot (JIRA)


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

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

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

https://github.com/apache/trafodion/pull/1633#discussion_r201439488
  
--- Diff: win-odbc64/Common/TransportBase.h ---
@@ -134,6 +134,8 @@ enum SRVR_API {
SRVR_API_SQLFASTEXECDIRECT, //OK WMS
SRVR_API_SQLFASTFETCH_PERF, //OK WMS
SRVR_API_GETSEGMENTS,   //OK WMS
+SRVR_API_EXTRACTLOB,//OK LOB
+SRVR_API_UPDATELOB, //OK LOB
--- End diff --

My guess is that the original code uses tabs (which is bad) and the tab 
setting in github assumes 8 spaces per tab. Consider changing your editor to 
use 8 spaces per tab.


> windows ODBC 64 need support LOB
> 
>
> Key: TRAFODION-2743
> URL: https://issues.apache.org/jira/browse/TRAFODION-2743
> Project: Apache Trafodion
>  Issue Type: Bug
>Reporter: Weiqing Xu
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (TRAFODION-2926) Link to JIRA should use https:

2018-07-10 Thread David Wayne Birdsall (JIRA)


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

David Wayne Birdsall resolved TRAFODION-2926.
-
   Resolution: Fixed
Fix Version/s: 2.3

Corrected URL now appears on https://trafodion.apache.org/issue-tracking.html.

> Link to JIRA should use https:
> --
>
> Key: TRAFODION-2926
> URL: https://issues.apache.org/jira/browse/TRAFODION-2926
> Project: Apache Trafodion
>  Issue Type: Improvement
>Reporter: Sebb
>Assignee: David Wayne Birdsall
>Priority: Major
> Fix For: 2.3
>
>
> As  the subject says



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TRAFODION-3132) Add and Correct Descriptions for *Character String Data Type* in *Trafodion SQL Reference Manual*

2018-07-10 Thread ASF GitHub Bot (JIRA)


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

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

Github user asfgit closed the pull request at:

https://github.com/apache/trafodion/pull/1634


> Add and Correct Descriptions for *Character String Data Type* in *Trafodion 
> SQL Reference Manual*
> -
>
> Key: TRAFODION-3132
> URL: https://issues.apache.org/jira/browse/TRAFODION-3132
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TRAFODION-2926) Link to JIRA should use https:

2018-07-10 Thread ASF GitHub Bot (JIRA)


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

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

Github user asfgit closed the pull request at:

https://github.com/apache/trafodion/pull/1635


> Link to JIRA should use https:
> --
>
> Key: TRAFODION-2926
> URL: https://issues.apache.org/jira/browse/TRAFODION-2926
> Project: Apache Trafodion
>  Issue Type: Improvement
>Reporter: Sebb
>Assignee: David Wayne Birdsall
>Priority: Major
>
> As  the subject says



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TRAFODION-3133) limit n support in subquery

2018-07-10 Thread ASF GitHub Bot (JIRA)


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

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

GitHub user Guhaiyan opened a pull request:

https://github.com/apache/trafodion/pull/1636

[TRAFODION-3133] limit n support in subquery

Just as the title shows, it is to support limit n in subquery.

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

$ git pull https://github.com/Guhaiyan/traffork_ghy jira3133

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

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


commit a8860c1cbf46281adbe5cdc51455ee42deaa8eec
Author: Guhaiyan 
Date:   2018-07-10T11:29:45Z

[TRAFODION-3133] limit n support in subquery




> limit n support in subquery
> ---
>
> Key: TRAFODION-3133
> URL: https://issues.apache.org/jira/browse/TRAFODION-3133
> Project: Apache Trafodion
>  Issue Type: New Feature
>Reporter: Gu Haiyan
>Assignee: Gu Haiyan
>Priority: Minor
>
> support limit n in subquery



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (TRAFODION-3134) ODBC need SQLTablePrivileges support on mxosrvr

2018-07-10 Thread XuWeixin (JIRA)
XuWeixin created TRAFODION-3134:
---

 Summary: ODBC need SQLTablePrivileges support on mxosrvr
 Key: TRAFODION-3134
 URL: https://issues.apache.org/jira/browse/TRAFODION-3134
 Project: Apache Trafodion
  Issue Type: New Feature
  Components: connectivity-mxosrvr
Affects Versions: 2.4
Reporter: XuWeixin
Assignee: XuWeixin
 Fix For: 2.4


On ODBC Driver, feature was completed.

But on mxosrvr, error will return when ODBC clinet call API SQLTablePrivileges 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)