trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DaveBirdsall <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request: JIRA TRAFODION-1873
Date Tue, 08 Mar 2016 23:30:46 GMT
Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/371#discussion_r55447961
  
    --- Diff: core/sql/exp/exp_datetime.h ---
    @@ -323,11 +319,81 @@ static
       NA_EIDPROC virtual short getClassSize() { return (short)sizeof(*this); }
       // ---------------------------------------------------------------------
     
    +  static const char * getDatetimeFormatStr(Lng32 frmt)
    +  {
    +    return datetimeFormat[frmt].str;
    +  }
    +
    +  static const Lng32 getDatetimeFormat(const char * formatStr)
    +  {
    +    for (Lng32 i = DATETIME_FORMAT_MIN; i <= DATETIME_FORMAT_MAX; i++)
    +      {
    +        if (strcmp(formatStr, datetimeFormat[i].str) == 0)
    +          {
    +            if (datetimeFormat[i].format != i)
    +              return -1;
    --- End diff --
    
    I take it this is a guard against ExpDatetime::datetimeFormat being screwed up?


---
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