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

[Bug](array) fix array column core dump in get_shrinked_column as not check type #33295

Merged
merged 3 commits into from
Apr 7, 2024

Conversation

zhangstar333
Copy link
Contributor

get_shrinked_column() function should only call by string type.
so should check column type.

 6# google::LogMessage::SendToLog() in /mnt/disk2/zhangsida/doris/output/be/lib/doris_be
 7# google::LogMessage::Flush() in /mnt/disk2/zhangsida/doris/output/be/lib/doris_be
 8# google::LogMessageFatal::~LogMessageFatal() in /mnt/disk2/zhangsida/doris/output/be/lib/doris_be
 9# doris::vectorized::IColumn::get_shrinked_column() in /mnt/disk2/zhangsida/doris/output/be/lib/doris_be
10# doris::vectorized::ColumnNullable::get_shrinked_column() at /mnt/disk2/zhangsida/doris/be/src/vec/columns/column_nullable.cpp:52
11# doris::vectorized::ColumnArray::get_shrinked_column() at /mnt/disk2/zhangsida/doris/be/src/vec/columns/column_array.cpp:129
12# doris::vectorized::ColumnNullable::get_shrinked_column() at /mnt/disk2/zhangsida/doris/be/src/vec/columns/column_nullable.cpp:52
13# doris::vectorized::ColumnStruct::get_shrinked_column() at /mnt/disk2/zhangsida/doris/be/src/vec/columns/column_struct.cpp:305
14# doris::vectorized::ColumnNullable::get_shrinked_column() at /mnt/disk2/zhangsida/doris/be/src/vec/columns/column_nullable.cpp:52
15# doris::vectorized::Block::shrink_char_type_column_suffix_zero(std::vector<unsigned long, std::allocator<unsigned long> > const&)

Proposed changes

Issue Number: close #xxx

Further comments

If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...

@zhangstar333
Copy link
Contributor Author

run buildall

Copy link
Contributor

github-actions bot commented Apr 7, 2024

clang-tidy review says "All clean, LGTM! 👍"

@zhangstar333
Copy link
Contributor Author

run buildall

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

bool is_variable_length() const override { return nested_column->is_variable_length(); }

Copy link
Contributor

Choose a reason for hiding this comment

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

warning: method 'get_family_name' can be made static [readability-convert-member-functions-to-static]

Suggested change
static const char* get_family_name() override { return "Nullable"; }

@@ -120,6 +120,7 @@ class ColumnString final : public COWHelper<IColumn, ColumnString> {
MutableColumnPtr clone_resized(size_t to_size) const override;

MutableColumnPtr get_shrinked_column() override;
bool could_shrinked_column() override { return true; }
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: method 'could_shrinked_column' can be made static [readability-convert-member-functions-to-static]

Suggested change
bool could_shrinked_column() override { return true; }
static bool could_shrinked_column() override { return true; }

@@ -295,13 +295,22 @@ ColumnPtr ColumnStruct::replicate(const Offsets& offsets) const {
return ColumnStruct::create(new_columns);
}

bool ColumnStruct::could_shrinked_column() {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: method 'could_shrinked_column' can be made static [readability-convert-member-functions-to-static]

be/src/vec/columns/column_struct.h:158:

-     bool could_shrinked_column() override;
+     static bool could_shrinked_column() override;

Copy link
Contributor

@yiguolei yiguolei left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Apr 7, 2024
Copy link
Contributor

github-actions bot commented Apr 7, 2024

PR approved by at least one committer and no changes requested.

Copy link
Contributor

github-actions bot commented Apr 7, 2024

PR approved by anyone and no changes requested.

Copy link
Contributor

@HappenLee HappenLee left a comment

Choose a reason for hiding this comment

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

LGTM

@yiguolei yiguolei merged commit f9de308 into apache:master Apr 7, 2024
26 of 29 checks passed
yiguolei pushed a commit that referenced this pull request Apr 7, 2024
… check type (#33295)

* [Bug](array) fix array column core dump in get_shrinked_column as not check type

* add function could_shrinked_column
@yiguolei yiguolei mentioned this pull request Apr 8, 2024
seawinde pushed a commit to seawinde/doris that referenced this pull request Apr 10, 2024
… check type (apache#33295)

* [Bug](array) fix array column core dump in get_shrinked_column as not check type

* add function could_shrinked_column
@xiaokang xiaokang added the p0_c label Apr 10, 2024
zhangstar333 added a commit to zhangstar333/incubator-doris that referenced this pull request Apr 11, 2024
… check type (apache#33295)

* [Bug](array) fix array column core dump in get_shrinked_column as not check type

* add function could_shrinked_column
yiguolei pushed a commit that referenced this pull request Apr 11, 2024
… check type (#33295) (#33552)

* [Bug](array) fix array column core dump in get_shrinked_column as not check type

* add function could_shrinked_column
mongo360 pushed a commit to mongo360/doris that referenced this pull request Aug 16, 2024
… check type (apache#33295) (apache#33552)

* [Bug](array) fix array column core dump in get_shrinked_column as not check type

* add function could_shrinked_column
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. dev/2.0.9-merged dev/2.1.2-merged p0_c reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants