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

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

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

    
https://github.com/apache/incubator-trafodion/pull/1310#discussion_r153831339
  
    --- Diff: core/conn/unixodbc/odbc/odbcclient/unixcli/cli/drvrglobal.cpp ---
    @@ -1092,6 +1092,106 @@ bool ctoi64(char* string, __int64& out, bool* 
truncation)
        free (buff);
        return true;
     }
    +unsigned __int64 _atoui64( const char *s )
    +{
    +   unsigned __int64 n = 0;
    +   char* t = (char*)s;
    +   char c;
    +
    +   while(*t != 0)
    +   {
    +           c = *t++;
    +           if (c < '0' || c > '9') continue;
    --- End diff --
    
    Does this mean the junk characters are tolerated when the string is 
converted to numeric column? If so, this can lead to unexpected behavior.


> ODBC data convert function split
> --------------------------------
>
>                 Key: TRAFODION-2816
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2816
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: client-odbc-linux, client-odbc-windows
>    Affects Versions: 2.3-incubating
>            Reporter: Weiqing Xu
>            Assignee: XuWeixin
>
> Now,  the data convert function in ODBC is very long , and very hard to 
> maintenance, we need to refactor it with some short function.
> 1. split one long function to little functions to make it more easy to 
> maintain.
> 2. support convert very long CHAR/VARCHAR to others struct like timestamp.
> 3. Don't modify SQLDataType for SQL_NUMERIC any more. Use FSDataType to 
> decide the real data format. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to