Skip to content

Conversation

@CurtizJ
Copy link
Member

@CurtizJ CurtizJ commented Apr 23, 2025

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

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

Fixed error Block structure mismatch in several cases with tables with sparse columns.

Fixes #61738.

@clickhouse-gh
Copy link

clickhouse-gh bot commented Apr 23, 2025

Workflow [PR], commit [fcdf0ff]

@clickhouse-gh clickhouse-gh bot added the pr-bugfix Pull request with bugfix, not backported by default label Apr 23, 2025
@nikitamikhaylov nikitamikhaylov added the pr-must-backport Pull request should be backported intentionally. Use this label with great care! label Apr 23, 2025
);

-- query 3
-- it works with old analyzer
Copy link
Member Author

Choose a reason for hiding this comment

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

If it works with old analyzer, maybe it should work with new as well.

@nikitamikhaylov
Copy link
Member

Bugfix validation check looks broken, it failed with [with NOT_OK] Nothing to run. While the test indeed reproduces bug on the recent master: https://fiddle.clickhouse.com/f16b8f72-49a8-4fe5-b5ce-8939879c7bf0

@nikitamikhaylov nikitamikhaylov self-assigned this Apr 23, 2025
@nikitamikhaylov
Copy link
Member

nikitamikhaylov commented Apr 23, 2025

The reason for the failure is that old version is unable to start. Added here: #79148

2025.04.24 03:58:20.605221 [ 440 ] {} <Error> Application: Code: 115. DB::Exception: Unknown setting 'allow_dynamic_cache_resize'. (UNKNOWN_SETTING), Stack trace (when copying this message, always include the lines below):

0. ./ci/tmp/build/./src/Common/Exception.cpp:110: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000000f2be35b
1. DB::Exception::Exception(PreformattedMessage&&, int) @ 0x0000000009c73bec
2. DB::Exception::Exception<String>(int, FormatStringHelperImpl<std::type_identity<String>::type>, String&&) @ 0x0000000009c7390b
3. ./ci/tmp/build/./src/Core/BaseSettings.cpp:53: DB::BaseSettingsHelpers::throwSettingNotFound(std::basic_string_view<char, std::char_traits<char>>) @ 0x000000001215b2c3
4. ./src/Core/BaseSettings.h:629: DB::BaseSettings<DB::FileCacheSettingsTraits>::set(std::basic_string_view<char, std::char_traits<char>>, DB::Field const&) @ 0x000000001364cbf4
5. ./ci/tmp/build/./src/Interpreters/Cache/FileCacheSettings.cpp:172: DB::FileCacheSettings::loadFromConfig(Poco::Util::AbstractConfiguration const&, String const&, bool) @ 0x0000000013651536
6. ./ci/tmp/build/./src/Disks/ObjectStorages/Cached/registerDiskCache.cpp:56: std::shared_ptr<DB::IDisk> std::__function::__policy_invoker<std::shared_ptr<DB::IDisk> (String const&, Poco::Util::AbstractConfiguration const&, String const&, std::shared_ptr<DB::Context const>, std::map<String, std::shared_ptr<DB::IDisk>, std::less<String>, std::allocator<std::pair<String const, std::shared_ptr<DB::IDisk>>>> const&, bool, bool)>::__call_impl[abi:ne190107]<std::__function::__default_alloc_func<DB::registerDiskCache(DB::DiskFactory&, bool)::$_0, std::shared_ptr<DB::IDisk> (String const&, Poco::Util::AbstractConfiguration const&, String const&, std::shared_ptr<DB::Context const>, std::map<String, std::shared_ptr<DB::IDisk>, std::less<String>, std::allocator<std::pair<String const, std::shared_ptr<DB::IDisk>>>> const&, bool, bool)>>(std::__function::__policy_storage const*, String const&, Poco::Util::AbstractConfiguration const&, String const&, std::shared_ptr<DB::Context const>&&, std::map<String, std::shared_ptr<DB::IDisk>, std::less<String>, std::allocator<std::pair<String const, std::shared_ptr<DB::IDisk>>>> const&, bool, bool) (.llvm.10038708880327519270) @ 0x00000000127668d0
7. ./contrib/llvm-project/libcxx/include/__functional/function.h:716: ? @ 0x0000000012722f74
8. ./ci/tmp/build/./src/Disks/DiskSelector.cpp:55: DB::DiskSelector::initialize(Poco::Util::AbstractConfiguration const&, String const&, std::shared_ptr<DB::Context const>, std::function<bool (Poco::Util::AbstractConfiguration const&, String const&, String const&)>) @ 0x000000001274b262
9. ./ci/tmp/build/./src/Interpreters/Context.cpp:5152: DB::Context::getDiskSelector(std::lock_guard<std::mutex>&) const @ 0x0000000012fed5bd
10. ./ci/tmp/build/./src/Interpreters/Context.cpp:5136: DB::Context::getDisksMap(std::lock_guard<std::mutex>&) const @ 0x0000000012fed9d6
11. ./ci/tmp/build/./src/Interpreters/Context.cpp:5131: DB::Context::getDatabaseDisk() const @ 0x0000000012fc1a63
12. ./ci/tmp/build/./src/Databases/DatabasesCommon.cpp:349: DB::DatabaseWithOwnTablesBase::DatabaseWithOwnTablesBase(String const&, String const&, std::shared_ptr<DB::Context const>) @ 0x0000000012620d9b
13. ./ci/tmp/build/./src/Databases/DatabaseMemory.cpp:24: DB::DatabaseMemory::DatabaseMemory(String const&, std::shared_ptr<DB::Context const>) @ 0x00000000125a66a8
14. ./contrib/llvm-project/libcxx/include/__memory/construct_at.h:41: DB::DatabaseCatalog::initializeAndLoadTemporaryDatabase() @ 0x00000000130bde2d
15. ./ci/tmp/build/./programs/server/Server.cpp:2436: DB::Server::main(std::vector<String, std::allocator<String>> const&) @ 0x000000000f5e0cb1
16. ./ci/tmp/build/./base/poco/Util/src/Application.cpp:315: Poco::Util::Application::run() @ 0x000000001802d986
17. ./ci/tmp/build/./programs/server/Server.cpp:592: DB::Server::run() @ 0x000000000f5cb290
18. ./ci/tmp/build/./programs/server/Server.cpp:389: mainEntryClickHouseServer(int, char**) @ 0x000000000f5c83d3
19. ./ci/tmp/build/./programs/main.cpp:295: main @ 0x0000000009c6f601
20. ? @ 0x00007f776a739d90
21. ? @ 0x00007f776a739e40
22. _start @ 0x000000000698002e
 (version 25.4.1.2934 (official build))

@nikitamikhaylov nikitamikhaylov added this pull request to the merge queue Apr 23, 2025
Merged via the queue into ClickHouse:master with commit 0bd11c4 Apr 23, 2025
119 of 120 checks passed
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Apr 23, 2025
robot-ch-test-poll4 added a commit that referenced this pull request Apr 24, 2025
Cherry pick #79491 to 24.8: Weaken check for sparse columns in Block
robot-ch-test-poll4 added a commit that referenced this pull request Apr 24, 2025
Cherry pick #79491 to 25.2: Weaken check for sparse columns in Block
robot-ch-test-poll4 added a commit that referenced this pull request Apr 24, 2025
Cherry pick #79491 to 25.3: Weaken check for sparse columns in Block
robot-ch-test-poll4 added a commit that referenced this pull request Apr 24, 2025
Cherry pick #79491 to 25.4: Weaken check for sparse columns in Block
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-backports-created-cloud deprecated label, NOOP label Apr 24, 2025
@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Apr 24, 2025
nikitamikhaylov added a commit that referenced this pull request Apr 25, 2025
Backport #79491 to 24.8: Weaken check for sparse columns in Block
nikitamikhaylov added a commit that referenced this pull request Apr 25, 2025
Backport #79491 to 25.2: Weaken check for sparse columns in Block
nikitamikhaylov added a commit that referenced this pull request Apr 25, 2025
Backport #79491 to 25.3: Weaken check for sparse columns in Block
nikitamikhaylov added a commit that referenced this pull request Apr 25, 2025
Backport #79491 to 25.4: Weaken check for sparse columns in Block
@robot-clickhouse robot-clickhouse added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Jul 2, 2025
zvonand pushed a commit to Altinity/ClickHouse that referenced this pull request Sep 5, 2025
Backport ClickHouse#79491 to 24.8: Weaken check for sparse columns in Block
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-backports-created-cloud deprecated label, NOOP pr-bugfix Pull request with bugfix, not backported by default pr-must-backport Pull request should be backported intentionally. Use this label with great care! pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Merges failing due to block structure mismatch from projection on aggregatedmergetree

6 participants