From 9dd545e35dc58d415cd2fe160c4dd4084815122d Mon Sep 17 00:00:00 2001 From: Jun Tan Date: Mon, 11 May 2020 22:45:14 -0400 Subject: [PATCH] remove duplicate psp_okey --- cpp/perspective/src/cpp/data_table.cpp | 5 +---- cpp/perspective/src/cpp/emscripten.cpp | 5 +++-- python/perspective/perspective/src/table.cpp | 5 +++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/cpp/perspective/src/cpp/data_table.cpp b/cpp/perspective/src/cpp/data_table.cpp index 8ce56d0a7e..87b60cd9a3 100644 --- a/cpp/perspective/src/cpp/data_table.cpp +++ b/cpp/perspective/src/cpp/data_table.cpp @@ -413,10 +413,7 @@ t_data_table::append(const t_data_table& other) { std::set 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) { diff --git a/cpp/perspective/src/cpp/emscripten.cpp b/cpp/perspective/src/cpp/emscripten.cpp index 757ff6abe0..cb71bfea20 100644 --- a/cpp/perspective/src/cpp/emscripten.cpp +++ b/cpp/perspective/src/cpp/emscripten.cpp @@ -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(); @@ -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 { diff --git a/python/perspective/perspective/src/table.cpp b/python/perspective/perspective/src/table.cpp index b7af7f5153..c9c56af397 100644 --- a/python/perspective/perspective/src/table.cpp +++ b/python/perspective/perspective/src/table.cpp @@ -62,7 +62,8 @@ std::shared_ptr 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(); @@ -97,7 +98,7 @@ std::shared_ptr
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();