Skip to content

Conversation

@timoll
Copy link
Contributor

@timoll timoll commented Dec 15, 2021

This closes #115 and also adds the option to Append Tuples to ColumnTuples.

@CLAassistant
Copy link

CLAassistant commented Dec 15, 2021

CLA assistant check
All committers have signed the CLA.

@timoll
Copy link
Contributor Author

timoll commented Dec 21, 2021

I implemented Slice as well, this should now resolve #32 as well.

Copy link
Contributor

@Enmk Enmk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for a PR!

Please fix according to comments, and add some unit-tests (you may add some to columns_ut.cpp)

"to column type " + this->Type()->GetName());
}
for (size_t ci = 0; ci < columns_.size(); ci++) {
columns_[ci]->Append((*column->As<ColumnTuple>())[ci]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This case (with ->As<ColumnTuple>) should be moved outside for loop.

public:
/// Appends content of given column to the end of current one.
void Append(ColumnRef) override { }
void Append(ColumnRef column) override;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add some unit tests that validate implementation of ColumnTuple::Append(), both positive and negative cases.


/// Makes slice of the current column.
ColumnRef Slice(size_t, size_t) const override { return ColumnRef(); }
ColumnRef Slice(size_t, size_t) const override;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add some unit tests that validate implementation of ColumnTuple::Slice(), both positive and negative cases.

@timoll
Copy link
Contributor Author

timoll commented Jan 20, 2022

I added some unit tests for the append and slice case, I'm not quite sure what you mean with the negative case.

Copy link
Contributor

@Enmk Enmk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Enmk Enmk merged commit 1ab8769 into ClickHouse:master Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Appending an Array of Tuples to a Column fails.

3 participants