<commit_before>//===----------------------------------------------------------------------===//
//
//                         PelotonDB
//
// create_plan.h
//
// Identification: /peloton/src/include/planner/create_plan.h
//
// Copyright (c) 2015, Carnegie Mellon University Database Group
//
//===----------------------------------------------------------------------===//

#pragma once

#include "planner/abstract_plan.h"

namespace peloton {

namespace storage{
class DataTable;
}

namespace planner {
class CreatePlan : public AbstractPlan {
 public:

  CreatePlan() = delete;
  CreatePlan(const CreatePlan &) = delete;
  CreatePlan &operator=(const CreatePlan &) = delete;
  CreatePlan(CreatePlan &&) = delete;
  CreatePlan &operator=(CreatePlan &&) = delete;

  explicit CreatePlan(storage::DataTable *table) {
	  target_table_ = table;
	  table_schema = nullptr;
  }

  explicit CreatePlan(std::string name, std::unique_ptr<catalog::Schema> schema) {
    table_name = name;
    table_schema = schema.release();
  }

  explicit CreatePlan(parser::CreateParse *parse_tree) : table_name(parse_tree->GetTableName()),
  table_schema(new catalog::Schema(parse_tree->GetColumns())) {}

  inline PlanNodeType GetPlanNodeType() const {
    return PLAN_NODE_TYPE_CREATE;
  }

  const std::string GetInfo() const {
    return "Create Plan";
  }

  std::unique_ptr<AbstractPlan> Copy() const {
    return std::unique_ptr<AbstractPlan>(new CreatePlan(target_table_));
  }

  std::string GetTableName() const { return table_name; }

  catalog::Schema* GetSchema() const {<commit_msg>Added Header<commit_after>//===----------------------------------------------------------------------===//
//
//                         PelotonDB
//
// create_plan.h
//
// Identification: /peloton/src/include/planner/create_plan.h
//
// Copyright (c) 2015, Carnegie Mellon University Database Group
//
//===----------------------------------------------------------------------===//

#pragma once

#include "planner/abstract_plan.h"

#include "storage/data_table.h"
#include "parser/peloton/drop_parse.h"

namespace peloton {

namespace storage{
class DataTable;
}

namespace planner {
class CreatePlan : public AbstractPlan {
 public:

  CreatePlan() = delete;
  CreatePlan(const CreatePlan &) = delete;
  CreatePlan &operator=(const CreatePlan &) = delete;
  CreatePlan(CreatePlan &&) = delete;
  CreatePlan &operator=(CreatePlan &&) = delete;

  explicit CreatePlan(storage::DataTable *table) {
	  target_table_ = table;
	  table_schema = nullptr;
  }

  explicit CreatePlan(std::string name, std::unique_ptr<catalog::Schema> schema) {
    table_name = name;
    table_schema = schema.release();
  }

  explicit CreatePlan(parser::CreateParse *parse_tree) : table_name(parse_tree->GetTableName()),
      table_schema(new catalog::Schema(parse_tree->GetColumns())) {}

  inline PlanNodeType GetPlanNodeType() const {
    return PLAN_NODE_TYPE_CREATE;
  }

  const std::string GetInfo() const {
    return "Create Plan";
  }

  std::unique_ptr<AbstractPlan> Copy() const {
    return std::unique_ptr<AbstractPlan>(new CreatePlan(target_table_));
  }

  std::string GetTableName() const { return table_name; }

  catalog::Schema* GetSchema() const {
{'fraction_non_alphanumeric': 0.2117829457364341, 'fraction_numerical': 0.00248062015503876, 'mean_word_length': 2.8042452830188678, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5811199', 'n_tokens_mistral': 940, 'n_tokens_neox': 905, 'n_words': 191}