From a6aeb7a0354b9b94a667d2c1404088856ef46e1c Mon Sep 17 00:00:00 2001 From: Moaaz Assali <66834697+moaazassali@users.noreply.github.com> Date: Mon, 24 Jun 2024 14:50:41 +0400 Subject: [PATCH] Added RawAt() for ColumnDateTime --- clickhouse/columns/date.cpp | 4 ++++ clickhouse/columns/date.h | 1 + 2 files changed, 5 insertions(+) diff --git a/clickhouse/columns/date.cpp b/clickhouse/columns/date.cpp index 132c6fc7..ad149927 100644 --- a/clickhouse/columns/date.cpp +++ b/clickhouse/columns/date.cpp @@ -210,6 +210,10 @@ void ColumnDateTime::AppendRaw(uint32_t value) { data_->Append(value); } +uint32_t ColumnDateTime::RawAt(size_t n) const { + return data_->At(n); +} + std::string ColumnDateTime::Timezone() const { return type_->As()->Timezone(); } diff --git a/clickhouse/columns/date.h b/clickhouse/columns/date.h index bf501723..324c67c7 100644 --- a/clickhouse/columns/date.h +++ b/clickhouse/columns/date.h @@ -142,6 +142,7 @@ class ColumnDateTime : public Column { /// Append raw as UNIX epoch seconds in uint32 void AppendRaw(uint32_t value); + uint32_t RawAt(size_t n) const; /// Timezone associated with a data column. std::string Timezone() const;