Skip to content

Commit

Permalink
Rename Table to ClientTable and move to different namespace, in order…
Browse files Browse the repository at this point in the history
… to reduce terminology confusion. (#4028)

* Rename Table to ClientTable and move to different namespace, in order to
reduce terminology confusion.

* do not want
  • Loading branch information
kosak authored Jun 20, 2023
1 parent 85e7708 commit 9a649b6
Show file tree
Hide file tree
Showing 18 changed files with 86 additions and 86 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "deephaven/client/server/server.h"
#include "deephaven/client/subscription/subscription_handle.h"
#include "deephaven/client/utility/executor.h"
#include "deephaven/dhcore/table/schema.h"
#include "deephaven/dhcore/clienttable/schema.h"
#include "deephaven/dhcore/ticking/ticking.h"
#include "deephaven/dhcore/types.h"
#include "deephaven/dhcore/utility/callbacks.h"
Expand Down Expand Up @@ -87,7 +87,7 @@ class ExportedTableCreationCallback final
};

class LazyState final {
typedef deephaven::dhcore::table::Schema Schema;
typedef deephaven::dhcore::clienttable::Schema Schema;
typedef io::deephaven::proto::backplane::grpc::ExportedTableCreationResponse ExportedTableCreationResponse;
typedef io::deephaven::proto::backplane::grpc::Ticket Ticket;
typedef deephaven::client::server::Server Server;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
#include <memory>
#include "deephaven/client/server/server.h"
#include "deephaven/client/subscription/subscription_handle.h"
#include "deephaven/dhcore/clienttable/client_table.h"
#include "deephaven/dhcore/ticking/ticking.h"
#include "deephaven/proto/ticket.pb.h"

namespace deephaven::client::subscription {
class SubscriptionThread {
typedef deephaven::client::server::Server Server;
typedef deephaven::client::utility::Executor Executor;
typedef deephaven::dhcore::table::Schema Schema;
typedef deephaven::dhcore::clienttable::Schema Schema;
typedef io::deephaven::proto::backplane::grpc::Ticket Ticket;
typedef deephaven::dhcore::ticking::TickingCallback TickingCallback;

Expand Down
6 changes: 3 additions & 3 deletions cpp-client/deephaven/client/src/impl/table_handle_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
#include "deephaven/client/subscription/subscription_handle.h"
#include "deephaven/client/utility/arrow_util.h"
#include "deephaven/dhcore/chunk/chunk_maker.h"
#include "deephaven/dhcore/clienttable/client_table.h"
#include "deephaven/dhcore/container/row_sequence.h"
#include "deephaven/dhcore/table/table.h"
#include "deephaven/dhcore/ticking/ticking.h"
#include "deephaven/dhcore/utility/callbacks.h"
#include "deephaven/dhcore/utility/utility.h"
Expand Down Expand Up @@ -54,8 +54,8 @@ using deephaven::dhcore::container::RowSequence;
using deephaven::dhcore::container::RowSequenceBuilder;
using deephaven::dhcore::container::RowSequenceIterator;
using deephaven::dhcore::ElementTypeId;
using deephaven::dhcore::table::Schema;
using deephaven::dhcore::table::Table;
using deephaven::dhcore::clienttable::Schema;
using deephaven::dhcore::clienttable::ClientTable;
using deephaven::dhcore::ticking::TickingCallback;
using deephaven::dhcore::ticking::TickingUpdate;
using deephaven::dhcore::utility::Callback;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

using deephaven::dhcore::column::ColumnSource;
using deephaven::dhcore::chunk::AnyChunk;
using deephaven::dhcore::table::Schema;
using deephaven::dhcore::clienttable::Schema;
using deephaven::dhcore::ticking::BarrageProcessor;
using deephaven::dhcore::ticking::TickingCallback;
using deephaven::dhcore::utility::Callback;
Expand Down
8 changes: 4 additions & 4 deletions cpp-client/deephaven/dhcore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ set(ALL_FILES
src/types.cc
src/chunk/chunk.cc
src/chunk/chunk_maker.cc
src/clienttable/schema.cc
src/clienttable/client_table.cc
src/column/array_column_source.cc
src/column/column_source.cc
src/column/column_source_helpers.cc
src/column/column_source_utils.cc
src/container/row_sequence.cc
src/immerutil/abstract_flex_vector.cc
src/immerutil/immer_column_source.cc
src/table/schema.cc
src/table/table.cc
src/ticking/barrage_processor.cc
src/ticking/immer_table_state.cc
src/ticking/index_decoder.cc
Expand All @@ -40,14 +40,14 @@ set(ALL_FILES
include/public/deephaven/dhcore/chunk/chunk.h
include/public/deephaven/dhcore/chunk/chunk_maker.h
include/public/deephaven/dhcore/chunk/chunk_traits.h
include/public/deephaven/dhcore/clienttable/schema.h
include/public/deephaven/dhcore/clienttable/client_table.h
include/public/deephaven/dhcore/column/array_column_source.h
include/public/deephaven/dhcore/column/buffer_column_source.h
include/public/deephaven/dhcore/column/column_source.h
include/public/deephaven/dhcore/column/column_source_helpers.h
include/public/deephaven/dhcore/column/column_source_utils.h
include/public/deephaven/dhcore/container/row_sequence.h
include/public/deephaven/dhcore/table/schema.h
include/public/deephaven/dhcore/table/table.h
include/public/deephaven/dhcore/ticking/barrage_processor.h
include/public/deephaven/dhcore/ticking/ticking.h
include/public/deephaven/dhcore/utility/callbacks.h
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "deephaven/dhcore/column/column_source.h"
#include "deephaven/dhcore/container/row_sequence.h"
#include "deephaven/dhcore/immerutil/abstract_flex_vector.h"
#include "deephaven/dhcore/table/table.h"
#include "deephaven/dhcore/clienttable/client_table.h"
#include "deephaven/dhcore/ticking/space_mapper.h"

namespace deephaven::dhcore::ticking {
Expand All @@ -17,8 +17,8 @@ class ImmerTableState final {
typedef deephaven::dhcore::column::ColumnSource ColumnSource;
typedef deephaven::dhcore::container::RowSequence RowSequence;
typedef deephaven::dhcore::immerutil::AbstractFlexVectorBase AbstractFlexVectorBase;
typedef deephaven::dhcore::table::Schema Schema;
typedef deephaven::dhcore::table::Table Table;
typedef deephaven::dhcore::clienttable::ClientTable ClientTable;
typedef deephaven::dhcore::clienttable::Schema Schema;

public:
explicit ImmerTableState(std::shared_ptr<Schema> schema);
Expand Down Expand Up @@ -55,7 +55,7 @@ class ImmerTableState final {
void applyShifts(const RowSequence &startIndex, const RowSequence &endIndex,
const RowSequence &destIndex);

std::shared_ptr<Table> snapshot() const;
std::shared_ptr<ClientTable> snapshot() const;

private:
std::shared_ptr<Schema> schema_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@
#include "deephaven/dhcore/column/column_source.h"
#include "deephaven/dhcore/container/row_sequence.h"

namespace deephaven::dhcore::table {
namespace deephaven::dhcore::clienttable {
/**
* Declaration provided in deephaven/dhcore/schema/schema.h
*/
class Schema;
/**
* Forward declaration (provided below).
*/
class Table;
class ClientTable;

namespace internal {
class TableStreamAdaptor {
typedef deephaven::dhcore::container::RowSequence RowSequence;
public:
TableStreamAdaptor(const Table &table,
TableStreamAdaptor(const ClientTable &table,
std::vector<std::shared_ptr<RowSequence>> rowSequences, bool wantHeaders, bool wantRowNumbers,
bool highlightCells) : table_(table), rowSequences_(std::move(rowSequences)),
wantHeaders_(wantHeaders), wantRowNumbers_(wantRowNumbers), highlightCells_(highlightCells) {}
Expand All @@ -33,7 +33,7 @@ class TableStreamAdaptor {
~TableStreamAdaptor() = default;

private:
const Table &table_;
const ClientTable &table_;
std::vector<std::shared_ptr<RowSequence>> rowSequences_;
bool wantHeaders_ = false;
bool wantRowNumbers_ = false;
Expand All @@ -47,7 +47,7 @@ class TableStreamAdaptor {
* An abstract base class representing a Deephaven table. This is used for example in
* TickingUpdate to provide table snapshots to a caller who has subscribed to ticking tables.
*/
class Table {
class ClientTable {
public:
/**
* Alias.
Expand All @@ -61,24 +61,24 @@ class Table {
/**
* Constructor.
*/
Table() = default;
ClientTable() = default;
/**
* Destructor.
*/
virtual ~Table() = default;
virtual ~ClientTable() = default;

/**
* Get the RowSequence (in position space) that underlies this Table.
*/
virtual std::shared_ptr<RowSequence> getRowSequence() const = 0;
/**
* Gets a ColumnSource from the table by index.
* Gets a ColumnSource from the clienttable by index.
* @param columnIndex Must be in the half-open interval [0, numColumns).
*/
virtual std::shared_ptr<ColumnSource> getColumn(size_t columnIndex) const = 0;

/**
* Gets a ColumnSource from the table by name. 'strict' controls whether the method
* Gets a ColumnSource from the clienttable by name. 'strict' controls whether the method
* must succeed.
* @param name The name of the column.
* @param strict Whether the method must succeed.
Expand All @@ -87,7 +87,7 @@ class Table {
*/
std::shared_ptr<ColumnSource> getColumn(std::string_view name, bool strict) const;
/**
* Gets the index of a ColumnSource from the table by name. 'strict' controls whether the method
* Gets the index of a ColumnSource from the clienttable by name. 'strict' controls whether the method
* must succeed.
* @param name The name of the column.
* @param strict Whether the method must succeed.
Expand All @@ -98,33 +98,33 @@ class Table {
std::optional<size_t> getColumnIndex(std::string_view name, bool strict) const;

/**
* Number of rows in the table.
* Number of rows in the clienttable.
*/
virtual size_t numRows() const = 0;
/**
* Number of columns in the table.
* Number of columns in the clienttable.
*/
virtual size_t numColumns() const = 0;
/**
* The table schema.
* The clienttable schema.
*/
virtual std::shared_ptr<Schema> schema() const = 0;

/**
* Creates an 'ostream adaptor' to use when printing the table. Example usage:
* Creates an 'ostream adaptor' to use when printing the clienttable. Example usage:
* std::cout << myTable.stream(true, false).
*/
internal::TableStreamAdaptor stream(bool wantHeaders, bool wantRowNumbers) const;

/**
* Creates an 'ostream adaptor' to use when printing the table. Example usage:
* Creates an 'ostream adaptor' to use when printing the clienttable. Example usage:
* std::cout << myTable.stream(true, false, rowSeq).
*/
internal::TableStreamAdaptor stream(bool wantHeaders, bool wantRowNumbers,
std::shared_ptr<RowSequence> rowSequence) const;

/**
* Creates an 'ostream adaptor' to use when printing the table. Example usage:
* Creates an 'ostream adaptor' to use when printing the clienttable. Example usage:
* std::cout << myTable.stream(true, false, rowSequences).
*/
internal::TableStreamAdaptor stream(bool wantHeaders, bool wantRowNumbers,
Expand All @@ -147,4 +147,4 @@ class Table {
std::string toString(bool wantHeaders, bool wantRowNumbers,
std::vector<std::shared_ptr<RowSequence>> rowSequences) const;
};
} // namespace deephaven::dhcore::table
} // namespace deephaven::dhcore::clienttable
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
#include "deephaven/dhcore/column/column_source.h"
#include "deephaven/dhcore/container/row_sequence.h"

namespace deephaven::dhcore::table {
namespace deephaven::dhcore::clienttable {
/**
* The table schema that goes along with a Table class. This Schema object tells you about
* the names and data types of the table columns.
* The clienttable schema that goes along with a Table class. This Schema object tells you about
* the names and data types of the clienttable columns.
*/
class Schema {
struct Private {};
Expand Down Expand Up @@ -54,4 +54,4 @@ class Schema {
std::vector<ElementTypeId::Enum> types_;
std::map<std::string_view, size_t, std::less<>> index_;
};
} // namespace deephaven::dhcore::table
} // namespace deephaven::dhcore::clienttable
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <optional>
#include <vector>
#include "deephaven/dhcore/chunk/chunk.h"
#include "deephaven/dhcore/table/schema.h"
#include "deephaven/dhcore/clienttable/schema.h"
#include "deephaven/dhcore/ticking/ticking.h"

namespace deephaven::dhcore::ticking {
Expand All @@ -18,7 +18,7 @@ class BarrageProcessorImpl;

class BarrageProcessor final {
protected:
typedef deephaven::dhcore::table::Schema Schema;
typedef deephaven::dhcore::clienttable::Schema Schema;
typedef deephaven::dhcore::column::ColumnSource ColumnSource;

public:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <set>
#include "deephaven/dhcore/utility/callbacks.h"
#include "deephaven/dhcore/container/row_sequence.h"
#include "deephaven/dhcore/table/table.h"
#include "deephaven/dhcore/clienttable/client_table.h"

namespace deephaven::dhcore::ticking {
class TickingUpdate;
Expand Down Expand Up @@ -71,7 +71,7 @@ class TickingUpdate final {
/**
* Alias.
*/
typedef deephaven::dhcore::table::Table Table;
typedef deephaven::dhcore::clienttable::ClientTable Table;

/**
* Default constructor.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

#include <string>
#include <vector>
#include "deephaven/dhcore/table/table.h"
#include "deephaven/dhcore/types.h"
#include "deephaven/dhcore/column/buffer_column_source.h"

Expand Down
Loading

0 comments on commit 9a649b6

Please sign in to comment.