[
https://issues.apache.org/jira/browse/TRAFODION-2060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15330793#comment-15330793
]
ASF GitHub Bot commented on TRAFODION-2060:
-------------------------------------------
Github user DaveBirdsall commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/545#discussion_r67070993
--- Diff:
core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/InterfaceResultSet.java ---
@@ -263,6 +267,14 @@ Object getFetchString(TrafT4Connection conn, int
scale, int SQLDataType, int SQL
break;
}
break;
+ case SQLTYPECODE_TINYINT:
+ short sValue1 = (byte) ibuffer[byteIndex];
+ retObj = new Short(sValue1);
+ break;
+ case SQLTYPECODE_TINYINT_UNSIGNED:
--- End diff --
Do we have to twiddle a sign bit in one of these cases?
> 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)