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

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

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

    https://github.com/apache/incubator-trafodion/pull/643#discussion_r73836940
  
    --- Diff: core/conn/odbc/src/odbc/nsksrvrcore/srvrothers.cpp ---
    @@ -4834,20 +4834,19 @@ odbc_SQLSvc_GetSQLCatalogs_sme_(
       "('DECIMAL', 3, 18, NULL, NULL, 'precision,scale', 1, 0, 2, 0, 0, 0, 
'DECIMAL', 0, 18, 'SIGNED DECIMAL', 152, 10, -2, -3, 3, NULL, NULL, 0, 0, 3, 
0), "
       "('DECIMAL UNSIGNED', 3, 18, NULL, NULL, 'precision,scale', 1, 0, 2, 1, 
0, 0, 'DECIMAL', 0, 18, 'UNSIGNED DECIMAL', 150, 10, -2, -3, -301, NULL, NULL, 
0, 0, 3, 0), "
       "('DOUBLE PRECISION', 8, 15, NULL, NULL, NULL, 1, 0, 2, 0, 0, 0, 
'DOUBLE', NULL, NULL, 'DOUBLE', 143, 2, 54, -1, 8, NULL, NULL, 0, 0, 3, 0), "
    -  "('FLOAT', 6, 15, NULL, NULL, NULL, 1, 0, 2, 0, 0, 0, 'FLOAT', NULL, 
NULL, 'FLOAT', 142, 2, -2, -1, 6, NULL, NULL, 0, 0, 3, 0), "
    --- End diff --
    
    Here the issues is the FS_DATA_TYPE of FLOAT is same with REAL. 
    
    Actually, If I created a table with FLOAT column, but it represented by 
"DOUBLE " type. I think it's a bug, it should be REAL instead. I can try to fix 
it. 


> 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)

Reply via email to