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

    https://github.com/apache/incubator-trafodion/pull/914#discussion_r96467313
  
    --- Diff: core/sql/executor/ExExeUtilLoad.cpp ---
    @@ -1417,29 +1416,45 @@ short ExExeUtilHBaseBulkLoadTcb::work()
                   
masterGlob->getStatement()->getContext()->setSqlParserFlags(0x20000);
                 }
               }
    +        ComDiagsArea *diagsArea = getDiagsArea();
     
             cliRC = cliInterface()->executeImmediate(loadQuery,
                 NULL,
                 NULL,
                 TRUE,
    -            &rowsAffected_);
    -          if (parserFlagSet)
    -            
masterGlob->getStatement()->getContext()->resetSqlParserFlags(0x20000);
    +            &rowsAffected_,
    +            FALSE,
    +            diagsArea);
     
    +        if (parserFlagSet)
    +            
masterGlob->getStatement()->getContext()->resetSqlParserFlags(0x20000);
             if (cliRC < 0)
             {
               rowsAffected_ = 0;
               cliInterface()->retrieveSQLDiagnostics(getDiagsArea());
               step_ = LOAD_END_ERROR_;
               break;
             }
    -        
    -        step_ = COMPLETE_BULK_LOAD_;
    +        else {
    +           step_ = COMPLETE_BULK_LOAD_;
    +           ComCondition *cond;
    +           Lng32 entryNumber;
    +           while ((cond = diagsArea->findCondition(EXE_ERROR_ROWS_FOUND, 
&entryNumber)) != NULL) {
    +              errorRowCount = cond->getOptionalInteger(0);
    +              diagsArea->deleteWarning(entryNumber);
    +           }
    +           // Need to clear the diags Area to get the correct rowsAffected 
for the LOAD COMPLETE command
    +           // Hence, we might lose any other warnings created at the time 
of loading like error during
    +           // logging error rows
    +           diagsArea->clear();
    +        }
             if (rowsAffected_ == 0)
               step_ = LOAD_END_;
     
    -        sprintf(statusMsgBuf_,"       Rows Processed: %ld 
%c",rowsAffected_, '\n' );
    +        sprintf(statusMsgBuf_,      "       Rows Processed: %ld 
%c",rowsAffected_+errorRowCount, '\n' );
    --- End diff --
    
    Rows Loaded displayed at the end of the command similar to Rows updated or 
Rows inserted as shown below
    
    Task:  COMPLETION      Status: Started    Time: 2017-01-17 15:53:06.951
    Task:  COMPLETION      Status: Ended      Time: 2017-01-17 15:53:06.262
    Task:  COMPLETION      Status: Ended      Elapsed Time:    00:00:00.253
    
    --- 20000 row(s) loaded.
    >>--
    
    It should be clear when the output is seen as a whole.  If the document has 
output shown, the document needs to be updated


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to