Skip to content

Implemented reading values of SimpleAggregateFunction #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 20, 2020

Conversation

Enmk
Copy link
Contributor

@Enmk Enmk commented Jul 20, 2020

Columns of SimpleAggregateFunction(func, X) are now handled properly and can be read from client's code as Column-X.

@Enmk Enmk force-pushed the SimpleAggregateFunction branch from 6f27d43 to 5800488 Compare July 21, 2020 10:58
Copy link
Contributor

@traceon traceon left a comment

Choose a reason for hiding this comment

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

Clarification requested.

@@ -258,3 +259,11 @@ TEST(ColumnsCase, LowCardinalityString_Save) {
EXPECT_EQ(col.At(i), foobar(i)) << " at pos: " << i;
}
}

TEST(ColumnsCase, CreateSimpleAggregateFunction) {
auto col = CreateColumnByType("SimpleAggregateFunction(funt, Int32");
Copy link
Contributor

@traceon traceon Aug 2, 2020

Choose a reason for hiding this comment

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

SimpleAggregateFunction(funt, Int32 (without closing parentheses)? Does this test pass? If yes, then why? Should it pass (i.e. should type parser tolerate this)?

"ENGINE = Memory");

constexpr size_t EXPECTED_ROWS = 10;
client_->Execute("INSERT INTO test_clickhouse_cpp.SimpleAggregateFunction (saf) SELECT number FROM system.numbers LIMIT 10");
Copy link
Contributor

@traceon traceon Aug 2, 2020

Choose a reason for hiding this comment

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

I would say ... LIMIT " + std::to_string(EXPECTED_ROWS));

@traceon traceon merged commit 2cdb0d8 into ClickHouse:master Aug 20, 2020
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.

2 participants