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

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

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

    https://github.com/apache/incubator-trafodion/pull/545#discussion_r67390668
  
    --- Diff: 
core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/InterfaceResultSet.java ---
    @@ -503,6 +515,11 @@ static Object getExecute2FetchString(TrafT4Connection 
conn, TrafT4Desc desc, byt
                                break;
                        }
                        break;
    +           case SQLTYPECODE_TINYINT:
    +           case SQLTYPECODE_TINYINT_UNSIGNED:
    +                        short sValue1 = (byte) values[noNullValue];
    +                   retObj = new Short(sValue1);
    +                   break;
    --- End diff --
    
    We dont have full support for tinyint IO from odbc/jdbc interface.
    This code is part of jdbc and will not be reached until that support is in.
    Once that support is in, these paths will be fixed and tested.
    Until then, tinyint will be converted to smallint in the engine.
    
    Based on the review comment, have updated this code to handle unsigned 
tinyint.
    But it will not be tested and enabled until full jdbc/odbc support has been 
added.
    



> Add support for native tinyint datatype
> ---------------------------------------
>
>                 Key: TRAFODION-2060
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2060
>             Project: Apache Trafodion
>          Issue Type: Improvement
>            Reporter: Anoop Sharma
>            Assignee: Anoop Sharma
>            Priority: Minor
>
> Currently, tinyint datatype(1 byte integer) in trafodion is automatically 
> converted to smallint (2 byte integer) and treated like smallint.
> It causes values that are beyond the tinyint range to be inserted
> and selected.
> Same issue happens with hive tinyint datatypes which are also
> treated as smallint. That causes inconsistent behavior when that
> datatype is accessed or inserted from hive vs. trafodion.
> This jira is to add support for true tinyint datatype in table definitions,
> cast stmts, param typing and handling of hive tables.



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

Reply via email to