Skip to content

Commit

Permalink
checkLogicalPlan parameter adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
rfdavid committed May 26, 2023
1 parent 19368de commit f2750c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/include/test_runner/test_runner.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class TestRunner {
static bool checkLogicalPlans(std::unique_ptr<main::PreparedStatement>& preparedStatement,
TestStatement* statement, main::Connection& conn);
static bool checkLogicalPlan(std::unique_ptr<main::PreparedStatement>& preparedStatement,
TestStatement* statement, uint32_t planIdx, main::Connection& conn);
TestStatement* statement, main::Connection& conn, uint32_t planIdx);
static std::vector<std::string> convertResultToString(
main::QueryResult& queryResult, bool checkOutputOrder = false);
static bool checkPlanResult(std::unique_ptr<main::QueryResult>& result,
Expand Down
6 changes: 3 additions & 3 deletions test/test_runner/test_runner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@ bool TestRunner::checkLogicalPlans(std::unique_ptr<PreparedStatement>& preparedS
auto numPlans = preparedStatement->logicalPlans.size();
auto numPassedPlans = 0u;
if (numPlans == 0) {
return checkLogicalPlan(preparedStatement, statement, 0, conn);
return checkLogicalPlan(preparedStatement, statement, conn, 0);
}
for (auto i = 0u; i < numPlans; ++i) {
if (checkLogicalPlan(preparedStatement, statement, i, conn)) {
if (checkLogicalPlan(preparedStatement, statement, conn, i)) {
numPassedPlans++;
}
}
return numPassedPlans == numPlans;
}

bool TestRunner::checkLogicalPlan(std::unique_ptr<PreparedStatement>& preparedStatement,
TestStatement* statement, uint32_t planIdx, Connection& conn) {
TestStatement* statement, Connection& conn, uint32_t planIdx) {
auto result = conn.executeAndAutoCommitIfNecessaryNoLock(preparedStatement.get(), planIdx);
if (statement->expectedError) {
if (statement->errorMessage == StringUtils::rtrim(result->getErrorMessage())) {
Expand Down

0 comments on commit f2750c7

Please sign in to comment.