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

    
https://github.com/apache/incubator-trafodion/pull/1055#discussion_r110909382
  
    --- Diff: core/sql/executor/ExHdfsScan.cpp ---
    @@ -1653,7 +1653,7 @@ char * 
ExHdfsScanTcb::extractAndTransformAsciiSourceToSqlRow(int &err,
                       // for non-varchar, length of zero indicates a null 
value.
                       // For all datatypes, HIVE_DEFAULT_NULL_STRING('\N') 
indicates a null value.
                       if (((len == 0) && (tgtAttr && (NOT 
DFS2REC::isSQLVarChar(tgtAttr->getDatatype())))) ||
    -                      ((len > 0) && (memcmp(sourceData, 
HIVE_DEFAULT_NULL_STRING, len) == 0)))
    +                      ((len == strlen(HIVE_DEFAULT_NULL_STRING)) && 
(memcmp(sourceData, HIVE_DEFAULT_NULL_STRING, len) == 0)))
    --- End diff --
    
    I am not sure if the c++ compiler would optimize this. You could improve 
this further by getting the strlen only once in the TCB


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

Reply via email to