This repository was archived by the owner on Sep 27, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +16
-17
lines changed Expand file tree Collapse file tree 5 files changed +16
-17
lines changed Original file line number Diff line number Diff line change 33
33
namespace peloton {
34
34
35
35
namespace parser {
36
- class ExplainStatement ;
36
+ class ExplainStatement ;
37
37
}
38
38
39
39
namespace network {
@@ -167,7 +167,8 @@ class PostgresProtocolHandler : public ProtocolHandler {
167
167
ProcessResult ExecQueryMessage (InputPacket *pkt, const size_t thread_id);
168
168
169
169
/* Execute a EXPLAIN query message */
170
- ResultType ExecQueryExplain (const std::string& query, parser::ExplainStatement* explain_stmt);
170
+ ResultType ExecQueryExplain (const std::string &query,
171
+ parser::ExplainStatement *explain_stmt);
171
172
172
173
/* Process the PARSE message of the extended query protocol */
173
174
void ExecParseMessage (InputPacket *pkt);
Original file line number Diff line number Diff line change 6
6
//
7
7
// Identification: src/include/parser/explain_statement.h
8
8
//
9
- // Copyright (c) 2018, Carnegie Mellon University Database Group
9
+ // Copyright (c) 2015- 2018, Carnegie Mellon University Database Group
10
10
//
11
11
// ===----------------------------------------------------------------------===//
12
12
@@ -26,11 +26,10 @@ namespace parser {
26
26
*/
27
27
class ExplainStatement : public SQLStatement {
28
28
public:
29
- ExplainStatement ()
30
- : SQLStatement(StatementType::EXPLAIN) {}
29
+ ExplainStatement () : SQLStatement(StatementType::EXPLAIN) {}
31
30
virtual ~ExplainStatement () {}
32
31
33
- virtual void Accept (UNUSED_ATTRIBUTE SqlNodeVisitor* v) override { }
32
+ virtual void Accept (UNUSED_ATTRIBUTE SqlNodeVisitor * v) override {}
34
33
35
34
std::unique_ptr<parser::SQLStatement> real_sql_stmt;
36
35
};
Original file line number Diff line number Diff line change @@ -326,19 +326,17 @@ typedef struct SelectStmt {
326
326
/* Eventually add fields for CORRESPONDING spec here */
327
327
} SelectStmt;
328
328
329
- /* ----------------------
330
- * Explain Statement
329
+ /*
330
+ * Explain Statement
331
331
*
332
332
* The "query" field is initially a raw parse tree, and is converted to a
333
333
* Query node during parse analysis. Note that rewriting and planning
334
334
* of the query are always postponed until execution.
335
- * ----------------------
336
335
*/
337
- typedef struct ExplainStmt
338
- {
339
- NodeTag type;
340
- Node *query; /* the query (see comments above) */
341
- List *options; /* list of DefElem nodes */
336
+ typedef struct ExplainStmt {
337
+ NodeTag type;
338
+ Node *query; /* the query (see comments above) */
339
+ List *options; /* list of DefElem nodes */
342
340
} ExplainStmt;
343
341
344
342
typedef struct TypeName {
Original file line number Diff line number Diff line change @@ -224,7 +224,8 @@ ProcessResult PostgresProtocolHandler::ExecQueryMessage(
224
224
return ProcessResult::COMPLETE;
225
225
};
226
226
case QueryType::QUERY_EXPLAIN: {
227
- auto status = ExecQueryExplain (query, static_cast <parser::ExplainStatement*>(sql_stmt.get ()));
227
+ auto status = ExecQueryExplain (
228
+ query, static_cast <parser::ExplainStatement *>(sql_stmt.get ()));
228
229
ExecQueryMessageGetResult (status);
229
230
return ProcessResult::COMPLETE;
230
231
}
@@ -258,7 +259,7 @@ ProcessResult PostgresProtocolHandler::ExecQueryMessage(
258
259
}
259
260
260
261
ResultType PostgresProtocolHandler::ExecQueryExplain (
261
- const std::string &query, parser::ExplainStatement* explain_stmt) {
262
+ const std::string &query, parser::ExplainStatement * explain_stmt) {
262
263
PL_ASSERT (explain_stmt != nullptr );
263
264
264
265
std::string error_message;
Original file line number Diff line number Diff line change @@ -1794,7 +1794,7 @@ parser::SQLStatement *PostgresParser::NodeTransform(Node *stmt) {
1794
1794
result = VariableSetTransform ((VariableSetStmt*)stmt);
1795
1795
break ;
1796
1796
case T_ExplainStmt:
1797
- result = ExplainTransform (reinterpret_cast <ExplainStmt*>(stmt));
1797
+ result = ExplainTransform (reinterpret_cast <ExplainStmt *>(stmt));
1798
1798
break ;
1799
1799
default : {
1800
1800
throw NotImplementedException (StringUtil::Format (
You can’t perform that action at this time.
0 commit comments