This repository was archived by the owner on Sep 27, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +40
-7
lines changed Expand file tree Collapse file tree 4 files changed +40
-7
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ namespace parser {
20
20
/* *
21
21
* @struct AlterTableStatement
22
22
* @brief Represents "ALTER TABLE add column COLUMN_NAME COLUMN_TYPE"
23
+ * TODO: add implementation of AlterTableStatement
23
24
*/
24
25
class AlterTableStatement : public TableRefStatement {
25
26
public:
@@ -30,10 +31,6 @@ class AlterTableStatement : public TableRefStatement {
30
31
names(new std::vector<char *>) {}
31
32
32
33
virtual ~AlterTableStatement () {
33
- // if (columns != nullptr) {
34
- // for (auto col : *columns) delete col;
35
- // delete columns;
36
- // }
37
34
if (names != nullptr ) {
38
35
for (auto name : *names) delete name;
39
36
delete names;
Original file line number Diff line number Diff line change
1
+ // ===----------------------------------------------------------------------===//
1
2
//
2
- // Created by Nevermore on 01/04/2018.
3
+ // Peloton
3
4
//
5
+ // rename_function_statement.h
6
+ //
7
+ // Identification: src/include/parser/rename_function_statement.h
8
+ //
9
+ // Copyright (c) 2015-17, Carnegie Mellon University Database Group
10
+ //
11
+ // ===----------------------------------------------------------------------===//
4
12
5
13
#pragma once
6
14
9
17
10
18
namespace peloton {
11
19
namespace parser {
20
+ /* * @brief Rename statement
21
+ * The statement that used for transform from postgress statement
22
+ * to Peloton statement
23
+ */
12
24
class RenameFuncStatement : public TableRefStatement {
13
25
public:
14
26
enum class ObjectType { INVALID = 0 , COLUMN = 1 };
Original file line number Diff line number Diff line change
1
+ // ===----------------------------------------------------------------------===//
1
2
//
2
- // Created by Nevermore on 03/04/2018.
3
+ // Peloton
3
4
//
5
+ // alter_plan.h
6
+ //
7
+ // Identification: src/include/parser/alter_plan.h
8
+ //
9
+ // Copyright (c) 2015-17, Carnegie Mellon University Database Group
10
+ //
11
+ // ===----------------------------------------------------------------------===//
4
12
5
13
#pragma once
6
14
#include " planner/abstract_plan.h"
7
15
#include " parser/alter_statement.h"
8
16
namespace peloton {
9
17
10
18
namespace planner {
19
+ /* * @brief The plan used for altering
20
+ * TODO: adding support for add/drop column
21
+ */
11
22
class AlterPlan : public AbstractPlan {
12
23
public:
13
24
AlterPlan () = delete ;
Original file line number Diff line number Diff line change
1
+ // ===----------------------------------------------------------------------===//
1
2
//
2
- // Created by Nevermore on 03/04/2018.
3
+ // Peloton
3
4
//
5
+ // rename_plan.h
6
+ //
7
+ // Identification: src/include/parser/rename_plan.h
8
+ //
9
+ // Copyright (c) 2015-17, Carnegie Mellon University Database Group
10
+ //
11
+ // ===----------------------------------------------------------------------===//
4
12
5
13
#pragma once
6
14
7
15
#include " planner/abstract_plan.h"
8
16
#include " parser/rename_function_statement.h"
9
17
18
+ /* * @brief: The Plan used for rename
19
+ * The plan contains the necessary information for
20
+ * renaming, including old names, new names and
21
+ * which object and database
22
+ */
10
23
namespace peloton {
11
24
namespace planner {
12
25
class RenamePlan : public AbstractPlan {
You can’t perform that action at this time.
0 commit comments