trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xwq <>
Subject [GitHub] incubator-trafodion pull request: [TRAFODION-1686][MTDCS] ODBC: SQ...
Date Thu, 14 Apr 2016 07:54:48 GMT
Github user xwq commented on a diff in the pull request:
    --- Diff: core/conn/jdbc_type2/native/SqlInterface.cpp ---
    @@ -246,10 +246,14 @@ SQLRETURN GetJDBCValues( SQLItemDesc_def *SQLItemDesc,
     		SQLItemDesc->signType      = TRUE;
    +		// Calculate the length based on YYYY/MM/DD HH:MM:SS.ffffff
    +        SQLItemDesc->maxLen = 20 + 6;
     		switch (SQLItemDesc->datetimeCode)
     		case SQLDTCODE_DATE:
     			SQLItemDesc->ODBCDataType = SQL_TYPE_DATE;
    +            // For DATE, update the maxLen since it only have YYYY/MM/DD
    +            SQLItemDesc->maxLen = 10;
     		case SQLDTCODE_TIME:
     			SQLItemDesc->ODBCDataType = SQL_TYPE_TIME;
    --- End diff --
    Maybe we need update all the maxLen for different datetime type. However I need write
some unit test case to make it work well for each datetime type.
      So, for this PR, I only update SQLDTCODE_DATE for this issue .
      If you think we need update all the maxLen, we can keep this PR here , I will take some
days to test it and update this PR later. 

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message