diff --git a/src/export/clickhouse_exporter.cc b/src/export/clickhouse_exporter.cc index cbdb04b..23fe1c6 100644 --- a/src/export/clickhouse_exporter.cc +++ b/src/export/clickhouse_exporter.cc @@ -176,9 +176,6 @@ class ClickHouseExporter : public StatsExporter { shared_ptr> MetricUInt64(string_view name) final { return MakeCol>(name, "UInt64"); } - shared_ptr> MetricFixedString(int len, string_view name) final { - return MakeCol(name, len); - } shared_ptr> RecordInt16(string_view name) final { return MakeCol>(name, "Int16"); @@ -264,34 +261,6 @@ class ClickHouseExporter : public StatsExporter { std::vector offsets_; }; - class FixedStringCol : public Column { - public: - FixedStringCol(ClickHouseExporter* exp, string_view name, int n) - : exp_(exp), - name_(name), - width_(static_cast(n)), - type_name_("FixedString(" + std::to_string(n) + ")") {} - void Append(const string_view& s) final { - const size_t start = data_.size(); - data_.resize(start + width_, '\0'); - std::memcpy(data_.data() + start, s.data(), std::min(s.size(), width_)); - ++rows_; - } - void Crunch() final { exp_->AppendFixed(name_, type_name_.c_str(), data_.data(), rows_); } - void Clear() final { - data_.clear(); - rows_ = 0; - } - - private: - ClickHouseExporter* const exp_; - const std::string name_; - const size_t width_; - const std::string type_name_; - std::vector data_; - size_t rows_ = 0; - }; - template shared_ptr MakeCol(string_view name, Args&&... args) { if (auto it = col_index_.find(name); it != col_index_.end()) { diff --git a/src/export/exporter_interface.h b/src/export/exporter_interface.h index afbc8c9..249e82e 100644 --- a/src/export/exporter_interface.h +++ b/src/export/exporter_interface.h @@ -37,7 +37,6 @@ class StatsExporter { virtual shared_ptr> MetricInt64(string_view name) = 0; virtual shared_ptr> MetricUInt8(string_view name) = 0; virtual shared_ptr> MetricUInt64(string_view name) = 0; - virtual shared_ptr> MetricFixedString(int len, string_view name) = 0; // Records: Data columns you wouldn't want to filter by. virtual shared_ptr> RecordInt16(string_view name) = 0; diff --git a/src/export/otel_exporter.cc b/src/export/otel_exporter.cc index ad9228e..3c7f8d6 100644 --- a/src/export/otel_exporter.cc +++ b/src/export/otel_exporter.cc @@ -170,10 +170,6 @@ class OTelExporter : public StatsExporter { shared_ptr> MetricUInt64(string_view name) final { return MakeIntCol(name); } - shared_ptr> MetricFixedString(int /*len*/, string_view name) final { - return MakeSvCol(name); - } - shared_ptr> RecordInt16(string_view name) final { return MakeIntCol(name); }