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

Commit b08fa9e

Browse files
committed
added headers, comments and TODO
1 parent 6b5da72 commit b08fa9e

File tree

4 files changed

+40
-7
lines changed

4 files changed

+40
-7
lines changed

src/include/parser/alter_statement.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ namespace parser {
2020
/**
2121
* @struct AlterTableStatement
2222
* @brief Represents "ALTER TABLE add column COLUMN_NAME COLUMN_TYPE"
23+
* TODO: add implementation of AlterTableStatement
2324
*/
2425
class AlterTableStatement : public TableRefStatement {
2526
public:
@@ -30,10 +31,6 @@ class AlterTableStatement : public TableRefStatement {
3031
names(new std::vector<char *>) {}
3132

3233
virtual ~AlterTableStatement() {
33-
// if (columns != nullptr) {
34-
// for (auto col : *columns) delete col;
35-
// delete columns;
36-
// }
3734
if (names != nullptr) {
3835
for (auto name : *names) delete name;
3936
delete names;

src/include/parser/rename_function_statement.h

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1+
//===----------------------------------------------------------------------===//
12
//
2-
// Created by Nevermore on 01/04/2018.
3+
// Peloton
34
//
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+
//===----------------------------------------------------------------------===//
412

513
#pragma once
614

@@ -9,6 +17,10 @@
917

1018
namespace peloton {
1119
namespace parser {
20+
/** @brief Rename statement
21+
* The statement that used for transform from postgress statement
22+
* to Peloton statement
23+
*/
1224
class RenameFuncStatement : public TableRefStatement {
1325
public:
1426
enum class ObjectType { INVALID = 0, COLUMN = 1 };

src/include/planner/alter_plan.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,24 @@
1+
//===----------------------------------------------------------------------===//
12
//
2-
// Created by Nevermore on 03/04/2018.
3+
// Peloton
34
//
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+
//===----------------------------------------------------------------------===//
412

513
#pragma once
614
#include "planner/abstract_plan.h"
715
#include "parser/alter_statement.h"
816
namespace peloton {
917

1018
namespace planner {
19+
/** @brief The plan used for altering
20+
* TODO: adding support for add/drop column
21+
*/
1122
class AlterPlan : public AbstractPlan {
1223
public:
1324
AlterPlan() = delete;

src/include/planner/rename_plan.h

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,25 @@
1+
//===----------------------------------------------------------------------===//
12
//
2-
// Created by Nevermore on 03/04/2018.
3+
// Peloton
34
//
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+
//===----------------------------------------------------------------------===//
412

513
#pragma once
614

715
#include "planner/abstract_plan.h"
816
#include "parser/rename_function_statement.h"
917

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+
*/
1023
namespace peloton {
1124
namespace planner {
1225
class RenamePlan : public AbstractPlan {

0 commit comments

Comments
 (0)