trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anoopsharma00 <>
Subject [GitHub] incubator-trafodion pull request #552: JIRA TRAFODION-2072 plus few more
Date Tue, 21 Jun 2016 17:51:55 GMT
Github user anoopsharma00 commented on a diff in the pull request:
    --- Diff: core/sql/common/NAType.cpp ---
    @@ -670,6 +671,84 @@ short NAType::convertTypeToText(char * text,	   // OUTPUT
    +short NAType::getMyTypeAsHiveText(NAString * outputStr)  // output
    +  Lng32		      fs_datatype		= getFSDatatype();
    +  switch (fs_datatype)
    +    {
    +    case REC_MIN_F_CHAR_H ... REC_MAX_F_CHAR_H:
    +      *outputStr = "string";
    +      break;
    +    case REC_MIN_V_CHAR_H ... REC_MAX_V_CHAR_H:
    +      {
    +        SQLVarChar * ct = (SQLVarChar*)this;
    +        if (ct->wasHiveString())
    +          *outputStr = "string";
    --- End diff --
    yes, that is correct.
    Both hive string and varchar datatypes are represented as traf varchar datatypes.
    hive varchar has predefined length. hive string length is determined by a session cqd.
    The 'wasHiveString' field tells whether it was originally a string datatype. This is
    used during showddl command to show the original datatype.
    At a later poing, It will also be used to limit the length of data that can be put into
a hive column.
    For hive varchar, it will be limited by the pre-specified length. For hive string, it
    be limited by the hive length cqd that is set for that session.

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