[
https://issues.apache.org/jira/browse/TRAFODION-2145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15409261#comment-15409261
]
ASF GitHub Bot commented on TRAFODION-2145:
-------------------------------------------
GitHub user xwq opened a pull request:
https://github.com/apache/incubator-trafodion/pull/643
[TRAFODION-2145]sqlcolumns returned error info for some datatype
The root cause is the FS_DATA_TYPE is not right for some datatype in the
query for SQLCOLUMNS.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/xwq/incubator-trafodion sqlcolumns
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-trafodion/pull/643.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 #643
----
commit a7c0e834ad661e33b5b62e455d08e8a4029c0ab1
Author: xwq <xwq@weiqing01.(none)>
Date: 2016-08-05T09:35:28Z
[TRAFODION-2145]sqlcolumns returned error info for some datatype
The root cause is the FS_DATA_TYPE is not right for some datatype in the
query for SQLCOLUMNS.
----
> Column name returned by SQLColumn api when column type is interval
> ------------------------------------------------------------------
>
> Key: TRAFODION-2145
> URL: https://issues.apache.org/jira/browse/TRAFODION-2145
> Project: Apache Trafodion
> Issue Type: Bug
> Components: connectivity-general
> Affects Versions: 2.1-incubating
> Environment: SW Build: apache-trafodion-build-2.1
> ODBC Driver: apache-trafodion-build-2.1
> Cluster Home Page:10.10.10.161:7180
> Reporter: Jarek
> Labels: build
>
> Description:
> when column type is interval, the column name is wrong using SQLColumn api.
> Test Steps:
> Step 1. Create henv, hdbc, hstmt handles.
> Step 2. Create the following table using the hstmt handle.
> _stprintf(&buffer[0], _T(" \
> create table %s( \
> c0 largeint generated by default as identity, \
> c1 char(20) no default not null, \
> c2 int no default, \
> c3 smallint not null, \
> c4 float(52) default -1.7272337110188889e-76, \
> c5 double precision default -2.2250738585072014e-308 not
> null, \
> c6 date default current_date, \
> c7 time(0) default current_time, \
> c8 decimal(18, 10) signed default 12345678.1234567890 not
> null, \
> c9 largeint default 9.223E18, \
> c10 numeric(128, 0) signed default
> 12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678
> not null, \
> c11 real default -1.1579208e38, \
> c12 interval year(5) to month default NULL, \
> c13 pic xxxxxxxxxxxx display upshift default 'defaULT', \
> c14 character(8) default 'summer', \
> c15 varchar(10) default 'china', \
> c timestamp default current_timestamp, \
> primary key(c0)) \
> "), tc001_table);
> Step 3. With the hstmt handle, check column name of column c12 using
> SQLColumn api.
> In the Step 3. we expect the column name is C12, but it displays C11 in
> actual result.
> the log output:
> 19:56:58 case begin.
> SQLColumns: SQLColumns function call executed correctly.
> Start to fetch column.
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C0,
> datatype: -5, typename: BIGINT, nullable: 0, remarks: .
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C1,
> datatype: 1, typename: CHAR, nullable: 0, remarks: .
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C2,
> datatype: 4, typename: INTEGER, nullable: 1, remarks: .
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C3,
> datatype: 5, typename: SMALLINT, nullable: 0, remarks: .
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C4,
> datatype: 8, typename: DOUBLE PRECISION, nullable: 1, remarks: .
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C5,
> datatype: 8, typename: DOUBLE PRECISION, nullable: 0, remarks: .
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C6,
> datatype: 91, typename: DATE, nullable: 1, remarks: .
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C7,
> datatype: 92, typename: TIME, nullable: 1, remarks: .
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C8,
> datatype: 3, typename: DECIMAL, nullable: 0, remarks: .
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C9,
> datatype: -5, typename: BIGINT, nullable: 1, remarks: .
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C10,
> datatype: 2, typename: NUMERIC, nullable: 0, remarks: .
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C11,
> datatype: 7, typename: REAL, nullable: 1, remarks: .
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C11,
> datatype: 6, typename: FLOAT, nullable: 1, remarks: .
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C13,
> datatype: 1, typename: CHAR, nullable: 1, remarks: .
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C14,
> datatype: 1, typename: CHAR, nullable: 1, remarks: .
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C15,
> datatype: 12, typename: VARCHAR, nullable: 1, remarks: .
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C, datatype:
> 93, typename: TIMESTAMP, nullable: 1, remarks: .
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)