Skip to content
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

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

Merged
merged 53 commits into from
Jan 17, 2021

Conversation

CurtizJ
Copy link
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
Member

Choose a reason for hiding this comment

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

.

@@ -46,10 +48,13 @@ IMergeTreeDataPart::MergeTreeReaderPtr MergeTreeDataPartWide::getReader(
const ValueSizeMap & avg_value_size_hints,
const ReadBufferFromFileBase::ProfileCallback & profile_callback) const
{
auto new_settings = reader_settings;
new_settings.convert_nested_to_subcolumns = true;
Copy link
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
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
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
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
force tests The label does nothing, NOOP, None, nil 🎅 🎁 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