Skip to content

Cherry pick #68131 to 24.8: Fix crash on parquet column type mismatch - #68817

Merged
robot-clickhouse merged 0 commit into
backport/24.8/68131from
cherrypick/24.8/dc4281cc869da86b2023fe299ecc772545a09416
Aug 23, 2024
Merged

robot-clickhouse merged 0 commit into
backport/24.8/68131from
cherrypick/24.8/dc4281cc869da86b2023fe299ecc772545a09416

Conversation

@robot-clickhouse

Copy link
Copy Markdown
Member

Original pull-request #68131

This pull-request is a first step of an automated backporting.
It contains changes similar to calling git cherry-pick locally.
If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.

The check results does not matter at this step - you can safely ignore them.

Note

This pull-request will be merged automatically. Please, do not merge it manually (but if you accidentally did, nothing bad will happen).

Troubleshooting

If the PR was manually reopened after being closed

If this PR is stuck (i.e. not automatically merged after one day), check #68131 for pr-backports-created label and delete it.

Manually merging will do nothing. The pr-backports-created label prevents the original PR #68131 from being processed.

If the conflicts were resolved in a wrong way

If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:

  • delete the pr-cherrypick label from the PR
  • delete this branch from the repository

You also need to check the original PR #68131 for pr-backports-created, and delete if it's presented there

@robot-clickhouse robot-clickhouse added pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only! do not test disable testing on pull request pr-bugfix Pull request with bugfix, not backported by default labels Aug 23, 2024
@robot-clickhouse
robot-clickhouse merged this pull request into backport/24.8/68131 Aug 23, 2024
@robot-clickhouse
robot-clickhouse deleted the cherrypick/24.8/dc4281cc869da86b2023fe299ecc772545a09416 branch August 23, 2024 14:18
@LGDHuaOPER

Copy link
Copy Markdown

version 24.9.1.41 (official build)

Also found error when using query:

SELECT maxMapState([op], [toDateTime64(process_end_time, 3, 'Asia/Shanghai')]) AS op_recent_time_map AS op_recent_time_map FROM my_table

The error is:

2024.09.08 10:54:42.199082 [ 35526 ] {} <Error> void DB::StorageBuffer::backgroundFlush(): Code: 170. DB::Exception: Bad get: has Decimal128, requested Decimal64: while pushing to view eos_alogger.user_bucket_stats_activity_metrics_mv (2fdccd04-24db-4325-8f79-1d38d1bba45b): while pushing to view eos_alogger.accesser_access_log_business_mv (0730b913-93ed-4802-bebd-c7c599e9e6a8). (BAD_GET), Stack trace (when copying this message, always include the lines below):

0. DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000000db87cdb
1. DB::Exception::Exception(PreformattedMessage&&, int) @ 0x0000000007e8114c
2. DB::Exception::Exception<std::basic_string_view<char, std::char_traits<char>>, DB::Field::Types::Which const&>(int, FormatStringHelperImpl<std::type_identity<std::basic_string_view<char, std::char_traits<char>>>::type, std::type_identity<DB::Field::Types::Which const&>::type>, std::basic_string_view<char, std::char_traits<char>>&&, DB::Field::Types::Which const&) @ 0x0000000007e8a50b
3. auto& DB::Field::safeGet<DB::DecimalField<DB::DateTime64>>() @ 0x00000000095094f0
4. DB::SerializationDecimalBase<DB::DateTime64>::serializeBinary(DB::Field const&, DB::WriteBuffer&, DB::FormatSettings const&) const @ 0x0000000007a34a30
5. void std::__function::__policy_invoker<void (unsigned long, DB::Array const&)>::__call_impl<std::__function::__default_alloc_func<DB::(anonymous namespace)::AggregateFunctionMapBase<DB::(anonymous namespace)::AggregateFunctionMaxMap<false>, DB::(anonymous namespace)::FieldVisitorMax, true, false, false>::serialize(char const*, DB::WriteBuffer&, std::optional<unsigned long>) const::'lambda0'(unsigned long, DB::Array const&), void (unsigned long, DB::Array const&)>>(std::__function::__policy_storage const*, unsigned long, DB::Array const&) @ 0x000000000ff5bfca
6. DB::(anonymous namespace)::AggregateFunctionMapBase<DB::(anonymous namespace)::AggregateFunctionMaxMap<false>, DB::(anonymous namespace)::FieldVisitorMax, true, false, false>::serialize(char const*, DB::WriteBuffer&, std::optional<unsigned long>) const (.57d3f6c10521af555a2cc605b00052ac) @ 0x000000000ff5964d
7. DB::SerializationAggregateFunction::serializeBinaryBulk(DB::IColumn const&, DB::WriteBuffer&, unsigned long, unsigned long) const @ 0x000000001123eddd
8. DB::ISerialization::serializeBinaryBulkWithMultipleStreams(DB::IColumn const&, unsigned long, unsigned long, DB::ISerialization::SerializeBinaryBulkSettings&, std::shared_ptr<DB::ISerialization::SerializeBinaryBulkState>&) const @ 0x0000000011238f66
9. DB::MergeTreeDataPartWriterCompact::writeDataBlockPrimaryIndexAndSkipIndices(DB::Block const&, std::vector<DB::Granule, std::allocator<DB::Granule>> const&) @ 0x0000000012b5739e
10. DB::MergeTreeDataPartWriterCompact::fillChecksums(DB::MergeTreeDataPartChecksums&, std::unordered_set<String, std::hash<String>, std::equal_to<String>, std::allocator<String>>&) @ 0x0000000012b58344
11. DB::MergedBlockOutputStream::finalizePartAsync(std::shared_ptr<DB::IMergeTreeDataPart> const&, bool, DB::NamesAndTypesList const*, DB::MergeTreeDataPartChecksums*) @ 0x0000000012cacb6f
12. DB::MergeTreeDataWriter::writeTempPartImpl(DB::BlockWithPartition&, std::shared_ptr<DB::StorageInMemoryMetadata const> const&, std::shared_ptr<DB::Context const>, long, bool) @ 0x0000000012b9cc0c
13. DB::MergeTreeSink::consume(DB::Chunk&) @ 0x0000000012e3a91c
14. DB::SinkToStorage::onConsume(DB::Chunk) @ 0x00000000134702c4
15. void std::__function::__policy_invoker<void ()>::__call_impl<std::__function::__default_alloc_func<DB::ExceptionKeepingTransform::work()::$_1, void ()>>(std::__function::__policy_storage const*) @ 0x00000000133a7bb8
16. DB::runStep(std::function<void ()>, DB::ThreadStatus*, std::atomic<unsigned long>*) @ 0x00000000133a78cb
17. DB::ExceptionKeepingTransform::work() @ 0x00000000133a70f5
18. DB::ExecutionThreadContext::executeTask() @ 0x0000000013134cc7
19. DB::PipelineExecutor::executeStepImpl(unsigned long, std::atomic<bool>*) @ 0x0000000013128790
20. DB::PipelineExecutor::executeStep(std::atomic<bool>*) @ 0x0000000013128188
21. DB::StorageBuffer::writeBlockToDestination(DB::Block const&, std::shared_ptr<DB::IStorage>) @ 0x00000000127c4cd3
22. DB::StorageBuffer::flushBuffer(DB::StorageBuffer::Buffer&, bool, bool) @ 0x00000000127c1890
23. DB::ThreadPoolCallbackRunnerLocal<void, ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>, std::function<void ()>>::operator()(std::function<void ()>&&, Priority)::'lambda'()::operator()() @ 0x000000001081b4e8
24. std::packaged_task<void ()>::operator()() @ 0x000000000e13320c
25. ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::worker(std::__list_iterator<ThreadFromGlobalPoolImpl<false, true>, void*>) @ 0x000000000dc5ddf8
26. void std::__function::__policy_invoker<void ()>::__call_impl<std::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<false, true>::ThreadFromGlobalPoolImpl<void ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::scheduleImpl<void>(std::function<void ()>, Priority, std::optional<unsigned long>, bool)::'lambda0'()>(void&&)::'lambda'(), void ()>>(std::__function::__policy_storage const*) @ 0x000000000dc62f31
27. void* std::__thread_proxy[abi:v15007]<std::tuple<std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>, void ThreadPoolImpl<std::thread>::scheduleImpl<void>(std::function<void ()>, Priority, std::optional<unsigned long>, bool)::'lambda0'()>>(void*) @ 0x000000000dc6135f
28. ? @ 0x00007f3354625609
29. ? @ 0x00007f335454a353
 (version 24.9.1.41 (official build))

When I use this query:

SELECT maxMapState([op], [toDateTime(process_end_time, 'Asia/Shanghai')]) AS op_recent_time_map AS op_recent_time_map FROM my_table

It is OK.

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

Labels

do not test disable testing on pull request pr-bugfix Pull request with bugfix, not backported by default pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants