Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit 15f5a36

Browse files
Tianyi Chenapavlo
authored andcommitted
formatting
1 parent c748d4d commit 15f5a36

File tree

4 files changed

+19
-21
lines changed

4 files changed

+19
-21
lines changed

src/common/init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ void PelotonInit::Initialize() {
8383
// initialize the catalog and add the default database, so we don't do this on
8484
// the first query
8585
pg_catalog->CreateDatabase(DEFAULT_DB_NAME, txn);
86-
86+
8787
txn_manager.CommitTransaction(txn);
8888

8989
// Initialize the Statement Cache Manager

src/include/executor/plan_executor.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ class PlanExecutor {
5555
* Before ExecutePlan, a node first receives value list, so we should
5656
* pass value list directly rather than passing Postgres's ParamListInfo
5757
*/
58-
static void ExecutePlan(std::shared_ptr<planner::AbstractPlan> plan,
59-
concurrency::TransactionContext *txn,
60-
const std::vector<type::Value> &params,
61-
const std::vector<int> &result_format,
62-
std::function<void(executor::ExecutionResult,
63-
std::vector<ResultValue> &&)>
64-
on_complete);
58+
static void ExecutePlan(
59+
std::shared_ptr<planner::AbstractPlan> plan,
60+
concurrency::TransactionContext *txn,
61+
const std::vector<type::Value> &params,
62+
const std::vector<int> &result_format,
63+
std::function<void(executor::ExecutionResult,
64+
std::vector<ResultValue> &&)> on_complete);
6565

6666
/*
6767
* @brief When a peloton node recvs a query plan, this function is invoked

src/traffic_cop/traffic_cop.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,7 @@ executor::ExecutionResult TrafficCop::ExecuteHelper(
204204
}
205205

206206
void TrafficCop::ExecuteStatementPlanGetResult() {
207-
if (p_status_.m_result == ResultType::FAILURE)
208-
return;
207+
if (p_status_.m_result == ResultType::FAILURE) return;
209208

210209
auto txn_result = GetCurrentTxnState().first->GetResult();
211210
if (single_statement_txn_ || txn_result == ResultType::FAILURE) {
@@ -363,8 +362,8 @@ void TrafficCop::ProcessInvalidStatement() {
363362
}
364363

365364
bool TrafficCop::BindParamsForCachePlan(
366-
const std::vector<std::unique_ptr<expression::AbstractExpression>>
367-
&parameters,
365+
const std::vector<std::unique_ptr<expression::AbstractExpression>> &
366+
parameters,
368367
const size_t thread_id UNUSED_ATTRIBUTE) {
369368
if (tcop_txn_state_.empty()) {
370369
single_statement_txn_ = true;

test/network/exception_test.cpp

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ class ExceptionTests : public PelotonTest {};
3535

3636
void *ExecutorExceptionTest(int port) {
3737
try {
38-
pqxx::connection C(
39-
StringUtil::Format("host=127.0.0.1 port=%d user=default_database "
40-
"sslmode=disable application_name=psql",
41-
port));
38+
pqxx::connection C(StringUtil::Format(
39+
"host=127.0.0.1 port=%d user=default_database "
40+
"sslmode=disable application_name=psql",
41+
port));
4242
int exception_count = 0, total = 2;
4343
pqxx::work txn1(C);
4444
try {
@@ -84,10 +84,10 @@ void *ExecutorExceptionTest(int port) {
8484
void *ParserExceptionTest(int port) {
8585
try {
8686
// forcing the factory to generate psql protocol handler
87-
pqxx::connection C(
88-
StringUtil::Format("host=127.0.0.1 port=%d user=default_database "
89-
"sslmode=disable application_name=psql",
90-
port));
87+
pqxx::connection C(StringUtil::Format(
88+
"host=127.0.0.1 port=%d user=default_database "
89+
"sslmode=disable application_name=psql",
90+
port));
9191

9292
peloton::network::ConnectionHandle *conn =
9393
peloton::network::ConnectionHandleFactory::GetInstance()
@@ -243,7 +243,6 @@ TEST_F(ExceptionTests, ExceptionTest) {
243243
ParserExceptionTest(port);
244244
ExecutorExceptionTest(port);
245245

246-
247246
server.Close();
248247
serverThread.join();
249248
LOG_INFO("Peloton is shutting down");

0 commit comments

Comments
 (0)