Skip to content

Allow nested with multiple nesting and subcolumns of complex types#17310

Merged
alexey-milovidov merged 53 commits intoClickHouse:masterfrom
CurtizJ:multiple-nested
Jan 17, 2021
Merged

Allow nested with multiple nesting and subcolumns of complex types#17310
alexey-milovidov merged 53 commits intoClickHouse:masterfrom
CurtizJ:multiple-nested

Conversation

@CurtizJ
Copy link
Copy Markdown
Member

@CurtizJ CurtizJ commented Nov 23, 2020

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

Changelog category (leave one):

  • New Feature

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Data type Nested now supports arbitrary levels of nesting. Introduced subcolumns of complex types, such as size0 in Array, null in Nullable, names of Tuple elements, which can be read without reading of whole column.

Detailed description / Documentation draft:
Continuation of #14963.

This closes #18826.

@robot-clickhouse robot-clickhouse added doc-alert pr-feature Pull request with new product feature labels Nov 23, 2020
String toString() const;
};

struct SubstreamPath : public std::vector<Substream>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

.

const ReadBufferFromFileBase::ProfileCallback & profile_callback) const
{
auto new_settings = reader_settings;
new_settings.convert_nested_to_subcolumns = true;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Don't understand.

sizes_data.resize(offsets_data.size());
sizes_data[0] = offsets_data[0];
for (size_t i = 1; i < offsets_data.size(); ++i)
sizes_data[i] = offsets_data[i] - offsets_data[i - 1];
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I expect that compiler will generate suboptimal code due to possible aliasing.

offsets_data.resize(sizes_data.size());
offsets_data[0] = sizes_data[0];
for (size_t i = 0; i < sizes_data.size(); ++i)
offsets_data[i] = offsets_data[i - 1] + sizes_data[i];
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The same issue as above.

@alexey-milovidov
Copy link
Copy Markdown
Member

Looks like conversion from ANTLR AST is wrong. I will disable this test for ANTLR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🎅 🎁 gift🎄 To make people wonder pr-feature Pull request with new product feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot access named tuple element by its name using dot

3 participants