Skip to content

Commit 97d908a

Browse files
committed
Merge master and fix syntax error.
1 parent 711cec6 commit 97d908a

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

clickhouse/columns/date.cpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,27 +88,31 @@ void ColumnDate32::Append(ColumnRef column) {
8888
}
8989
}
9090

91-
bool ColumnDate32::Load(InputStream* input, size_t rows) {
92-
return data_->Load(input, rows);
91+
bool ColumnDate32::LoadBody(InputStream* input, size_t rows) {
92+
return data_->LoadBody(input, rows);
9393
}
9494

95-
void ColumnDate32::Save(OutputStream* output) {
96-
data_->Save(output);
95+
void ColumnDate32::SaveBody(clickhouse/columns/date.cppOutputStream* output) {
96+
data_->SaveBody(output);
9797
}
9898

9999
size_t ColumnDate32::Size() const {
100100
return data_->Size();
101101
}
102102

103103
ColumnRef ColumnDate32::Slice(size_t begin, size_t len) const {
104-
auto col = data_->Slice(begin, len)->As<ColumnUInt16>();
104+
auto col = data_->Slice(begin, len)->As<ColumnUInt32>();
105105
auto result = std::make_shared<ColumnDate32>();
106106

107107
result->data_->Append(col);
108108

109109
return result;
110110
}
111111

112+
ColumnRef ColumnDate32::CloneEmpty() const {
113+
return std::make_shared<ColumnDate32>();
114+
}
115+
112116
void ColumnDate32::Swap(Column& other) {
113117
auto & col = dynamic_cast<ColumnDate32 &>(other);
114118
data_.swap(col.data_);
@@ -119,7 +123,6 @@ ItemView ColumnDate32::GetItem(size_t index) const {
119123
}
120124

121125

122-
123126
ColumnDateTime::ColumnDateTime()
124127
: Column(Type::CreateDateTime())
125128
, data_(std::make_shared<ColumnUInt32>())

clickhouse/columns/date.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ class ColumnDate : public Column {
4949
};
5050

5151

52-
/** */
5352
class ColumnDate32 : public Column {
5453
public:
5554
using ValueType = std::time_t;
@@ -68,10 +67,10 @@ class ColumnDate32 : public Column {
6867
void Append(ColumnRef column) override;
6968

7069
/// Loads column data from input stream.
71-
bool Load(InputStream* input, size_t rows) override;
70+
bool LoadBody(InputStream* input, size_t rows) override;
7271

7372
/// Saves column data to output stream.
74-
void Save(OutputStream* output) override;
73+
void SaveBody(OutputStream* output) override;
7574

7675
/// Clear column data .
7776
void Clear() override;
@@ -81,7 +80,7 @@ class ColumnDate32 : public Column {
8180

8281
/// Makes slice of the current column.
8382
ColumnRef Slice(size_t begin, size_t len) const override;
84-
83+
ColumnRef CloneEmpty() const override;
8584
void Swap(Column& other) override;
8685

8786
ItemView GetItem(size_t index) const override;

0 commit comments

Comments
 (0)