trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anoopsharma00 <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request #545: JIRA TRAFODION-2060 Add support for t...
Date Thu, 16 Jun 2016 17:45:40 GMT
Github user anoopsharma00 commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/545#discussion_r67391298
  
    --- Diff: core/sql/common/BaseTypes.cpp ---
    @@ -412,6 +419,13 @@ short convertTypeToText_basic(char * text,	   // OUTPUT
     	str_sprintf(text, "NUMERIC(%d, %d) UNSIGNED", precision, scale);
           break;
     
    +    case REC_BIN8_UNSIGNED:
    +      if (!precision)
    +        str_sprintf(text, "TINYINT UNSIGNED");
    +      else
    +	str_sprintf(text, "NUMERIC(%d, %d)", precision, scale);
    --- End diff --
    
    
    At current time, NUMERIC datatypes are handled as smallint, int or largeint.
    They are not converted to tinyint. That could be done at some point.
    So this code will not be reached.
    
    But review comment is correct about this code being incorrect and I have fixed it.
    If we do enhance NUMERIC with precision <= 2 to be treated as tinyint, then
    this code will be exercised. 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message