Skip to content

Commit

Permalink
remove duplicate psp_okey
Browse files Browse the repository at this point in the history
  • Loading branch information
sc1f committed May 12, 2020
1 parent 39220c3 commit 9dd545e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
5 changes: 1 addition & 4 deletions cpp/perspective/src/cpp/data_table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,10 +413,7 @@ t_data_table::append(const t_data_table& other) {

std::set<std::string> incoming;

std::cout << "existing schema: " << m_schema << std::endl;
std::cout << "schema to append: " << other.m_schema << std::endl;

for (const auto& cname : m_schema.m_columns) {
for (const auto& cname : other.m_schema.m_columns) {
t_dtype col_dtype = get_column(cname)->get_dtype();
t_dtype other_col_dtype = other.get_const_column(cname)->get_dtype();
if (col_dtype != other_col_dtype) {
Expand Down
5 changes: 3 additions & 2 deletions cpp/perspective/src/cpp/emscripten.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,8 @@ namespace binding {

// Always use the `Table` column names and data types on up
if (table_initialized && is_update) {
auto schema = gnode->get_output_schema();
auto gnode_output_schema = gnode->get_output_schema();
auto schema = gnode_output_schema.drop({"psp_okey"});
column_names = schema.columns();
data_types = schema.types();

Expand Down Expand Up @@ -1099,7 +1100,7 @@ namespace binding {
}

// Updated data types need to reflect in new data table
auto new_schema = gnode->get_output_schema();
auto new_schema = gnode->get_output_schema().drop({"psp_okey"});
data_types = new_schema.types();
}
} else {
Expand Down
5 changes: 3 additions & 2 deletions python/perspective/perspective/src/table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ std::shared_ptr<Table> make_table_py(t_val table, t_data_accessor accessor,

// Always use the `Table` column names and data types on update.
if (table_initialized && is_update) {
auto schema = gnode->get_output_schema();
auto gnode_output_schema = gnode->get_output_schema();
auto schema = gnode_output_schema.drop({"psp_okey"});
column_names = schema.columns();
data_types = schema.types();

Expand Down Expand Up @@ -97,7 +98,7 @@ std::shared_ptr<Table> make_table_py(t_val table, t_data_accessor accessor,
}
}
// Make sure promoted types are used to construct data table
auto new_schema = gnode->get_output_schema();
auto new_schema = gnode->get_output_schema().drop({"psp_okey"});
data_types = new_schema.types();
} else {
column_names = arrow_loader.names();
Expand Down

0 comments on commit 9dd545e

Please sign in to comment.