Github user paul-guo- commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/758#discussion_r68886608
  
    --- Diff: src/test/feature/lib/sql_util.cpp ---
    @@ -108,8 +111,24 @@ void SQLUtility::execSQLFile(const string &sqlFile,
       conn->setOutputFile(outFileAbsPath);
       EXPECT_EQ(0, conn->runSQLFile(newSqlFile).getLastStatus());
       conn->resetOutput();
    -  EXPECT_FALSE(conn->checkDiff(ansFileAbsPath, outFileAbsPath, true));
    -  if (conn->checkDiff(ansFileAbsPath, outFileAbsPath, true) == false) {
    +
    +  // initFile if any
    +  string initFileAbsPath;
    +  if (!initFile.empty()) {
    +    initFileAbsPath = testRootPath + "/" + initFile;
    +    if (!std::ifstream(initFileAbsPath))
    +      ASSERT_TRUE(false) << initFileAbsPath << " doesn't exist";
    +    fp = splitFilePath(initFileAbsPath);
    +    // double check to avoid empty fileBaseName
    +    if (fp.fileBaseName.empty())
    +      ASSERT_TRUE(false) << initFileAbsPath << " is invalid";
    +  } else {
    +    initFileAbsPath = "";
    +  }
    +
    +  bool is_sql_ans_diff = conn->checkDiff(ansFileAbsPath, outFileAbsPath, 
true, initFileAbsPath);
    +  EXPECT_FALSE(is_sql_ans_diff);
    +  if (is_sql_ans_diff == false) {
    --- End diff --
    
    I think we can remove the else part, right?
    
     } else {
        EXPECT_FALSE(true);
      }


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