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

Commit a57a5df

Browse files
committed
rebase master
2 parents 733fa9b + d052644 commit a57a5df

File tree

128 files changed

+3996
-2553
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+3996
-2553
lines changed

src/binder/bind_node_visitor.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
#include "expression/expression_util.h"
1413
#include "binder/bind_node_visitor.h"
15-
#include "expression/star_expression.h"
1614
#include "catalog/catalog.h"
15+
#include "expression/expression_util.h"
16+
#include "expression/star_expression.h"
1717
#include "type/type_id.h"
1818

1919
#include "expression/aggregate_expression.h"
2020
#include "expression/case_expression.h"
2121
#include "expression/function_expression.h"
2222
#include "expression/operator_expression.h"
2323
#include "expression/star_expression.h"
24-
#include "expression/tuple_value_expression.h"
2524
#include "expression/subquery_expression.h"
25+
#include "expression/tuple_value_expression.h"
2626

2727
namespace peloton {
2828
namespace binder {
@@ -155,8 +155,8 @@ void BindNodeVisitor::Visit(parser::UpdateStatement *node) {
155155
void BindNodeVisitor::Visit(parser::DeleteStatement *node) {
156156
context_ = std::make_shared<BinderContext>(nullptr);
157157
node->TryBindDatabaseName(default_database_name_);
158-
context_->AddRegularTable(node->GetDatabaseName(), node->GetTableName(),
159-
node->GetTableName(), txn_);
158+
context_->AddRegularTable(node->GetDatabaseName(), node->GetSchemaName(),
159+
node->GetTableName(), node->GetTableName(), txn_);
160160

161161
if (node->expr != nullptr) {
162162
node->expr->Accept(this);
@@ -174,8 +174,8 @@ void BindNodeVisitor::Visit(parser::CreateStatement *node) {
174174
void BindNodeVisitor::Visit(parser::InsertStatement *node) {
175175
node->TryBindDatabaseName(default_database_name_);
176176
context_ = std::make_shared<BinderContext>(nullptr);
177-
context_->AddRegularTable(node->GetDatabaseName(), node->GetTableName(),
178-
node->GetTableName(), txn_);
177+
context_->AddRegularTable(node->GetDatabaseName(), node->GetSchemaName(),
178+
node->GetTableName(), node->GetTableName(), txn_);
179179
if (node->select != nullptr) {
180180
node->select->Accept(this);
181181
}

src/binder/binder_context.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
#include "catalog/column_catalog.h"
1717
#include "catalog/database_catalog.h"
1818
#include "catalog/table_catalog.h"
19-
#include "parser/table_ref.h"
2019
#include "expression/tuple_value_expression.h"
20+
#include "parser/table_ref.h"
2121
#include "storage/storage_manager.h"
2222

2323
namespace peloton {
@@ -28,17 +28,18 @@ void BinderContext::AddRegularTable(parser::TableRef *table_ref,
2828
concurrency::TransactionContext *txn) {
2929
table_ref->TryBindDatabaseName(default_database_name);
3030
auto table_alias = table_ref->GetTableAlias();
31-
AddRegularTable(table_ref->GetDatabaseName(), table_ref->GetTableName(),
32-
table_alias, txn);
31+
AddRegularTable(table_ref->GetDatabaseName(), table_ref->GetSchemaName(),
32+
table_ref->GetTableName(), table_alias, txn);
3333
}
3434

3535
void BinderContext::AddRegularTable(const std::string db_name,
36+
const std::string schema_name,
3637
const std::string table_name,
3738
const std::string table_alias,
3839
concurrency::TransactionContext *txn) {
3940
// using catalog object to retrieve meta-data
40-
auto table_object =
41-
catalog::Catalog::GetInstance()->GetTableObject(db_name, table_name, txn);
41+
auto table_object = catalog::Catalog::GetInstance()->GetTableObject(
42+
db_name, schema_name, table_name, txn);
4243

4344
if (regular_table_alias_map_.find(table_alias) !=
4445
regular_table_alias_map_.end() ||

0 commit comments

Comments
 (0)