Skip to content

Correct cardinality in join output - #24061

Merged
vdimir merged 23 commits into
ClickHouse:masterfrom
vdimir:issue-23351
Jun 18, 2021
Merged

vdimir merged 23 commits into
ClickHouse:masterfrom
vdimir:issue-23351

Conversation

@vdimir

@vdimir vdimir commented May 12, 2021 •

Copy link
Copy Markdown
Member

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Changelog category (leave one):

  • Bug Fix

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

Column cardinality in join output same as at the input, close #23351, close #20315

@robot-clickhouse robot-clickhouse added the pr-bugfix Pull request with bugfix, not backported by default label May 12, 2021
@vdimir vdimir changed the title [WIP] Try to not remove lowcard in merge join [WIP] Correct cardinality in HashJoin May 15, 2021
@vdimir vdimir changed the title [WIP] Correct cardinality in HashJoin Correct cardinality in HashJoin May 15, 2021
@vdimir
vdimir marked this pull request as ready for review May 15, 2021 14:11
@vdimir vdimir changed the title Correct cardinality in HashJoin Correct cardinality in join output May 17, 2021
@vdimir

vdimir commented May 21, 2021

Copy link
Copy Markdown
Member Author

@Mergifyio update

@mergify

mergify Bot commented May 21, 2021

Copy link
Copy Markdown
Contributor

Command update: success

Branch has been successfully updated

@Avogar Avogar self-assigned this May 25, 2021
@vdimir

vdimir commented May 25, 2021

Copy link
Copy Markdown
Member Author

AST fuzzer failures is related, but I can't reproduce it locally

@vdimir
vdimir marked this pull request as draft June 15, 2021 09:08
@vdimir

vdimir commented Jun 17, 2021 •

Copy link
Copy Markdown
Member Author

I suppose it will be ok after merging fix from #25321

UPD: branch merged to current PR

@vdimir
vdimir marked this pull request as ready for review June 17, 2021 10:28
@vdimir
vdimir merged commit fab7c9c into ClickHouse:master Jun 18, 2021
@vdimir
vdimir deleted the issue-23351 branch June 18, 2021 08:07
const auto & dict_type = typeid_cast<const DataTypeLowCardinality *>(column.type.get())->getDictionaryType();
column.type = std::make_shared<DataTypeLowCardinality>(removeNullable(dict_type));

ColumnLowCardinality * col_as_lc = typeid_cast<ColumnLowCardinality *>(column.column->assumeMutable().get());

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Forgot to change assumeMutable to IColumn::mutate here, like in convertColumnToNullable. I'll create new PR for it now.

vdimir added a commit that referenced this pull request Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-bugfix Pull request with bugfix, not backported by default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Join Logical error: 'Bad cast from type DB::ColumnLowCardinality to DB::ColumnString abort in debug: LowCardinality -> Nullable -> Vector

3 participants