trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From selvaganesang <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request #496: [TRAFODION-762] support HIVE data typ...
Date Mon, 06 Jun 2016 18:31:30 GMT
Github user selvaganesang commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/496#discussion_r65943210
  
    --- Diff: core/sql/optimizer/NATable.cpp ---
    @@ -3553,6 +3560,60 @@ NAType* getSQColTypeForHive(const char* hiveType, NAMemory* heap)
       if ( !strcmp(hiveType, "timestamp"))
         return new (heap) SQLTimestamp(TRUE /* allow NULL */ , 6, heap);
     
    +  if ( !strcmp(hiveType, "date"))
    +    return new (heap) SQLDate(TRUE /* allow NULL */ , heap);
    +
    +  if ( !strncmp(hiveType, "varchar", 7) )
    +  {
    +    char maxLen[32];
    +    memset(maxLen, 0, 32);
    +    int i=0,j=0;
    +    int copyit = 0;
    +
    +    //get length
    +    for(i = 0; i < strlen(hiveType) ; i++)
    +    {
    --- End diff --
    
    @traflm you have missed out the change to optimize strlen. I am ok if you can take care
of it the next time It is not necessary to do another push commit just for this. 


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