You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "Gabriel39 (via GitHub)" <gi...@apache.org> on 2026/04/15 06:53:48 UTC

[PR] [fix](column) Fix incorrect for-loop [doris]

Gabriel39 opened a new pull request, #62517:
URL: https://github.com/apache/doris/pull/62517

   ### What problem does this PR solve?
    Fix memory corruption in PredicateColumnType::insert_duplicate_fields for string types
                                                                                                                                                                                                                                      
     Fixed a bug in the pointer arithmetic when inserting duplicate string values. The original code used dst += i * str.size() which incorrectly multiplied by the loop index, causing:                                            
     - Iteration 0: no advance (correct by accident)
     - Iteration 1: advance by 1×size (correct)
     - Iteration 2: advance by 2×size (wrong - overwrites beyond allocated memory)
   
     This resulted in memory corruption and incorrect string data when inserting more than 2 duplicates.
   
     The fix changes to dst += str.size() to correctly advance the pointer by one string length per iteration.
   
     Added unit tests covering:
     - String type with multiple duplicate insertions
     - Integer type duplicates
     - LargeInt (Int128) type duplicates
   
   Introduced by #60530
   
   ==13605==ERROR: AddressSanitizer: use-after-poison on address 0x7d639d26bc30 at pc 0x55e8b71df91e bp 0x7b4e8fc1e510 sp 0x7b4e8fc1dcd0
   WRITE of size 6 at 0x7d639d26bc30 thread T620 (ls_normal [work)
       #0 0x55e8b71df91d in __asan_memcpy (/mnt/hdd01/PERFORMANCE_ENV/be/lib/doris_be+0x2205791d)
       #1 0x55e8cce8b1ab in doris::PredicateColumnType<(doris::PrimitiveType)23>::insert_duplicate_fields(doris::Field const&, unsigned long) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/core/column/predicate_column.h:327:17
       #2 0x55e8b7db4e83 in doris::ColumnNullable::insert_duplicate_fields(doris::Field const&, unsigned long) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/core/column/column_nullable.cpp:357:29
       #3 0x55e8ccf8ba2c in doris::segment_v2::DefaultValueColumnIterator::_insert_many_default(doris::COW<doris::IColumn>::mutable_ptr<doris::IColumn>&, unsigned long) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/segment/column_reader.cpp:2167:14
       #4 0x55e8ccf3c705 in doris::segment_v2::DefaultValueColumnIterator::next_batch(unsigned long*, doris::COW<doris::IColumn>::mutable_ptr<doris::IColumn>&, bool*) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/segment/column_reader.cpp:2152:5
       #5 0x55e8cd4f9313 in doris::segment_v2::ColumnIterator::next_batch(unsigned long*, doris::COW<doris::IColumn>::mutable_ptr<doris::IColumn>&) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/segment/column_reader.h:330:16
       #6 0x55e8cd4f9313 in doris::segment_v2::SegmentIterator::_read_columns_by_index(unsigned int, unsigned short&) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/segment/segment_iterator.cpp:2291:13
       #7 0x55e8cd50621b in doris::segment_v2::SegmentIterator::_next_batch_internal(doris::Block*) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/segment/segment_iterator.cpp:2643:5
       #8 0x55e8cd4a0b82 in doris::segment_v2::SegmentIterator::next_batch(doris::Block*)::$_0::operator()() const /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/segment/segment_iterator.cpp:2519:9
       #9 0x55e8cd4a0b82 in doris::segment_v2::SegmentIterator::next_batch(doris::Block*) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/segment/segment_iterator.cpp:2518:19
       #10 0x55e8cd37cca1 in doris::segment_v2::LazyInitSegmentIterator::next_batch(doris::Block*) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/segment/lazy_init_segment_iterator.h:46:33
       #11 0x55e8cccc0b05 in doris::Status doris::BetaRowsetReader::_next_batch<doris::Block>(doris::Block*) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/rowset/beta_rowset_reader.h:113:35
       #12 0x55e8ccc98668 in doris::BetaRowsetReader::next_batch(doris::Block*) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/rowset/beta_rowset_reader.h:56:55
       #13 0x55e8ca62ee8f in doris::VCollectIterator::Level0Iterator::_refresh() /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/iterator/vcollect_iterator.h
       #14 0x55e8ca611036 in doris::VCollectIterator::Level0Iterator::refresh_current_row() /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/iterator/vcollect_iterator.cpp:523:24
       #15 0x55e8ca601a08 in doris::VCollectIterator::Level0Iterator::ensure_first_row_ref() /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/iterator/vcollect_iterator.cpp:496:14
       #16 0x55e8ca604ea2 in doris::VCollectIterator::Level1Iterator::ensure_first_row_ref() /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/iterator/vcollect_iterator.cpp:713:27
       #17 0x55e8ca608b20 in doris::VCollectIterator::build_heap(std::vector<std::shared_ptr<doris::RowsetReader>, std::allocator<std::shared_ptr<doris::RowsetReader>>>&) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/iterator/vcollect_iterator.cpp:189:9
       #18 0x55e8ca5dc1ae in doris::BlockReader::_init_collect_iter(doris::TabletReader::ReaderParams const&) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/iterator/block_reader.cpp:152:9
       #19 0x55e8ca5d7b9d in doris::BlockReader::init(doris::TabletReader::ReaderParams const&) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/iterator/block_reader.cpp:226:19
       #20 0x55e8d02df6d6 in doris::OlapScanner::_open_impl(doris::RuntimeState*) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/exec/scan/olap_scanner.cpp:317:32
       #21 0x55e8d02cd697 in doris::Scanner::open(doris::RuntimeState*) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/exec/scan/scanner.h:80:16
       #22 0x55e8d02b576a in doris::ScannerScheduler::_scanner_scan(std::shared_ptr<doris::ScannerContext>, std::shared_ptr<doris::ScanTask>) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/exec/scan/scanner_scheduler.cpp:185:5
       #23 0x55e8d02bf603 in doris::ScannerScheduler::submit(std::shared_ptr<doris::ScannerContext>, std::shared_ptr<doris::ScanTask>)::$_0::operator()() const::'lambda'()::operator()() const::'lambda'()::operator()() const /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/exec/scan/scanner_scheduler.cpp:75:17
       #24 0x55e8d02bf603 in doris::ScannerScheduler::submit(std::shared_ptr<doris::ScannerContext>, std::shared_ptr<doris::ScanTask>)::$_0::operator()() const::'lambda'()::operator()() const /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/exec/scan/scanner_scheduler.cpp:74:27
       #25 0x55e8d02bf603 in bool std::__invoke_impl<bool, doris::ScannerScheduler::submit(std::shared_ptr<doris::ScannerContext>, std::shared_ptr<doris::ScanTask>)::$_0::operator()() const::'lambda'()&>(std::__invoke_other, doris::ScannerScheduler::submit(std::shared_ptr<doris::ScannerContext>, std::shared_ptr<doris::ScanTask>)::$_0::operator()() const::'lambda'()&) /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/invoke.h:63:14
       #26 0x55e8d02bf603 in std::enable_if<is_invocable_r_v<bool, doris::ScannerScheduler::submit(std::shared_ptr<doris::ScannerContext>, std::shared_ptr<doris::ScanTask>)::$_0::operator()() const::'lambda'()&>, bool>::type std::__invoke_r<bool, doris::ScannerScheduler::submit(std::shared_ptr<doris::ScannerContext>, std::shared_ptr<doris::ScanTask>)::$_0::operator()() const::'lambda'()&>(doris::ScannerScheduler::submit(std::shared_ptr<doris::ScannerContext>, std::shared_ptr<doris::ScanTask>)::$_0::operator()() const::'lambda'()&) /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/invoke.h:116:9
       #27 0x55e8d02bf603 in std::_Function_handler<bool (), doris::ScannerScheduler::submit(std::shared_ptr<doris::ScannerContext>, std::shared_ptr<doris::ScanTask>)::$_0::operator()() const::'lambda'()>::_M_invoke(std::_Any_data const&) /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/std_function.h:292:9
       #28 0x55e8d02bed85 in std::function<bool ()>::operator()() const /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/std_function.h:593:9
       #29 0x55e8d02bed85 in doris::ScannerSplitRunner::process_for(std::chrono::duration<long, std::ratio<1l, 1000000000l>>) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/exec/scan/scanner_scheduler.cpp:425:25
       #30 0x55e8d02aa844 in doris::PrioritizedSplitRunner::process() /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/exec/scan/task_executor/time_sharing/prioritized_split_runner.cpp:102:35
       #31 0x55e8d0272674 in doris::TimeSharingTaskExecutor::_dispatch_thread() /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/exec/scan/task_executor/time_sharing/time_sharing_task_executor.cpp:556:77
       #32 0x55e8d3fa8ad1 in std::function<void ()>::operator()() const /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/std_function.h:593:9
       #33 0x55e8d3fa8ad1 in doris::Thread::supervise_thread(void*) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/util/thread.cpp:460:5
       #34 0x55e8b71ddd26 in asan_thread_start(void*) (/mnt/hdd01/PERFORMANCE_ENV/be/lib/doris_be+0x22055d26)
       #35 0x7f539b835ac2 in start_thread nptl/pthread_create.c:442:8
       #36 0x7f539b8c78cf  misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
   
   0x7d639d26bc30 is located 816 bytes inside of 4096-byte region [0x7d639d26b900,0x7d639d26c900)
   allocated by thread T620 (ls_normal [work) here:
       #0 0x55e8b71e1b34 in malloc (/mnt/hdd01/PERFORMANCE_ENV/be/lib/doris_be+0x22059b34)
       #1 0x55e8b78d2140 in doris::DefaultMemoryAllocator::malloc(unsigned long) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/core/allocator.h:90:55
       #2 0x55e8b78d2140 in doris::Allocator<false, false, false, doris::DefaultMemoryAllocator, true>::alloc(unsigned long, unsigned long) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/core/allocator.cpp:337:23
       #3 0x55e8b7ccdfaf in doris::Arena::Chunk::Chunk(unsigned long, doris::Arena::Chunk*) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/core/arena.h:59:63
       #4 0x55e8b7ccdad9 in doris::Arena::_init_head_if_needed() /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/core/arena.h:131:24
       #5 0x55e8b7ccd758 in doris::Arena::alloc(unsigned long) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/core/arena.h:148:9
       #6 0x55e8cce8b118 in doris::PredicateColumnType<(doris::PrimitiveType)23>::insert_duplicate_fields(doris::Field const&, unsigned long) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/core/column/predicate_column.h:325:32
       #7 0x55e8b7db4e83 in doris::ColumnNullable::insert_duplicate_fields(doris::Field const&, unsigned long) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/core/column/column_nullable.cpp:357:29
       #8 0x55e8ccf8ba2c in doris::segment_v2::DefaultValueColumnIterator::_insert_many_default(doris::COW<doris::IColumn>::mutable_ptr<doris::IColumn>&, unsigned long) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/segment/column_reader.cpp:2167:14
       #9 0x55e8ccf3c705 in doris::segment_v2::DefaultValueColumnIterator::next_batch(unsigned long*, doris::COW<doris::IColumn>::mutable_ptr<doris::IColumn>&, bool*) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/segment/column_reader.cpp:2152:5
       #10 0x55e8cd4f9313 in doris::segment_v2::ColumnIterator::next_batch(unsigned long*, doris::COW<doris::IColumn>::mutable_ptr<doris::IColumn>&) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/segment/column_reader.h:330:16
       #11 0x55e8cd4f9313 in doris::segment_v2::SegmentIterator::_read_columns_by_index(unsigned int, unsigned short&) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/segment/segment_iterator.cpp:2291:13
       #12 0x55e8cd50621b in doris::segment_v2::SegmentIterator::_next_batch_internal(doris::Block*) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/segment/segment_iterator.cpp:2643:5
       #13 0x55e8cd4a0b82 in doris::segment_v2::SegmentIterator::next_batch(doris::Block*)::$_0::operator()() const /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/segment/segment_iterator.cpp:2519:9
       #14 0x55e8cd4a0b82 in doris::segment_v2::SegmentIterator::next_batch(doris::Block*) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/segment/segment_iterator.cpp:2518:19
       #15 0x55e8cd37cca1 in doris::segment_v2::LazyInitSegmentIterator::next_batch(doris::Block*) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/segment/lazy_init_segment_iterator.h:46:33
       #16 0x55e8cccc0b05 in doris::Status doris::BetaRowsetReader::_next_batch<doris::Block>(doris::Block*) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/rowset/beta_rowset_reader.h:113:35
       #17 0x55e8ccc98668 in doris::BetaRowsetReader::next_batch(doris::Block*) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/rowset/beta_rowset_reader.h:56:55
       #18 0x55e8ca62ee8f in doris::VCollectIterator::Level0Iterator::_refresh() /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/iterator/vcollect_iterator.h
       #19 0x55e8ca611036 in doris::VCollectIterator::Level0Iterator::refresh_current_row() /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/iterator/vcollect_iterator.cpp:523:24
       #20 0x55e8ca601a08 in doris::VCollectIterator::Level0Iterator::ensure_first_row_ref() /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/iterator/vcollect_iterator.cpp:496:14
       #21 0x55e8ca604ea2 in doris::VCollectIterator::Level1Iterator::ensure_first_row_ref() /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/iterator/vcollect_iterator.cpp:713:27
       #22 0x55e8ca608b20 in doris::VCollectIterator::build_heap(std::vector<std::shared_ptr<doris::RowsetReader>, std::allocator<std::shared_ptr<doris::RowsetReader>>>&) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/iterator/vcollect_iterator.cpp:189:9
       #23 0x55e8ca5dc1ae in doris::BlockReader::_init_collect_iter(doris::TabletReader::ReaderParams const&) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/iterator/block_reader.cpp:152:9
       #24 0x55e8ca5d7b9d in doris::BlockReader::init(doris::TabletReader::ReaderParams const&) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/storage/iterator/block_reader.cpp:226:19
       #25 0x55e8d02df6d6 in doris::OlapScanner::_open_impl(doris::RuntimeState*) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/exec/scan/olap_scanner.cpp:317:32
       #26 0x55e8d02cd697 in doris::Scanner::open(doris::RuntimeState*) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/exec/scan/scanner.h:80:16
       #27 0x55e8d02b576a in doris::ScannerScheduler::_scanner_scan(std::shared_ptr<doris::ScannerContext>, std::shared_ptr<doris::ScanTask>) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/exec/scan/scanner_scheduler.cpp:185:5
       #28 0x55e8d02bf603 in doris::ScannerScheduler::submit(std::shared_ptr<doris::ScannerContext>, std::shared_ptr<doris::ScanTask>)::$_0::operator()() const::'lambda'()::operator()() const::'lambda'()::operator()() const /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/exec/scan/scanner_scheduler.cpp:75:17
       #29 0x55e8d02bf603 in doris::ScannerScheduler::submit(std::shared_ptr<doris::ScannerContext>, std::shared_ptr<doris::ScanTask>)::$_0::operator()() const::'lambda'()::operator()() const /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/exec/scan/scanner_scheduler.cpp:74:27
       #30 0x55e8d02bf603 in bool std::__invoke_impl<bool, doris::ScannerScheduler::submit(std::shared_ptr<doris::ScannerContext>, std::shared_ptr<doris::ScanTask>)::$_0::operator()() const::'lambda'()&>(std::__invoke_other, doris::ScannerScheduler::submit(std::shared_ptr<doris::ScannerContext>, std::shared_ptr<doris::ScanTask>)::$_0::operator()() const::'lambda'()&) /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/invoke.h:63:14
       #31 0x55e8d02bf603 in std::enable_if<is_invocable_r_v<bool, doris::ScannerScheduler::submit(std::shared_ptr<doris::ScannerContext>, std::shared_ptr<doris::ScanTask>)::$_0::operator()() const::'lambda'()&>, bool>::type std::__invoke_r<bool, doris::ScannerScheduler::submit(std::shared_ptr<doris::ScannerContext>, std::shared_ptr<doris::ScanTask>)::$_0::operator()() const::'lambda'()&>(doris::ScannerScheduler::submit(std::shared_ptr<doris::ScannerContext>, std::shared_ptr<doris::ScanTask>)::$_0::operator()() const::'lambda'()&) /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/invoke.h:116:9
       #32 0x55e8d02bf603 in std::_Function_handler<bool (), doris::ScannerScheduler::submit(std::shared_ptr<doris::ScannerContext>, std::shared_ptr<doris::ScanTask>)::$_0::operator()() const::'lambda'()>::_M_invoke(std::_Any_data const&) /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/std_function.h:292:9
       #33 0x55e8d02bed85 in std::function<bool ()>::operator()() const /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/std_function.h:593:9
       #34 0x55e8d02bed85 in doris::ScannerSplitRunner::process_for(std::chrono::duration<long, std::ratio<1l, 1000000000l>>) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/exec/scan/scanner_scheduler.cpp:425:25
       #35 0x55e8d02aa844 in doris::PrioritizedSplitRunner::process() /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/exec/scan/task_executor/time_sharing/prioritized_split_runner.cpp:102:35
       #36 0x55e8d0272674 in doris::TimeSharingTaskExecutor::_dispatch_thread() /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/exec/scan/task_executor/time_sharing/time_sharing_task_executor.cpp:556:77
       #37 0x55e8d3fa8ad1 in std::function<void ()>::operator()() const /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/std_function.h:593:9
       #38 0x55e8d3fa8ad1 in doris::Thread::supervise_thread(void*) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/util/thread.cpp:460:5
   
   Thread T620 (ls_normal [work) created by T0 here:
       #0 0x55e8b71c5e91 in pthread_create (/mnt/hdd01/PERFORMANCE_ENV/be/lib/doris_be+0x2203de91)
       #1 0x55e8d3fa7b8a in doris::Thread::start_thread(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::function<void ()> const&, std::shared_ptr<doris::Thread>*) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/util/thread.cpp:412:15
       #2 0x55e8d02849fd in doris::Status doris::Thread::create<void (doris::TimeSharingTaskExecutor::*)(), doris::TimeSharingTaskExecutor*>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (doris::TimeSharingTaskExecutor::* const&)(), doris::TimeSharingTaskExecutor* const&, std::shared_ptr<doris::Thread>*) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/util/thread.h:47:16
       #3 0x55e8d026e6b3 in doris::TimeSharingTaskExecutor::_create_thread() /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/exec/scan/task_executor/time_sharing/time_sharing_task_executor.cpp:671:12
       #4 0x55e8d026b628 in doris::TimeSharingTaskExecutor::_try_create_thread(int, std::lock_guard<std::mutex>&) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/exec/scan/task_executor/time_sharing/time_sharing_task_executor.cpp:360:25
       #5 0x55e8d026967a in doris::TimeSharingTaskExecutor::init() /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/exec/scan/task_executor/time_sharing/time_sharing_task_executor.cpp:221:27
       #6 0x55e8d025a85a in doris::TaskExecutorSimplifiedScanScheduler::start(int, int, int, int) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/exec/scan/scanner_scheduler.h:288:9
       #7 0x55e8d368d649 in doris::WorkloadGroup::upsert_thread_pool_no_lock(doris::WorkloadGroupInfo*, std::shared_ptr<doris::CgroupCpuCtl>) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/runtime/workload_group/workload_group.cpp:571:38
       #8 0x55e8d368f14d in doris::WorkloadGroup::upsert_task_scheduler(doris::WorkloadGroupInfo*) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/runtime/workload_group/workload_group.cpp:667:12
       #9 0x55e8d36bd223 in doris::WorkloadGroupMgr::create_internal_wg() /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/runtime/workload_group/workload_group_manager.cpp:900:5
       #10 0x55e8d32bbd3d in doris::ExecEnv::_create_internal_workload_group() /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/runtime/exec_env_init.cpp:475:5
       #11 0x55e8d32b27fc in doris::ExecEnv::_init(std::vector<doris::StorePath, std::allocator<doris::StorePath>> const&, std::vector<doris::StorePath, std::allocator<doris::StorePath>> const&, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/runtime/exec_env_init.cpp:424:5
       #12 0x55e8d32ad7ec in doris::ExecEnv::init(doris::ExecEnv*, std::vector<doris::StorePath, std::allocator<doris::StorePath>> const&, std::vector<doris::StorePath, std::allocator<doris::StorePath>> const&, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&) /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/runtime/exec_env_init.cpp:199:17
       #13 0x55e8b722cc8b in main /mnt/disk3/pipeline/repo/selectdb-core_master/selectdb-core/be/src/service/doris_main.cpp:531:14
       #14 0x7f539b7cad8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
   
   ### Check List (For Author)
   
   - Test <!-- At least one of them must be included. -->
       - [ ] Regression test
       - [ ] Unit Test
       - [ ] Manual test (add detailed scripts or steps below)
       - [ ] No need to test or manual test. Explain why:
           - [ ] This is a refactor/code format and no logic has been changed.
           - [ ] Previous test can cover this change.
           - [ ] No code files have been changed.
           - [ ] Other reason <!-- Add your reason?  -->
   
   - Behavior changed:
       - [ ] No.
       - [ ] Yes. <!-- Explain the behavior change -->
   
   - Does this need documentation?
       - [ ] No.
       - [ ] Yes. <!-- Add document PR link here. eg: https://github.com/apache/doris-website/pull/1214 -->
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label <!-- Add branch pick label that this PR should merge into -->
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](column) Fix incorrect for-loop [doris]

Posted by "Gabriel39 (via GitHub)" <gi...@apache.org>.
Gabriel39 commented on PR #62517:
URL: https://github.com/apache/doris/pull/62517#issuecomment-4256830278

   /review


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](column) Fix incorrect for-loop [doris]

Posted by "Gabriel39 (via GitHub)" <gi...@apache.org>.
Gabriel39 commented on PR #62517:
URL: https://github.com/apache/doris/pull/62517#issuecomment-4249911924

   /review


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](column) Fix incorrect for-loop [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #62517:
URL: https://github.com/apache/doris/pull/62517#issuecomment-4254164129

   # BE Regression && UT Coverage Report
   Increment line coverage `100.00% (1/1)` :tada:
   
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/62517_c8ab680769fd9240bf0007da9a7e498688ba55c3_merge/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/62517_c8ab680769fd9240bf0007da9a7e498688ba55c3_merge/report/index.html)
   | Category          | Coverage           |
   |-------------------|--------------------|
   | Function Coverage | 73.68% (27410/37203) |
   | Line Coverage     | 57.36% (296344/516606) |
   | Region Coverage   | 54.75% (247621/452275) |
   | Branch Coverage   | 56.32% (107155/190248) |


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](column) Fix incorrect for-loop [doris]

Posted by "Gabriel39 (via GitHub)" <gi...@apache.org>.
Gabriel39 commented on PR #62517:
URL: https://github.com/apache/doris/pull/62517#issuecomment-4258114208

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](column) Fix incorrect for-loop [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #62517:
URL: https://github.com/apache/doris/pull/62517#issuecomment-4250280623

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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](column) Fix incorrect for-loop [doris]

Posted by "utafrali (via GitHub)" <gi...@apache.org>.
utafrali commented on code in PR #62517:
URL: https://github.com/apache/doris/pull/62517#discussion_r3084545914


##########
be/test/core/column/column_nullable_test.cpp:
##########
@@ -206,4 +206,66 @@ TEST(ColumnNullableTest, ScalaTypeNullStringTest2erase) {
     }
 }
 
+TEST(PredicateColumnTest, InsertDuplicateFieldsString) {
+    auto column = PredicateColumnType<TYPE_STRING>::create();
+    column->reserve(10);
+
+    // Test with a simple string - insert 5 duplicates
+    std::string test_str = "hello";
+    Field field = Field::create_field<TYPE_STRING>(test_str);
+    column->insert_duplicate_fields(field, 5);
+
+    EXPECT_EQ(column->size(), 5);
+    for (size_t i = 0; i < 5; i++) {
+        StringRef ref = column->get_data()[i];
+        EXPECT_EQ(ref.size, test_str.size());
+        EXPECT_EQ(std::string(ref.data, ref.size), test_str);
+    }
+
+    // Insert another batch to verify memory doesn't overlap
+    std::string str2 = "world";
+    Field field2 = Field::create_field<TYPE_STRING>(str2);
+    column->insert_duplicate_fields(field2, 3);
+
+    EXPECT_EQ(column->size(), 8);
+    // Verify first batch is still correct
+    for (size_t i = 0; i < 5; i++) {
+        StringRef ref = column->get_data()[i];
+        EXPECT_EQ(std::string(ref.data, ref.size), test_str);
+    }
+    // Verify second batch
+    for (size_t i = 5; i < 8; i++) {
+        StringRef ref = column->get_data()[i];
+        EXPECT_EQ(std::string(ref.data, ref.size), str2);
+    }
+}
+
+TEST(PredicateColumnTest, InsertDuplicateFieldsInt) {
+    auto column = PredicateColumnType<TYPE_INT>::create();
+    column->reserve(10);
+
+    Int32 val = 42;
+    Field field = Field::create_field<TYPE_INT>(val);
+    column->insert_duplicate_fields(field, 5);
+
+    EXPECT_EQ(column->size(), 5);
+    for (size_t i = 0; i < 5; i++) {
+        EXPECT_EQ(column->get_data()[i], 42);
+    }
+}
+
+TEST(PredicateColumnTest, InsertDuplicateFieldsLargeInt) {
+    auto column = PredicateColumnType<TYPE_LARGEINT>::create();
+    column->reserve(10);
+
+    Int128 val = Int128(123456789012345LL) * Int128(1000000000LL);
+    Field field = Field::create_field<TYPE_LARGEINT>(val);
+    column->insert_duplicate_fields(field, 3);
+
+    EXPECT_EQ(column->size(), 3);
+    for (size_t i = 0; i < 3; i++) {
+        EXPECT_EQ(column->get_data()[i], val);
+    }
+}
+
 } // namespace doris

Review Comment:
   Missing newline at end of file. The diff shows `\ No newline at end of file` on the closing brace. Most editors and CI linters flag this; add a trailing newline to stay consistent with the rest of the file.



##########
be/test/core/column/column_nullable_test.cpp:
##########
@@ -206,4 +206,66 @@ TEST(ColumnNullableTest, ScalaTypeNullStringTest2erase) {
     }
 }
 
+TEST(PredicateColumnTest, InsertDuplicateFieldsString) {

Review Comment:
   These three tests use `PredicateColumnTest` as the suite name but live inside `column_nullable_test.cpp`. They are testing `PredicateColumnType` directly, not `ColumnNullable`. Consider moving them to a dedicated `predicate_column_test.cpp` to keep test organization consistent with the class under test.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](column) Fix incorrect for-loop [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #62517:
URL: https://github.com/apache/doris/pull/62517#issuecomment-4251435030

   # BE UT Coverage Report
   Increment line coverage `100.00% (1/1)` :tada:
   
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/637a72ada256049592d50b4af5ee74909f7fcb41_637a72ada256049592d50b4af5ee74909f7fcb41/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/637a72ada256049592d50b4af5ee74909f7fcb41_637a72ada256049592d50b4af5ee74909f7fcb41/report/index.html)
   | Category          | Coverage           |
   |-------------------|--------------------|
   | Function Coverage | 53.09% (20179/38008) |
   | Line Coverage     | 36.66% (190016/518251) |
   | Region Coverage   | 32.92% (147533/448172) |
   | Branch Coverage   | 34.05% (64581/189674) |


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](column) Fix incorrect for-loop [doris]

Posted by "Gabriel39 (via GitHub)" <gi...@apache.org>.
Gabriel39 commented on PR #62517:
URL: https://github.com/apache/doris/pull/62517#issuecomment-4258154826

   /review


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](column) Fix incorrect for-loop [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #62517:
URL: https://github.com/apache/doris/pull/62517#discussion_r3091666699


##########
be/test/core/column/predicate_column_test.cpp:
##########
@@ -0,0 +1,1100 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#include "core/column/predicate_column.h"
+
+#include <gtest/gtest-message.h>
+#include <gtest/gtest-test-part.h>
+#include <gtest/gtest.h>
+
+#include "common/status.h"
+#include "core/column/column_decimal.h"
+#include "core/column/column_nullable.h"
+#include "core/data_type/data_type.h"
+#include "core/data_type/data_type_number.h"
+#include "core/data_type/define_primitive_type.h"
+#include "core/decimal12.h"
+#include "core/field.h"
+#include "core/types.h"
+#include "core/uint24.h"
+#include "core/value/vdatetime_value.h"
+#include "testutil/column_helper.h"
+
+namespace doris {
+
+// ============================================================================
+// Test size() for all types
+// ============================================================================
+TEST(PredicateColumnTest, SizeBoolean) {
+    auto col = PredicateColumnType<TYPE_BOOLEAN>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 2);
+}
+
+TEST(PredicateColumnTest, SizeTinyInt) {
+    auto col = PredicateColumnType<TYPE_TINYINT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+// MORE_TESTS_PLACEHOLDER_1

Review Comment:
   This placeholder comment was committed into the permanent test file. Since this is now part of the regression suite, please remove the `MORE_TESTS_PLACEHOLDER_*` scaffolding instead of shipping generated markers in the checked-in test source.



##########
be/test/core/column/predicate_column_test.cpp:
##########
@@ -0,0 +1,1100 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#include "core/column/predicate_column.h"
+
+#include <gtest/gtest-message.h>
+#include <gtest/gtest-test-part.h>
+#include <gtest/gtest.h>
+
+#include "common/status.h"
+#include "core/column/column_decimal.h"
+#include "core/column/column_nullable.h"
+#include "core/data_type/data_type.h"
+#include "core/data_type/data_type_number.h"
+#include "core/data_type/define_primitive_type.h"
+#include "core/decimal12.h"
+#include "core/field.h"
+#include "core/types.h"
+#include "core/uint24.h"
+#include "core/value/vdatetime_value.h"
+#include "testutil/column_helper.h"
+
+namespace doris {
+
+// ============================================================================
+// Test size() for all types
+// ============================================================================
+TEST(PredicateColumnTest, SizeBoolean) {
+    auto col = PredicateColumnType<TYPE_BOOLEAN>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 2);
+}
+
+TEST(PredicateColumnTest, SizeTinyInt) {
+    auto col = PredicateColumnType<TYPE_TINYINT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+// MORE_TESTS_PLACEHOLDER_1
+
+TEST(PredicateColumnTest, SizeSmallInt) {
+    auto col = PredicateColumnType<TYPE_SMALLINT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeBigInt) {
+    auto col = PredicateColumnType<TYPE_BIGINT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeLargeInt) {
+    auto col = PredicateColumnType<TYPE_LARGEINT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeFloat) {
+    auto col = PredicateColumnType<TYPE_FLOAT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDouble) {
+    auto col = PredicateColumnType<TYPE_DOUBLE>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDate) {
+    auto col = PredicateColumnType<TYPE_DATE>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDateV2) {
+    auto col = PredicateColumnType<TYPE_DATEV2>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDateTime) {
+    auto col = PredicateColumnType<TYPE_DATETIME>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDateTimeV2) {
+    auto col = PredicateColumnType<TYPE_DATETIMEV2>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeChar) {
+    auto col = PredicateColumnType<TYPE_CHAR>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeVarchar) {
+    auto col = PredicateColumnType<TYPE_VARCHAR>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDecimalV2) {
+    auto col = PredicateColumnType<TYPE_DECIMALV2>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDecimal32) {
+    auto col = PredicateColumnType<TYPE_DECIMAL32>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDecimal64) {
+    auto col = PredicateColumnType<TYPE_DECIMAL64>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDecimal128I) {
+    auto col = PredicateColumnType<TYPE_DECIMAL128I>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDecimal256) {
+    auto col = PredicateColumnType<TYPE_DECIMAL256>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeIPv4) {
+    auto col = PredicateColumnType<TYPE_IPV4>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeIPv6) {
+    auto col = PredicateColumnType<TYPE_IPV6>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+// ============================================================================
+// Test insert_data() for all types
+// ============================================================================
+TEST(PredicateColumnTest, InsertDataBoolean) {
+    auto col = PredicateColumnType<TYPE_BOOLEAN>::create();
+    col->reserve(3);
+    UInt8 vals[] = {0, 1, 1};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], 0);
+    EXPECT_EQ(col->get_data()[1], 1);
+    EXPECT_EQ(col->get_data()[2], 1);
+}
+
+TEST(PredicateColumnTest, InsertDataTinyInt) {
+    auto col = PredicateColumnType<TYPE_TINYINT>::create();
+    col->reserve(3);
+    Int8 vals[] = {-128, 0, 127};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], -128);
+    EXPECT_EQ(col->get_data()[1], 0);
+    EXPECT_EQ(col->get_data()[2], 127);
+}
+
+TEST(PredicateColumnTest, InsertDataSmallInt) {
+    auto col = PredicateColumnType<TYPE_SMALLINT>::create();
+    col->reserve(3);
+    Int16 vals[] = {-32768, 0, 32767};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], -32768);
+    EXPECT_EQ(col->get_data()[1], 0);
+    EXPECT_EQ(col->get_data()[2], 32767);
+}
+
+TEST(PredicateColumnTest, InsertDataInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    col->reserve(3);
+    Int32 vals[] = {INT32_MIN, 0, INT32_MAX};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], INT32_MIN);
+    EXPECT_EQ(col->get_data()[1], 0);
+    EXPECT_EQ(col->get_data()[2], INT32_MAX);
+}
+
+TEST(PredicateColumnTest, InsertDataBigInt) {
+    auto col = PredicateColumnType<TYPE_BIGINT>::create();
+    col->reserve(3);
+    Int64 vals[] = {INT64_MIN, 0, INT64_MAX};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], INT64_MIN);
+    EXPECT_EQ(col->get_data()[1], 0);
+    EXPECT_EQ(col->get_data()[2], INT64_MAX);
+}
+
+TEST(PredicateColumnTest, InsertDataLargeInt) {
+    auto col = PredicateColumnType<TYPE_LARGEINT>::create();
+    col->reserve(3);
+    Int128 vals[] = {-(Int128(1) << 100), Int128(0), Int128(1) << 100};
+    for (auto& v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], vals[0]);
+    EXPECT_EQ(col->get_data()[1], vals[1]);
+    EXPECT_EQ(col->get_data()[2], vals[2]);
+}
+
+TEST(PredicateColumnTest, InsertDataFloat) {
+    auto col = PredicateColumnType<TYPE_FLOAT>::create();
+    col->reserve(3);
+    Float32 vals[] = {-3.14f, 0.0f, 2.718f};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_FLOAT_EQ(col->get_data()[0], -3.14f);
+    EXPECT_FLOAT_EQ(col->get_data()[1], 0.0f);
+    EXPECT_FLOAT_EQ(col->get_data()[2], 2.718f);
+}
+
+TEST(PredicateColumnTest, InsertDataDouble) {
+    auto col = PredicateColumnType<TYPE_DOUBLE>::create();
+    col->reserve(3);
+    Float64 vals[] = {-3.14159265358979, 0.0, 2.71828182845904};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_DOUBLE_EQ(col->get_data()[0], -3.14159265358979);
+    EXPECT_DOUBLE_EQ(col->get_data()[1], 0.0);
+    EXPECT_DOUBLE_EQ(col->get_data()[2], 2.71828182845904);
+}
+
+TEST(PredicateColumnTest, InsertDataDateV2) {
+    auto col = PredicateColumnType<TYPE_DATEV2>::create();
+    col->reserve(3);
+    uint32_t vals[] = {20230115, 20230620, 20231231};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+}
+
+TEST(PredicateColumnTest, InsertDataDateTimeV2) {
+    auto col = PredicateColumnType<TYPE_DATETIMEV2>::create();
+    col->reserve(3);
+    uint64_t vals[] = {1234567890123ULL, 2345678901234ULL, 3456789012345ULL};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+}
+
+TEST(PredicateColumnTest, InsertDataString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(3);
+    std::string s1 = "hello";
+    std::string s2 = "world";
+    std::string s3 = "";
+    col->insert_data(s1.data(), s1.size());
+    col->insert_data(s2.data(), s2.size());
+    col->insert_data(s3.data(), s3.size());
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(std::string(col->get_data()[0].data, col->get_data()[0].size), "hello");
+    EXPECT_EQ(std::string(col->get_data()[1].data, col->get_data()[1].size), "world");
+    EXPECT_EQ(col->get_data()[2].size, 0);
+}
+
+TEST(PredicateColumnTest, InsertDataDecimal32) {
+    auto col = PredicateColumnType<TYPE_DECIMAL32>::create();
+    col->reserve(3);
+    Decimal32 vals[] = {Decimal32(12345), Decimal32(-67890), Decimal32(0)};
+    for (auto& v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], Decimal32(12345));
+    EXPECT_EQ(col->get_data()[1], Decimal32(-67890));
+    EXPECT_EQ(col->get_data()[2], Decimal32(0));
+}
+
+TEST(PredicateColumnTest, InsertDataDecimal64) {
+    auto col = PredicateColumnType<TYPE_DECIMAL64>::create();
+    col->reserve(3);
+    Decimal64 vals[] = {Decimal64(Int64(123456789012LL)), Decimal64(Int64(-987654321098LL)),
+                        Decimal64(Int64(0))};
+    for (auto& v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], Decimal64(Int64(123456789012LL)));
+    EXPECT_EQ(col->get_data()[1], Decimal64(Int64(-987654321098LL)));
+    EXPECT_EQ(col->get_data()[2], Decimal64(Int64(0)));
+}
+
+TEST(PredicateColumnTest, InsertDataIPv4) {
+    auto col = PredicateColumnType<TYPE_IPV4>::create();
+    col->reserve(3);
+    IPv4 vals[] = {IPv4(0x7F000001), IPv4(0xC0A80001), IPv4(0x00000000)};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], IPv4(0x7F000001));
+    EXPECT_EQ(col->get_data()[1], IPv4(0xC0A80001));
+    EXPECT_EQ(col->get_data()[2], IPv4(0x00000000));
+}
+
+TEST(PredicateColumnTest, InsertDataIPv6) {
+    auto col = PredicateColumnType<TYPE_IPV6>::create();
+    col->reserve(2);
+    IPv6 vals[] = {IPv6(1), IPv6(0)};
+    for (auto& v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 2);
+    EXPECT_EQ(col->get_data()[0], IPv6(1));
+    EXPECT_EQ(col->get_data()[1], IPv6(0));
+}
+
+// MORE_TESTS_PLACEHOLDER_2
+
+// ============================================================================
+// Test insert_many_fix_len_data() for numeric types
+// ============================================================================
+TEST(PredicateColumnTest, InsertManyFixLenDataInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    col->reserve(5);
+    Int32 vals[] = {1, 2, 3, 4, 5};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 5);
+    EXPECT_EQ(col->size(), 5);
+    for (int i = 0; i < 5; i++) {
+        EXPECT_EQ(col->get_data()[i], i + 1);
+    }
+}
+
+TEST(PredicateColumnTest, InsertManyFixLenDataBigInt) {
+    auto col = PredicateColumnType<TYPE_BIGINT>::create();
+    col->reserve(3);
+    Int64 vals[] = {100000000000LL, 200000000000LL, 300000000000LL};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 3);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], 100000000000LL);
+    EXPECT_EQ(col->get_data()[1], 200000000000LL);
+    EXPECT_EQ(col->get_data()[2], 300000000000LL);
+}
+
+TEST(PredicateColumnTest, InsertManyFixLenDataFloat) {
+    auto col = PredicateColumnType<TYPE_FLOAT>::create();
+    col->reserve(3);
+    Float32 vals[] = {1.1f, 2.2f, 3.3f};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 3);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_FLOAT_EQ(col->get_data()[0], 1.1f);
+    EXPECT_FLOAT_EQ(col->get_data()[1], 2.2f);
+    EXPECT_FLOAT_EQ(col->get_data()[2], 3.3f);
+}
+
+TEST(PredicateColumnTest, InsertManyFixLenDataDouble) {
+    auto col = PredicateColumnType<TYPE_DOUBLE>::create();
+    col->reserve(3);
+    Float64 vals[] = {1.11, 2.22, 3.33};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 3);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_DOUBLE_EQ(col->get_data()[0], 1.11);
+    EXPECT_DOUBLE_EQ(col->get_data()[1], 2.22);
+    EXPECT_DOUBLE_EQ(col->get_data()[2], 3.33);
+}
+
+TEST(PredicateColumnTest, InsertManyFixLenDataDateV2) {
+    auto col = PredicateColumnType<TYPE_DATEV2>::create();
+    col->reserve(3);
+    uint32_t vals[] = {20230115, 20230620, 20231231};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 3);
+    EXPECT_EQ(col->size(), 3);
+}
+
+TEST(PredicateColumnTest, InsertManyFixLenDataDateTimeV2) {
+    auto col = PredicateColumnType<TYPE_DATETIMEV2>::create();
+    col->reserve(3);
+    uint64_t vals[] = {1234567890123ULL, 2345678901234ULL, 3456789012345ULL};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 3);
+    EXPECT_EQ(col->size(), 3);
+}
+
+TEST(PredicateColumnTest, InsertManyFixLenDataDecimal32) {
+    auto col = PredicateColumnType<TYPE_DECIMAL32>::create();
+    col->reserve(3);
+    Decimal32 vals[] = {Decimal32(100), Decimal32(200), Decimal32(300)};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 3);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], Decimal32(100));
+    EXPECT_EQ(col->get_data()[1], Decimal32(200));
+    EXPECT_EQ(col->get_data()[2], Decimal32(300));
+}
+
+TEST(PredicateColumnTest, InsertManyFixLenDataDecimal64) {
+    auto col = PredicateColumnType<TYPE_DECIMAL64>::create();
+    col->reserve(3);
+    Decimal64 vals[] = {Decimal64(Int64(1000)), Decimal64(Int64(2000)), Decimal64(Int64(3000))};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 3);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], Decimal64(Int64(1000)));
+    EXPECT_EQ(col->get_data()[1], Decimal64(Int64(2000)));
+    EXPECT_EQ(col->get_data()[2], Decimal64(Int64(3000)));
+}
+
+TEST(PredicateColumnTest, InsertManyFixLenDataIPv4) {
+    auto col = PredicateColumnType<TYPE_IPV4>::create();
+    col->reserve(3);
+    IPv4 vals[] = {IPv4(1), IPv4(2), IPv4(3)};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 3);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], IPv4(1));
+    EXPECT_EQ(col->get_data()[1], IPv4(2));
+    EXPECT_EQ(col->get_data()[2], IPv4(3));
+}
+
+// ============================================================================
+// Test insert_many_date() for TYPE_DATE
+// ============================================================================
+TEST(PredicateColumnTest, InsertManyDate) {
+    auto col = PredicateColumnType<TYPE_DATE>::create();
+    col->reserve(3);
+    uint24_t date_vals[3];
+    date_vals[0] = (2023 << 9) | (1 << 5) | 15;
+    date_vals[1] = (2023 << 9) | (6 << 5) | 20;
+    date_vals[2] = (2023 << 9) | (12 << 5) | 31;
+    col->insert_many_date(reinterpret_cast<const char*>(date_vals), 3);
+    EXPECT_EQ(col->size(), 3);
+}
+
+// ============================================================================
+// Test insert_many_datetime() for TYPE_DATETIME
+// ============================================================================
+TEST(PredicateColumnTest, InsertManyDateTime) {
+    auto col = PredicateColumnType<TYPE_DATETIME>::create();
+    col->reserve(3);
+    uint64_t datetime_vals[] = {20230115120000ULL, 20230620153045ULL, 20231231235959ULL};
+    col->insert_many_datetime(reinterpret_cast<const char*>(datetime_vals), 3);
+    EXPECT_EQ(col->size(), 3);
+}
+
+// ============================================================================
+// Test insert_many_decimalv2() for TYPE_DECIMALV2
+// ============================================================================
+TEST(PredicateColumnTest, InsertManyDecimalV2) {
+    auto col = PredicateColumnType<TYPE_DECIMALV2>::create();
+    col->reserve(3);
+    decimal12_t decimals[3];
+    decimals[0].integer = 123;
+    decimals[0].fraction = 456000000;
+    decimals[1].integer = -789;
+    decimals[1].fraction = 123000000;
+    decimals[2].integer = 0;
+    decimals[2].fraction = 999000000;
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(decimals), 3);
+    EXPECT_EQ(col->size(), 3);
+}
+
+// ============================================================================
+// Test insert_many_strings() for string types
+// ============================================================================
+TEST(PredicateColumnTest, InsertManyStringsString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(5);
+    StringRef strings[] = {StringRef("one", 3), StringRef("two", 3), StringRef("three", 5)};
+    col->insert_many_strings(strings, 3);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(std::string(col->get_data()[0].data, col->get_data()[0].size), "one");
+    EXPECT_EQ(std::string(col->get_data()[1].data, col->get_data()[1].size), "two");
+    EXPECT_EQ(std::string(col->get_data()[2].data, col->get_data()[2].size), "three");
+}
+
+TEST(PredicateColumnTest, InsertManyStringsVarchar) {
+    auto col = PredicateColumnType<TYPE_VARCHAR>::create();
+    col->reserve(3);
+    StringRef strings[] = {StringRef("abc", 3), StringRef("defgh", 5)};
+    col->insert_many_strings(strings, 2);
+    EXPECT_EQ(col->size(), 2);
+    EXPECT_EQ(std::string(col->get_data()[0].data, col->get_data()[0].size), "abc");
+    EXPECT_EQ(std::string(col->get_data()[1].data, col->get_data()[1].size), "defgh");
+}
+
+TEST(PredicateColumnTest, InsertManyStringsChar) {
+    auto col = PredicateColumnType<TYPE_CHAR>::create();
+    col->reserve(3);
+    StringRef strings[] = {StringRef("ab", 2), StringRef("cd", 2)};
+    col->insert_many_strings(strings, 2);
+    EXPECT_EQ(col->size(), 2);
+}
+
+TEST(PredicateColumnTest, InsertManyStringsEmpty) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(3);
+    col->insert_many_strings(nullptr, 0);
+    EXPECT_EQ(col->size(), 0);
+}
+
+// ============================================================================
+// Test insert_many_continuous_binary_data() for string types
+// ============================================================================
+TEST(PredicateColumnTest, InsertManyContinuousBinaryDataString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(3);
+    const char* data = "helloworld!";
+    uint32_t offsets[] = {0, 5, 10, 11};
+    col->insert_many_continuous_binary_data(data, offsets, 3);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(std::string(col->get_data()[0].data, col->get_data()[0].size), "hello");
+    EXPECT_EQ(std::string(col->get_data()[1].data, col->get_data()[1].size), "world");
+    EXPECT_EQ(std::string(col->get_data()[2].data, col->get_data()[2].size), "!");
+}
+
+TEST(PredicateColumnTest, InsertManyContinuousBinaryDataVarchar) {
+    auto col = PredicateColumnType<TYPE_VARCHAR>::create();
+    col->reserve(2);
+    const char* data = "abcdef";
+    uint32_t offsets[] = {0, 3, 6};
+    col->insert_many_continuous_binary_data(data, offsets, 2);
+    EXPECT_EQ(col->size(), 2);
+    EXPECT_EQ(std::string(col->get_data()[0].data, col->get_data()[0].size), "abc");
+    EXPECT_EQ(std::string(col->get_data()[1].data, col->get_data()[1].size), "def");
+}
+
+TEST(PredicateColumnTest, InsertManyContinuousBinaryDataEmpty) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(3);
+    const char* data = "test";
+    uint32_t offsets[] = {0};
+    col->insert_many_continuous_binary_data(data, offsets, 0);
+    EXPECT_EQ(col->size(), 0);
+}
+
+// ============================================================================
+// Test insert_many_dict_data() for string types
+// ============================================================================
+TEST(PredicateColumnTest, InsertManyDictDataString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(5);
+    StringRef dict[] = {StringRef("apple", 5), StringRef("banana", 6), StringRef("cherry", 6)};
+    int32_t codewords[] = {0, 1, 2, 0, 1};
+    col->insert_many_dict_data(codewords, 0, dict, 5, 3);
+    EXPECT_EQ(col->size(), 5);
+    EXPECT_EQ(std::string(col->get_data()[0].data, col->get_data()[0].size), "apple");
+    EXPECT_EQ(std::string(col->get_data()[1].data, col->get_data()[1].size), "banana");
+    EXPECT_EQ(std::string(col->get_data()[2].data, col->get_data()[2].size), "cherry");
+    EXPECT_EQ(std::string(col->get_data()[3].data, col->get_data()[3].size), "apple");
+    EXPECT_EQ(std::string(col->get_data()[4].data, col->get_data()[4].size), "banana");
+}
+
+TEST(PredicateColumnTest, InsertManyDictDataVarchar) {
+    auto col = PredicateColumnType<TYPE_VARCHAR>::create();
+    col->reserve(3);
+    StringRef dict[] = {StringRef("x", 1), StringRef("yy", 2)};
+    int32_t codewords[] = {0, 1, 0};
+    col->insert_many_dict_data(codewords, 0, dict, 3, 2);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(std::string(col->get_data()[0].data, col->get_data()[0].size), "x");
+    EXPECT_EQ(std::string(col->get_data()[1].data, col->get_data()[1].size), "yy");
+    EXPECT_EQ(std::string(col->get_data()[2].data, col->get_data()[2].size), "x");
+}
+
+// MORE_TESTS_PLACEHOLDER_3
+
+// ============================================================================
+// Test insert_duplicate_fields() for all types
+// ============================================================================
+TEST(PredicateColumnTest, InsertDuplicateFieldsString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(10);
+    std::string test_str = "hello";
+    Field field = Field::create_field<TYPE_STRING>(test_str);
+    col->insert_duplicate_fields(field, 5);
+    EXPECT_EQ(col->get_data()[col->size() - 1].data,
+              col->get_data()[0].data + (col->size() - 1) * test_str.size());
+    EXPECT_EQ(col->size(), 5);
+    for (size_t i = 0; i < 5; i++) {
+        StringRef ref = col->get_data()[i];
+        EXPECT_EQ(std::string(ref.data, ref.size), test_str);
+    }
+    // Insert another batch to verify memory doesn't overlap
+    std::string str2 = "world";
+    Field field2 = Field::create_field<TYPE_STRING>(str2);
+    col->insert_duplicate_fields(field2, 3);
+    EXPECT_EQ(col->size(), 8);
+    for (size_t i = 0; i < 5; i++) {
+        EXPECT_EQ(std::string(col->get_data()[i].data, col->get_data()[i].size), test_str);
+    }
+    for (size_t i = 5; i < 8; i++) {
+        EXPECT_EQ(std::string(col->get_data()[i].data, col->get_data()[i].size), str2);
+    }
+}
+
+TEST(PredicateColumnTest, InsertDuplicateFieldsInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    col->reserve(10);
+    Int32 val = 42;
+    Field field = Field::create_field<TYPE_INT>(val);
+    col->insert_duplicate_fields(field, 5);
+    EXPECT_EQ(col->size(), 5);
+    for (size_t i = 0; i < 5; i++) {
+        EXPECT_EQ(col->get_data()[i], 42);
+    }
+}
+
+TEST(PredicateColumnTest, InsertDuplicateFieldsLargeInt) {
+    auto col = PredicateColumnType<TYPE_LARGEINT>::create();
+    col->reserve(10);
+    Int128 val = Int128(123456789012345LL) * Int128(1000000000LL);
+    Field field = Field::create_field<TYPE_LARGEINT>(val);
+    col->insert_duplicate_fields(field, 3);
+    EXPECT_EQ(col->size(), 3);
+    for (size_t i = 0; i < 3; i++) {
+        EXPECT_EQ(col->get_data()[i], val);
+    }
+}
+
+TEST(PredicateColumnTest, InsertDuplicateFieldsZeroCount) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    col->reserve(5);
+    Int32 val = 42;
+    Field field = Field::create_field<TYPE_INT>(val);
+    col->insert_duplicate_fields(field, 0);
+    EXPECT_EQ(col->size(), 0);
+}
+
+// ============================================================================
+// Test insert_default() for all types
+// ============================================================================
+TEST(PredicateColumnTest, InsertDefaultInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    col->reserve(3);
+    col->insert_default();
+    col->insert_default();
+    EXPECT_EQ(col->size(), 2);
+    EXPECT_EQ(col->get_data()[0], 0);
+    EXPECT_EQ(col->get_data()[1], 0);
+}
+
+TEST(PredicateColumnTest, InsertDefaultDouble) {
+    auto col = PredicateColumnType<TYPE_DOUBLE>::create();
+    col->reserve(2);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+    EXPECT_DOUBLE_EQ(col->get_data()[0], 0.0);
+}
+
+TEST(PredicateColumnTest, InsertDefaultString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(2);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+    EXPECT_EQ(col->get_data()[0].size, 0);
+}
+
+// ============================================================================
+// Test clear() for all types
+// ============================================================================
+TEST(PredicateColumnTest, ClearInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    col->reserve(10);
+    Int32 val = 42;
+    col->insert_data(reinterpret_cast<const char*>(&val), sizeof(val));
+    col->insert_data(reinterpret_cast<const char*>(&val), sizeof(val));
+    EXPECT_EQ(col->size(), 2);
+    col->clear();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_data(reinterpret_cast<const char*>(&val), sizeof(val));
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, ClearString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(5);
+    std::string s = "test";
+    col->insert_data(s.data(), s.size());
+    EXPECT_EQ(col->size(), 1);
+    col->clear();
+    EXPECT_EQ(col->size(), 0);
+}
+
+// ============================================================================
+// Test reserve() for all types
+// ============================================================================
+TEST(PredicateColumnTest, ReserveInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    col->reserve(100);
+    EXPECT_EQ(col->size(), 0);
+    for (int i = 0; i < 100; i++) {
+        Int32 val = i;
+        col->insert_data(reinterpret_cast<const char*>(&val), sizeof(val));
+    }
+    EXPECT_EQ(col->size(), 100);
+}
+
+TEST(PredicateColumnTest, ReserveString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(50);
+    EXPECT_EQ(col->size(), 0);
+}
+
+// ============================================================================
+// Test byte_size() and allocated_bytes() for all types
+// ============================================================================
+TEST(PredicateColumnTest, ByteSizeInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    col->reserve(5);
+    EXPECT_EQ(col->byte_size(), 0);
+    Int32 val = 1;
+    col->insert_data(reinterpret_cast<const char*>(&val), sizeof(val));
+    EXPECT_EQ(col->byte_size(), sizeof(Int32));
+    col->insert_data(reinterpret_cast<const char*>(&val), sizeof(val));
+    EXPECT_EQ(col->byte_size(), 2 * sizeof(Int32));
+    EXPECT_EQ(col->allocated_bytes(), col->byte_size());
+}
+
+TEST(PredicateColumnTest, ByteSizeBigInt) {
+    auto col = PredicateColumnType<TYPE_BIGINT>::create();
+    col->reserve(3);
+    Int64 val = 12345;
+    col->insert_data(reinterpret_cast<const char*>(&val), sizeof(val));
+    col->insert_data(reinterpret_cast<const char*>(&val), sizeof(val));
+    col->insert_data(reinterpret_cast<const char*>(&val), sizeof(val));
+    EXPECT_EQ(col->byte_size(), 3 * sizeof(Int64));
+    EXPECT_EQ(col->allocated_bytes(), 3 * sizeof(Int64));
+}
+
+TEST(PredicateColumnTest, ByteSizeString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(3);
+    std::string s = "hello";
+    col->insert_data(s.data(), s.size());
+    EXPECT_EQ(col->byte_size(), sizeof(StringRef));
+}
+
+// ============================================================================
+// Test get_name() for all types
+// ============================================================================
+TEST(PredicateColumnTest, GetNameAllTypes) {
+    EXPECT_EQ(PredicateColumnType<TYPE_BOOLEAN>::create()->get_name(), "BOOL");
+    EXPECT_EQ(PredicateColumnType<TYPE_TINYINT>::create()->get_name(), "TINYINT");
+    EXPECT_EQ(PredicateColumnType<TYPE_SMALLINT>::create()->get_name(), "SMALLINT");
+    EXPECT_EQ(PredicateColumnType<TYPE_INT>::create()->get_name(), "INT");
+    EXPECT_EQ(PredicateColumnType<TYPE_BIGINT>::create()->get_name(), "BIGINT");
+    EXPECT_EQ(PredicateColumnType<TYPE_LARGEINT>::create()->get_name(), "LARGEINT");
+    EXPECT_EQ(PredicateColumnType<TYPE_FLOAT>::create()->get_name(), "FLOAT");
+    EXPECT_EQ(PredicateColumnType<TYPE_DOUBLE>::create()->get_name(), "DOUBLE");
+    EXPECT_EQ(PredicateColumnType<TYPE_DATE>::create()->get_name(), "DATE");
+    EXPECT_EQ(PredicateColumnType<TYPE_DATEV2>::create()->get_name(), "DATEV2");
+    EXPECT_EQ(PredicateColumnType<TYPE_DATETIME>::create()->get_name(), "DATETIME");
+    EXPECT_EQ(PredicateColumnType<TYPE_DATETIMEV2>::create()->get_name(), "DATETIMEV2");
+    EXPECT_EQ(PredicateColumnType<TYPE_CHAR>::create()->get_name(), "CHAR");
+    EXPECT_EQ(PredicateColumnType<TYPE_VARCHAR>::create()->get_name(), "VARCHAR");
+    EXPECT_EQ(PredicateColumnType<TYPE_STRING>::create()->get_name(), "STRING");
+    EXPECT_EQ(PredicateColumnType<TYPE_DECIMALV2>::create()->get_name(), "DECIMALV2");
+    EXPECT_EQ(PredicateColumnType<TYPE_DECIMAL32>::create()->get_name(), "DECIMAL32");
+    EXPECT_EQ(PredicateColumnType<TYPE_DECIMAL64>::create()->get_name(), "DECIMAL64");
+    EXPECT_EQ(PredicateColumnType<TYPE_DECIMAL128I>::create()->get_name(), "DECIMAL128I");
+    EXPECT_EQ(PredicateColumnType<TYPE_DECIMAL256>::create()->get_name(), "DECIMAL256");
+    EXPECT_EQ(PredicateColumnType<TYPE_IPV4>::create()->get_name(), "IPV4");
+    EXPECT_EQ(PredicateColumnType<TYPE_IPV6>::create()->get_name(), "IPV6");
+}
+
+// ============================================================================
+// Test clone_resized() for all types
+// ============================================================================
+TEST(PredicateColumnTest, CloneResizedInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    col->reserve(5);
+    Int32 val = 42;
+    col->insert_data(reinterpret_cast<const char*>(&val), sizeof(val));
+    auto cloned = col->clone_resized(0);
+    EXPECT_EQ(cloned->size(), 0);
+}
+
+TEST(PredicateColumnTest, CloneResizedString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(5);
+    std::string s = "test";
+    col->insert_data(s.data(), s.size());
+    auto cloned = col->clone_resized(0);
+    EXPECT_EQ(cloned->size(), 0);
+}
+
+// MORE_TESTS_PLACEHOLDER_4
+
+// ============================================================================
+// Test get_data_at() for string types
+// ============================================================================
+TEST(PredicateColumnTest, GetDataAtString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(3);
+    std::string s1 = "abc";
+    std::string s2 = "defgh";
+    col->insert_data(s1.data(), s1.size());
+    col->insert_data(s2.data(), s2.size());
+    StringRef ref0 = col->get_data_at(0);
+    StringRef ref1 = col->get_data_at(1);
+    EXPECT_EQ(std::string(ref0.data, ref0.size), "abc");
+    EXPECT_EQ(std::string(ref1.data, ref1.size), "defgh");
+}
+
+TEST(PredicateColumnTest, GetDataAtVarchar) {
+    auto col = PredicateColumnType<TYPE_VARCHAR>::create();
+    col->reserve(2);
+    std::string s1 = "test";
+    col->insert_data(s1.data(), s1.size());
+    StringRef ref = col->get_data_at(0);
+    EXPECT_EQ(std::string(ref.data, ref.size), "test");
+}
+
+TEST(PredicateColumnTest, GetDataAtCharTrimsSpaces) {
+    auto col = PredicateColumnType<TYPE_CHAR>::create();
+    col->reserve(2);
+    std::string s1 = "abc   ";
+    col->insert_data(s1.data(), s1.size());
+    StringRef ref = col->get_data_at(0);
+    EXPECT_EQ(ref.size, 6);

Review Comment:
   This assertion does not exercise the `TYPE_CHAR` behavior the test name describes. `PredicateColumnType<TYPE_CHAR>::get_data_at()` uses `strnlen`, so it trims trailing `\0`, not spaces. With `"abc   "` the expected size is still `6`, so the test passes even if the CHAR-specific branch is removed. Please use zero-padded input and assert the logical length shrinks accordingly.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](column) Fix incorrect for-loop [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #62517:
URL: https://github.com/apache/doris/pull/62517#issuecomment-4260365069

   # BE UT Coverage Report
   Increment line coverage `100.00% (1/1)` :tada:
   
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/384f223536e0975dfe11db7d9434c5e9b423a4db_384f223536e0975dfe11db7d9434c5e9b423a4db/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/384f223536e0975dfe11db7d9434c5e9b423a4db_384f223536e0975dfe11db7d9434c5e9b423a4db/report/index.html)
   | Category          | Coverage           |
   |-------------------|--------------------|
   | Function Coverage | 53.15% (20203/38008) |
   | Line Coverage     | 36.70% (190232/518290) |
   | Region Coverage   | 32.93% (147605/448221) |
   | Branch Coverage   | 34.08% (64642/189698) |


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](column) Fix incorrect for-loop [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #62517:
URL: https://github.com/apache/doris/pull/62517#issuecomment-4260388631

   # BE Regression && UT Coverage Report
   Increment line coverage `100.00% (1/1)` :tada:
   
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/62517_384f223536e0975dfe11db7d9434c5e9b423a4db_merge/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/62517_384f223536e0975dfe11db7d9434c5e9b423a4db_merge/report/index.html)
   | Category          | Coverage           |
   |-------------------|--------------------|
   | Function Coverage | 73.61% (27396/37217) |
   | Line Coverage     | 57.27% (295891/516672) |
   | Region Coverage   | 54.35% (245830/452331) |
   | Branch Coverage   | 56.06% (106655/190266) |


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](column) Fix incorrect for-loop [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #62517:
URL: https://github.com/apache/doris/pull/62517#discussion_r3090398423


##########
be/test/core/column/predicate_column_test.cpp:
##########
@@ -0,0 +1,1099 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#include "core/column/predicate_column.h"
+
+#include <gtest/gtest-message.h>
+#include <gtest/gtest-test-part.h>
+#include <gtest/gtest.h>
+
+#include "common/status.h"
+#include "core/column/column_decimal.h"
+#include "core/column/column_nullable.h"
+#include "core/data_type/data_type.h"
+#include "core/data_type/data_type_number.h"
+#include "core/data_type/define_primitive_type.h"
+#include "core/decimal12.h"
+#include "core/field.h"
+#include "core/types.h"
+#include "core/uint24.h"
+#include "core/value/vdatetime_value.h"
+#include "testutil/column_helper.h"
+
+namespace doris {
+
+// ============================================================================
+// Test size() for all types
+// ============================================================================
+TEST(PredicateColumnTest, SizeBoolean) {
+    auto col = PredicateColumnType<TYPE_BOOLEAN>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 2);
+}
+
+TEST(PredicateColumnTest, SizeTinyInt) {
+    auto col = PredicateColumnType<TYPE_TINYINT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+// MORE_TESTS_PLACEHOLDER_1
+
+TEST(PredicateColumnTest, SizeSmallInt) {
+    auto col = PredicateColumnType<TYPE_SMALLINT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeBigInt) {
+    auto col = PredicateColumnType<TYPE_BIGINT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeLargeInt) {
+    auto col = PredicateColumnType<TYPE_LARGEINT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeFloat) {
+    auto col = PredicateColumnType<TYPE_FLOAT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDouble) {
+    auto col = PredicateColumnType<TYPE_DOUBLE>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDate) {
+    auto col = PredicateColumnType<TYPE_DATE>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDateV2) {
+    auto col = PredicateColumnType<TYPE_DATEV2>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDateTime) {
+    auto col = PredicateColumnType<TYPE_DATETIME>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDateTimeV2) {
+    auto col = PredicateColumnType<TYPE_DATETIMEV2>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeChar) {
+    auto col = PredicateColumnType<TYPE_CHAR>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeVarchar) {
+    auto col = PredicateColumnType<TYPE_VARCHAR>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDecimalV2) {
+    auto col = PredicateColumnType<TYPE_DECIMALV2>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDecimal32) {
+    auto col = PredicateColumnType<TYPE_DECIMAL32>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDecimal64) {
+    auto col = PredicateColumnType<TYPE_DECIMAL64>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDecimal128I) {
+    auto col = PredicateColumnType<TYPE_DECIMAL128I>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDecimal256) {
+    auto col = PredicateColumnType<TYPE_DECIMAL256>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeIPv4) {
+    auto col = PredicateColumnType<TYPE_IPV4>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeIPv6) {
+    auto col = PredicateColumnType<TYPE_IPV6>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+// ============================================================================
+// Test insert_data() for all types
+// ============================================================================
+TEST(PredicateColumnTest, InsertDataBoolean) {
+    auto col = PredicateColumnType<TYPE_BOOLEAN>::create();
+    col->reserve(3);
+    UInt8 vals[] = {0, 1, 1};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], 0);
+    EXPECT_EQ(col->get_data()[1], 1);
+    EXPECT_EQ(col->get_data()[2], 1);
+}
+
+TEST(PredicateColumnTest, InsertDataTinyInt) {
+    auto col = PredicateColumnType<TYPE_TINYINT>::create();
+    col->reserve(3);
+    Int8 vals[] = {-128, 0, 127};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], -128);
+    EXPECT_EQ(col->get_data()[1], 0);
+    EXPECT_EQ(col->get_data()[2], 127);
+}
+
+TEST(PredicateColumnTest, InsertDataSmallInt) {
+    auto col = PredicateColumnType<TYPE_SMALLINT>::create();
+    col->reserve(3);
+    Int16 vals[] = {-32768, 0, 32767};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], -32768);
+    EXPECT_EQ(col->get_data()[1], 0);
+    EXPECT_EQ(col->get_data()[2], 32767);
+}
+
+TEST(PredicateColumnTest, InsertDataInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    col->reserve(3);
+    Int32 vals[] = {INT32_MIN, 0, INT32_MAX};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], INT32_MIN);
+    EXPECT_EQ(col->get_data()[1], 0);
+    EXPECT_EQ(col->get_data()[2], INT32_MAX);
+}
+
+TEST(PredicateColumnTest, InsertDataBigInt) {
+    auto col = PredicateColumnType<TYPE_BIGINT>::create();
+    col->reserve(3);
+    Int64 vals[] = {INT64_MIN, 0, INT64_MAX};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], INT64_MIN);
+    EXPECT_EQ(col->get_data()[1], 0);
+    EXPECT_EQ(col->get_data()[2], INT64_MAX);
+}
+
+TEST(PredicateColumnTest, InsertDataLargeInt) {
+    auto col = PredicateColumnType<TYPE_LARGEINT>::create();
+    col->reserve(3);
+    Int128 vals[] = {Int128(-1) << 100, Int128(0), Int128(1) << 100};

Review Comment:
   Left-shifting a negative signed value is undefined behavior in C++. `Int128(-1) << 100` can produce different results across compilers/build modes and will trip UBSan. Please build the positive magnitude first and negate it instead.
   
   ```suggestion
       Int128 vals[] = {-(Int128(1) << 100), Int128(0), Int128(1) << 100};
   ```



##########
be/test/core/column/predicate_column_test.cpp:
##########
@@ -0,0 +1,1099 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#include "core/column/predicate_column.h"
+
+#include <gtest/gtest-message.h>
+#include <gtest/gtest-test-part.h>
+#include <gtest/gtest.h>
+
+#include "common/status.h"
+#include "core/column/column_decimal.h"
+#include "core/column/column_nullable.h"
+#include "core/data_type/data_type.h"
+#include "core/data_type/data_type_number.h"
+#include "core/data_type/define_primitive_type.h"
+#include "core/decimal12.h"
+#include "core/field.h"
+#include "core/types.h"
+#include "core/uint24.h"
+#include "core/value/vdatetime_value.h"
+#include "testutil/column_helper.h"
+
+namespace doris {
+
+// ============================================================================
+// Test size() for all types
+// ============================================================================
+TEST(PredicateColumnTest, SizeBoolean) {
+    auto col = PredicateColumnType<TYPE_BOOLEAN>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 2);
+}
+
+TEST(PredicateColumnTest, SizeTinyInt) {
+    auto col = PredicateColumnType<TYPE_TINYINT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+// MORE_TESTS_PLACEHOLDER_1
+
+TEST(PredicateColumnTest, SizeSmallInt) {
+    auto col = PredicateColumnType<TYPE_SMALLINT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeBigInt) {
+    auto col = PredicateColumnType<TYPE_BIGINT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeLargeInt) {
+    auto col = PredicateColumnType<TYPE_LARGEINT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeFloat) {
+    auto col = PredicateColumnType<TYPE_FLOAT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDouble) {
+    auto col = PredicateColumnType<TYPE_DOUBLE>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDate) {
+    auto col = PredicateColumnType<TYPE_DATE>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDateV2) {
+    auto col = PredicateColumnType<TYPE_DATEV2>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDateTime) {
+    auto col = PredicateColumnType<TYPE_DATETIME>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDateTimeV2) {
+    auto col = PredicateColumnType<TYPE_DATETIMEV2>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeChar) {
+    auto col = PredicateColumnType<TYPE_CHAR>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeVarchar) {
+    auto col = PredicateColumnType<TYPE_VARCHAR>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDecimalV2) {
+    auto col = PredicateColumnType<TYPE_DECIMALV2>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDecimal32) {
+    auto col = PredicateColumnType<TYPE_DECIMAL32>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDecimal64) {
+    auto col = PredicateColumnType<TYPE_DECIMAL64>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDecimal128I) {
+    auto col = PredicateColumnType<TYPE_DECIMAL128I>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDecimal256) {
+    auto col = PredicateColumnType<TYPE_DECIMAL256>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeIPv4) {
+    auto col = PredicateColumnType<TYPE_IPV4>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeIPv6) {
+    auto col = PredicateColumnType<TYPE_IPV6>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+// ============================================================================
+// Test insert_data() for all types
+// ============================================================================
+TEST(PredicateColumnTest, InsertDataBoolean) {
+    auto col = PredicateColumnType<TYPE_BOOLEAN>::create();
+    col->reserve(3);
+    UInt8 vals[] = {0, 1, 1};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], 0);
+    EXPECT_EQ(col->get_data()[1], 1);
+    EXPECT_EQ(col->get_data()[2], 1);
+}
+
+TEST(PredicateColumnTest, InsertDataTinyInt) {
+    auto col = PredicateColumnType<TYPE_TINYINT>::create();
+    col->reserve(3);
+    Int8 vals[] = {-128, 0, 127};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], -128);
+    EXPECT_EQ(col->get_data()[1], 0);
+    EXPECT_EQ(col->get_data()[2], 127);
+}
+
+TEST(PredicateColumnTest, InsertDataSmallInt) {
+    auto col = PredicateColumnType<TYPE_SMALLINT>::create();
+    col->reserve(3);
+    Int16 vals[] = {-32768, 0, 32767};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], -32768);
+    EXPECT_EQ(col->get_data()[1], 0);
+    EXPECT_EQ(col->get_data()[2], 32767);
+}
+
+TEST(PredicateColumnTest, InsertDataInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    col->reserve(3);
+    Int32 vals[] = {INT32_MIN, 0, INT32_MAX};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], INT32_MIN);
+    EXPECT_EQ(col->get_data()[1], 0);
+    EXPECT_EQ(col->get_data()[2], INT32_MAX);
+}
+
+TEST(PredicateColumnTest, InsertDataBigInt) {
+    auto col = PredicateColumnType<TYPE_BIGINT>::create();
+    col->reserve(3);
+    Int64 vals[] = {INT64_MIN, 0, INT64_MAX};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], INT64_MIN);
+    EXPECT_EQ(col->get_data()[1], 0);
+    EXPECT_EQ(col->get_data()[2], INT64_MAX);
+}
+
+TEST(PredicateColumnTest, InsertDataLargeInt) {
+    auto col = PredicateColumnType<TYPE_LARGEINT>::create();
+    col->reserve(3);
+    Int128 vals[] = {Int128(-1) << 100, Int128(0), Int128(1) << 100};
+    for (auto& v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], vals[0]);
+    EXPECT_EQ(col->get_data()[1], vals[1]);
+    EXPECT_EQ(col->get_data()[2], vals[2]);
+}
+
+TEST(PredicateColumnTest, InsertDataFloat) {
+    auto col = PredicateColumnType<TYPE_FLOAT>::create();
+    col->reserve(3);
+    Float32 vals[] = {-3.14f, 0.0f, 2.718f};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_FLOAT_EQ(col->get_data()[0], -3.14f);
+    EXPECT_FLOAT_EQ(col->get_data()[1], 0.0f);
+    EXPECT_FLOAT_EQ(col->get_data()[2], 2.718f);
+}
+
+TEST(PredicateColumnTest, InsertDataDouble) {
+    auto col = PredicateColumnType<TYPE_DOUBLE>::create();
+    col->reserve(3);
+    Float64 vals[] = {-3.14159265358979, 0.0, 2.71828182845904};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_DOUBLE_EQ(col->get_data()[0], -3.14159265358979);
+    EXPECT_DOUBLE_EQ(col->get_data()[1], 0.0);
+    EXPECT_DOUBLE_EQ(col->get_data()[2], 2.71828182845904);
+}
+
+TEST(PredicateColumnTest, InsertDataDateV2) {
+    auto col = PredicateColumnType<TYPE_DATEV2>::create();
+    col->reserve(3);
+    uint32_t vals[] = {20230115, 20230620, 20231231};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+}
+
+TEST(PredicateColumnTest, InsertDataDateTimeV2) {
+    auto col = PredicateColumnType<TYPE_DATETIMEV2>::create();
+    col->reserve(3);
+    uint64_t vals[] = {1234567890123ULL, 2345678901234ULL, 3456789012345ULL};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+}
+
+TEST(PredicateColumnTest, InsertDataString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(3);
+    std::string s1 = "hello";
+    std::string s2 = "world";
+    std::string s3 = "";
+    col->insert_data(s1.data(), s1.size());
+    col->insert_data(s2.data(), s2.size());
+    col->insert_data(s3.data(), s3.size());
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(std::string(col->get_data()[0].data, col->get_data()[0].size), "hello");
+    EXPECT_EQ(std::string(col->get_data()[1].data, col->get_data()[1].size), "world");
+    EXPECT_EQ(col->get_data()[2].size, 0);
+}
+
+TEST(PredicateColumnTest, InsertDataDecimal32) {
+    auto col = PredicateColumnType<TYPE_DECIMAL32>::create();
+    col->reserve(3);
+    Decimal32 vals[] = {Decimal32(12345), Decimal32(-67890), Decimal32(0)};
+    for (auto& v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], Decimal32(12345));
+    EXPECT_EQ(col->get_data()[1], Decimal32(-67890));
+    EXPECT_EQ(col->get_data()[2], Decimal32(0));
+}
+
+TEST(PredicateColumnTest, InsertDataDecimal64) {
+    auto col = PredicateColumnType<TYPE_DECIMAL64>::create();
+    col->reserve(3);
+    Decimal64 vals[] = {Decimal64(Int64(123456789012LL)), Decimal64(Int64(-987654321098LL)),
+                        Decimal64(Int64(0))};
+    for (auto& v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], Decimal64(Int64(123456789012LL)));
+    EXPECT_EQ(col->get_data()[1], Decimal64(Int64(-987654321098LL)));
+    EXPECT_EQ(col->get_data()[2], Decimal64(Int64(0)));
+}
+
+TEST(PredicateColumnTest, InsertDataIPv4) {
+    auto col = PredicateColumnType<TYPE_IPV4>::create();
+    col->reserve(3);
+    IPv4 vals[] = {IPv4(0x7F000001), IPv4(0xC0A80001), IPv4(0x00000000)};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], IPv4(0x7F000001));
+    EXPECT_EQ(col->get_data()[1], IPv4(0xC0A80001));
+    EXPECT_EQ(col->get_data()[2], IPv4(0x00000000));
+}
+
+TEST(PredicateColumnTest, InsertDataIPv6) {
+    auto col = PredicateColumnType<TYPE_IPV6>::create();
+    col->reserve(2);
+    IPv6 vals[] = {IPv6(1), IPv6(0)};
+    for (auto& v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 2);
+    EXPECT_EQ(col->get_data()[0], IPv6(1));
+    EXPECT_EQ(col->get_data()[1], IPv6(0));
+}
+
+// MORE_TESTS_PLACEHOLDER_2
+
+// ============================================================================
+// Test insert_many_fix_len_data() for numeric types
+// ============================================================================
+TEST(PredicateColumnTest, InsertManyFixLenDataInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    col->reserve(5);
+    Int32 vals[] = {1, 2, 3, 4, 5};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 5);
+    EXPECT_EQ(col->size(), 5);
+    for (int i = 0; i < 5; i++) {
+        EXPECT_EQ(col->get_data()[i], i + 1);
+    }
+}
+
+TEST(PredicateColumnTest, InsertManyFixLenDataBigInt) {
+    auto col = PredicateColumnType<TYPE_BIGINT>::create();
+    col->reserve(3);
+    Int64 vals[] = {100000000000LL, 200000000000LL, 300000000000LL};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 3);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], 100000000000LL);
+    EXPECT_EQ(col->get_data()[1], 200000000000LL);
+    EXPECT_EQ(col->get_data()[2], 300000000000LL);
+}
+
+TEST(PredicateColumnTest, InsertManyFixLenDataFloat) {
+    auto col = PredicateColumnType<TYPE_FLOAT>::create();
+    col->reserve(3);
+    Float32 vals[] = {1.1f, 2.2f, 3.3f};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 3);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_FLOAT_EQ(col->get_data()[0], 1.1f);
+    EXPECT_FLOAT_EQ(col->get_data()[1], 2.2f);
+    EXPECT_FLOAT_EQ(col->get_data()[2], 3.3f);
+}
+
+TEST(PredicateColumnTest, InsertManyFixLenDataDouble) {
+    auto col = PredicateColumnType<TYPE_DOUBLE>::create();
+    col->reserve(3);
+    Float64 vals[] = {1.11, 2.22, 3.33};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 3);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_DOUBLE_EQ(col->get_data()[0], 1.11);
+    EXPECT_DOUBLE_EQ(col->get_data()[1], 2.22);
+    EXPECT_DOUBLE_EQ(col->get_data()[2], 3.33);
+}
+
+TEST(PredicateColumnTest, InsertManyFixLenDataDateV2) {
+    auto col = PredicateColumnType<TYPE_DATEV2>::create();
+    col->reserve(3);
+    uint32_t vals[] = {20230115, 20230620, 20231231};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 3);
+    EXPECT_EQ(col->size(), 3);
+}
+
+TEST(PredicateColumnTest, InsertManyFixLenDataDateTimeV2) {
+    auto col = PredicateColumnType<TYPE_DATETIMEV2>::create();
+    col->reserve(3);
+    uint64_t vals[] = {1234567890123ULL, 2345678901234ULL, 3456789012345ULL};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 3);
+    EXPECT_EQ(col->size(), 3);
+}
+
+TEST(PredicateColumnTest, InsertManyFixLenDataDecimal32) {
+    auto col = PredicateColumnType<TYPE_DECIMAL32>::create();
+    col->reserve(3);
+    Decimal32 vals[] = {Decimal32(100), Decimal32(200), Decimal32(300)};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 3);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], Decimal32(100));
+    EXPECT_EQ(col->get_data()[1], Decimal32(200));
+    EXPECT_EQ(col->get_data()[2], Decimal32(300));
+}
+
+TEST(PredicateColumnTest, InsertManyFixLenDataDecimal64) {
+    auto col = PredicateColumnType<TYPE_DECIMAL64>::create();
+    col->reserve(3);
+    Decimal64 vals[] = {Decimal64(Int64(1000)), Decimal64(Int64(2000)), Decimal64(Int64(3000))};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 3);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], Decimal64(Int64(1000)));
+    EXPECT_EQ(col->get_data()[1], Decimal64(Int64(2000)));
+    EXPECT_EQ(col->get_data()[2], Decimal64(Int64(3000)));
+}
+
+TEST(PredicateColumnTest, InsertManyFixLenDataIPv4) {
+    auto col = PredicateColumnType<TYPE_IPV4>::create();
+    col->reserve(3);
+    IPv4 vals[] = {IPv4(1), IPv4(2), IPv4(3)};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 3);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], IPv4(1));
+    EXPECT_EQ(col->get_data()[1], IPv4(2));
+    EXPECT_EQ(col->get_data()[2], IPv4(3));
+}
+
+// ============================================================================
+// Test insert_many_date() for TYPE_DATE
+// ============================================================================
+TEST(PredicateColumnTest, InsertManyDate) {
+    auto col = PredicateColumnType<TYPE_DATE>::create();
+    col->reserve(3);
+    uint24_t date_vals[3];
+    date_vals[0] = (2023 << 9) | (1 << 5) | 15;
+    date_vals[1] = (2023 << 9) | (6 << 5) | 20;
+    date_vals[2] = (2023 << 9) | (12 << 5) | 31;
+    col->insert_many_date(reinterpret_cast<const char*>(date_vals), 3);
+    EXPECT_EQ(col->size(), 3);
+}
+
+// ============================================================================
+// Test insert_many_datetime() for TYPE_DATETIME
+// ============================================================================
+TEST(PredicateColumnTest, InsertManyDateTime) {
+    auto col = PredicateColumnType<TYPE_DATETIME>::create();
+    col->reserve(3);
+    uint64_t datetime_vals[] = {20230115120000ULL, 20230620153045ULL, 20231231235959ULL};
+    col->insert_many_datetime(reinterpret_cast<const char*>(datetime_vals), 3);
+    EXPECT_EQ(col->size(), 3);
+}
+
+// ============================================================================
+// Test insert_many_decimalv2() for TYPE_DECIMALV2
+// ============================================================================
+TEST(PredicateColumnTest, InsertManyDecimalV2) {
+    auto col = PredicateColumnType<TYPE_DECIMALV2>::create();
+    col->reserve(3);
+    decimal12_t decimals[3];
+    decimals[0].integer = 123;
+    decimals[0].fraction = 456000000;
+    decimals[1].integer = -789;
+    decimals[1].fraction = 123000000;
+    decimals[2].integer = 0;
+    decimals[2].fraction = 999000000;
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(decimals), 3);
+    EXPECT_EQ(col->size(), 3);
+}
+
+// ============================================================================
+// Test insert_many_strings() for string types
+// ============================================================================
+TEST(PredicateColumnTest, InsertManyStringsString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(5);
+    StringRef strings[] = {StringRef("one", 3), StringRef("two", 3), StringRef("three", 5)};
+    col->insert_many_strings(strings, 3);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(std::string(col->get_data()[0].data, col->get_data()[0].size), "one");
+    EXPECT_EQ(std::string(col->get_data()[1].data, col->get_data()[1].size), "two");
+    EXPECT_EQ(std::string(col->get_data()[2].data, col->get_data()[2].size), "three");
+}
+
+TEST(PredicateColumnTest, InsertManyStringsVarchar) {
+    auto col = PredicateColumnType<TYPE_VARCHAR>::create();
+    col->reserve(3);
+    StringRef strings[] = {StringRef("abc", 3), StringRef("defgh", 5)};
+    col->insert_many_strings(strings, 2);
+    EXPECT_EQ(col->size(), 2);
+    EXPECT_EQ(std::string(col->get_data()[0].data, col->get_data()[0].size), "abc");
+    EXPECT_EQ(std::string(col->get_data()[1].data, col->get_data()[1].size), "defgh");
+}
+
+TEST(PredicateColumnTest, InsertManyStringsChar) {
+    auto col = PredicateColumnType<TYPE_CHAR>::create();
+    col->reserve(3);
+    StringRef strings[] = {StringRef("ab", 2), StringRef("cd", 2)};
+    col->insert_many_strings(strings, 2);
+    EXPECT_EQ(col->size(), 2);
+}
+
+TEST(PredicateColumnTest, InsertManyStringsEmpty) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(3);
+    col->insert_many_strings(nullptr, 0);
+    EXPECT_EQ(col->size(), 0);
+}
+
+// ============================================================================
+// Test insert_many_continuous_binary_data() for string types
+// ============================================================================
+TEST(PredicateColumnTest, InsertManyContinuousBinaryDataString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(3);
+    const char* data = "helloworld!";
+    uint32_t offsets[] = {0, 5, 10, 11};
+    col->insert_many_continuous_binary_data(data, offsets, 3);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(std::string(col->get_data()[0].data, col->get_data()[0].size), "hello");
+    EXPECT_EQ(std::string(col->get_data()[1].data, col->get_data()[1].size), "world");
+    EXPECT_EQ(std::string(col->get_data()[2].data, col->get_data()[2].size), "!");
+}
+
+TEST(PredicateColumnTest, InsertManyContinuousBinaryDataVarchar) {
+    auto col = PredicateColumnType<TYPE_VARCHAR>::create();
+    col->reserve(2);
+    const char* data = "abcdef";
+    uint32_t offsets[] = {0, 3, 6};
+    col->insert_many_continuous_binary_data(data, offsets, 2);
+    EXPECT_EQ(col->size(), 2);
+    EXPECT_EQ(std::string(col->get_data()[0].data, col->get_data()[0].size), "abc");
+    EXPECT_EQ(std::string(col->get_data()[1].data, col->get_data()[1].size), "def");
+}
+
+TEST(PredicateColumnTest, InsertManyContinuousBinaryDataEmpty) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(3);
+    const char* data = "test";
+    uint32_t offsets[] = {0};
+    col->insert_many_continuous_binary_data(data, offsets, 0);
+    EXPECT_EQ(col->size(), 0);
+}
+
+// ============================================================================
+// Test insert_many_dict_data() for string types
+// ============================================================================
+TEST(PredicateColumnTest, InsertManyDictDataString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(5);
+    StringRef dict[] = {StringRef("apple", 5), StringRef("banana", 6), StringRef("cherry", 6)};
+    int32_t codewords[] = {0, 1, 2, 0, 1};
+    col->insert_many_dict_data(codewords, 0, dict, 5, 3);
+    EXPECT_EQ(col->size(), 5);
+    EXPECT_EQ(std::string(col->get_data()[0].data, col->get_data()[0].size), "apple");
+    EXPECT_EQ(std::string(col->get_data()[1].data, col->get_data()[1].size), "banana");
+    EXPECT_EQ(std::string(col->get_data()[2].data, col->get_data()[2].size), "cherry");
+    EXPECT_EQ(std::string(col->get_data()[3].data, col->get_data()[3].size), "apple");
+    EXPECT_EQ(std::string(col->get_data()[4].data, col->get_data()[4].size), "banana");
+}
+
+TEST(PredicateColumnTest, InsertManyDictDataVarchar) {
+    auto col = PredicateColumnType<TYPE_VARCHAR>::create();
+    col->reserve(3);
+    StringRef dict[] = {StringRef("x", 1), StringRef("yy", 2)};
+    int32_t codewords[] = {0, 1, 0};
+    col->insert_many_dict_data(codewords, 0, dict, 3, 2);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(std::string(col->get_data()[0].data, col->get_data()[0].size), "x");
+    EXPECT_EQ(std::string(col->get_data()[1].data, col->get_data()[1].size), "yy");
+    EXPECT_EQ(std::string(col->get_data()[2].data, col->get_data()[2].size), "x");
+}
+
+// MORE_TESTS_PLACEHOLDER_3
+
+// ============================================================================
+// Test insert_duplicate_fields() for all types
+// ============================================================================
+TEST(PredicateColumnTest, InsertDuplicateFieldsString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(10);
+    std::string test_str = "hello";
+    Field field = Field::create_field<TYPE_STRING>(test_str);
+    col->insert_duplicate_fields(field, 5);

Review Comment:
   This regression is still weak against the original bug. With the old `dst += i * str.size()` code, these content checks can still pass in a non-ASAN build because each `StringRef` often decodes to `"hello"` before the overflow is noticed. Please also assert the backing pointers are spaced exactly one string length apart (for example, `data[i].data == data[0].data + i * test_str.size()`) or exercise the nullable/default-value caller that triggered the stack trace, so the test fails deterministically without sanitizer help.



##########
be/test/core/column/predicate_column_test.cpp:
##########
@@ -0,0 +1,1099 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#include "core/column/predicate_column.h"
+
+#include <gtest/gtest-message.h>
+#include <gtest/gtest-test-part.h>
+#include <gtest/gtest.h>
+
+#include "common/status.h"
+#include "core/column/column_decimal.h"
+#include "core/column/column_nullable.h"
+#include "core/data_type/data_type.h"
+#include "core/data_type/data_type_number.h"
+#include "core/data_type/define_primitive_type.h"
+#include "core/decimal12.h"
+#include "core/field.h"
+#include "core/types.h"
+#include "core/uint24.h"
+#include "core/value/vdatetime_value.h"
+#include "testutil/column_helper.h"
+
+namespace doris {
+
+// ============================================================================
+// Test size() for all types
+// ============================================================================
+TEST(PredicateColumnTest, SizeBoolean) {
+    auto col = PredicateColumnType<TYPE_BOOLEAN>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 2);
+}
+
+TEST(PredicateColumnTest, SizeTinyInt) {
+    auto col = PredicateColumnType<TYPE_TINYINT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+// MORE_TESTS_PLACEHOLDER_1
+
+TEST(PredicateColumnTest, SizeSmallInt) {
+    auto col = PredicateColumnType<TYPE_SMALLINT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeBigInt) {
+    auto col = PredicateColumnType<TYPE_BIGINT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeLargeInt) {
+    auto col = PredicateColumnType<TYPE_LARGEINT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeFloat) {
+    auto col = PredicateColumnType<TYPE_FLOAT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDouble) {
+    auto col = PredicateColumnType<TYPE_DOUBLE>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDate) {
+    auto col = PredicateColumnType<TYPE_DATE>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDateV2) {
+    auto col = PredicateColumnType<TYPE_DATEV2>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDateTime) {
+    auto col = PredicateColumnType<TYPE_DATETIME>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDateTimeV2) {
+    auto col = PredicateColumnType<TYPE_DATETIMEV2>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeChar) {
+    auto col = PredicateColumnType<TYPE_CHAR>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeVarchar) {
+    auto col = PredicateColumnType<TYPE_VARCHAR>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDecimalV2) {
+    auto col = PredicateColumnType<TYPE_DECIMALV2>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDecimal32) {
+    auto col = PredicateColumnType<TYPE_DECIMAL32>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDecimal64) {
+    auto col = PredicateColumnType<TYPE_DECIMAL64>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDecimal128I) {
+    auto col = PredicateColumnType<TYPE_DECIMAL128I>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDecimal256) {
+    auto col = PredicateColumnType<TYPE_DECIMAL256>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeIPv4) {
+    auto col = PredicateColumnType<TYPE_IPV4>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeIPv6) {
+    auto col = PredicateColumnType<TYPE_IPV6>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+// ============================================================================
+// Test insert_data() for all types
+// ============================================================================
+TEST(PredicateColumnTest, InsertDataBoolean) {
+    auto col = PredicateColumnType<TYPE_BOOLEAN>::create();
+    col->reserve(3);
+    UInt8 vals[] = {0, 1, 1};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], 0);
+    EXPECT_EQ(col->get_data()[1], 1);
+    EXPECT_EQ(col->get_data()[2], 1);
+}
+
+TEST(PredicateColumnTest, InsertDataTinyInt) {
+    auto col = PredicateColumnType<TYPE_TINYINT>::create();
+    col->reserve(3);
+    Int8 vals[] = {-128, 0, 127};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], -128);
+    EXPECT_EQ(col->get_data()[1], 0);
+    EXPECT_EQ(col->get_data()[2], 127);
+}
+
+TEST(PredicateColumnTest, InsertDataSmallInt) {
+    auto col = PredicateColumnType<TYPE_SMALLINT>::create();
+    col->reserve(3);
+    Int16 vals[] = {-32768, 0, 32767};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], -32768);
+    EXPECT_EQ(col->get_data()[1], 0);
+    EXPECT_EQ(col->get_data()[2], 32767);
+}
+
+TEST(PredicateColumnTest, InsertDataInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    col->reserve(3);
+    Int32 vals[] = {INT32_MIN, 0, INT32_MAX};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], INT32_MIN);
+    EXPECT_EQ(col->get_data()[1], 0);
+    EXPECT_EQ(col->get_data()[2], INT32_MAX);
+}
+
+TEST(PredicateColumnTest, InsertDataBigInt) {
+    auto col = PredicateColumnType<TYPE_BIGINT>::create();
+    col->reserve(3);
+    Int64 vals[] = {INT64_MIN, 0, INT64_MAX};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], INT64_MIN);
+    EXPECT_EQ(col->get_data()[1], 0);
+    EXPECT_EQ(col->get_data()[2], INT64_MAX);
+}
+
+TEST(PredicateColumnTest, InsertDataLargeInt) {
+    auto col = PredicateColumnType<TYPE_LARGEINT>::create();
+    col->reserve(3);
+    Int128 vals[] = {Int128(-1) << 100, Int128(0), Int128(1) << 100};
+    for (auto& v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], vals[0]);
+    EXPECT_EQ(col->get_data()[1], vals[1]);
+    EXPECT_EQ(col->get_data()[2], vals[2]);
+}
+
+TEST(PredicateColumnTest, InsertDataFloat) {
+    auto col = PredicateColumnType<TYPE_FLOAT>::create();
+    col->reserve(3);
+    Float32 vals[] = {-3.14f, 0.0f, 2.718f};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_FLOAT_EQ(col->get_data()[0], -3.14f);
+    EXPECT_FLOAT_EQ(col->get_data()[1], 0.0f);
+    EXPECT_FLOAT_EQ(col->get_data()[2], 2.718f);
+}
+
+TEST(PredicateColumnTest, InsertDataDouble) {
+    auto col = PredicateColumnType<TYPE_DOUBLE>::create();
+    col->reserve(3);
+    Float64 vals[] = {-3.14159265358979, 0.0, 2.71828182845904};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_DOUBLE_EQ(col->get_data()[0], -3.14159265358979);
+    EXPECT_DOUBLE_EQ(col->get_data()[1], 0.0);
+    EXPECT_DOUBLE_EQ(col->get_data()[2], 2.71828182845904);
+}
+
+TEST(PredicateColumnTest, InsertDataDateV2) {
+    auto col = PredicateColumnType<TYPE_DATEV2>::create();
+    col->reserve(3);
+    uint32_t vals[] = {20230115, 20230620, 20231231};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+}
+
+TEST(PredicateColumnTest, InsertDataDateTimeV2) {
+    auto col = PredicateColumnType<TYPE_DATETIMEV2>::create();
+    col->reserve(3);
+    uint64_t vals[] = {1234567890123ULL, 2345678901234ULL, 3456789012345ULL};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+}
+
+TEST(PredicateColumnTest, InsertDataString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(3);
+    std::string s1 = "hello";
+    std::string s2 = "world";
+    std::string s3 = "";
+    col->insert_data(s1.data(), s1.size());
+    col->insert_data(s2.data(), s2.size());
+    col->insert_data(s3.data(), s3.size());
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(std::string(col->get_data()[0].data, col->get_data()[0].size), "hello");
+    EXPECT_EQ(std::string(col->get_data()[1].data, col->get_data()[1].size), "world");
+    EXPECT_EQ(col->get_data()[2].size, 0);
+}
+
+TEST(PredicateColumnTest, InsertDataDecimal32) {
+    auto col = PredicateColumnType<TYPE_DECIMAL32>::create();
+    col->reserve(3);
+    Decimal32 vals[] = {Decimal32(12345), Decimal32(-67890), Decimal32(0)};
+    for (auto& v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], Decimal32(12345));
+    EXPECT_EQ(col->get_data()[1], Decimal32(-67890));
+    EXPECT_EQ(col->get_data()[2], Decimal32(0));
+}
+
+TEST(PredicateColumnTest, InsertDataDecimal64) {
+    auto col = PredicateColumnType<TYPE_DECIMAL64>::create();
+    col->reserve(3);
+    Decimal64 vals[] = {Decimal64(Int64(123456789012LL)), Decimal64(Int64(-987654321098LL)),
+                        Decimal64(Int64(0))};
+    for (auto& v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], Decimal64(Int64(123456789012LL)));
+    EXPECT_EQ(col->get_data()[1], Decimal64(Int64(-987654321098LL)));
+    EXPECT_EQ(col->get_data()[2], Decimal64(Int64(0)));
+}
+
+TEST(PredicateColumnTest, InsertDataIPv4) {
+    auto col = PredicateColumnType<TYPE_IPV4>::create();
+    col->reserve(3);
+    IPv4 vals[] = {IPv4(0x7F000001), IPv4(0xC0A80001), IPv4(0x00000000)};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], IPv4(0x7F000001));
+    EXPECT_EQ(col->get_data()[1], IPv4(0xC0A80001));
+    EXPECT_EQ(col->get_data()[2], IPv4(0x00000000));
+}
+
+TEST(PredicateColumnTest, InsertDataIPv6) {
+    auto col = PredicateColumnType<TYPE_IPV6>::create();
+    col->reserve(2);
+    IPv6 vals[] = {IPv6(1), IPv6(0)};
+    for (auto& v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 2);
+    EXPECT_EQ(col->get_data()[0], IPv6(1));
+    EXPECT_EQ(col->get_data()[1], IPv6(0));
+}
+
+// MORE_TESTS_PLACEHOLDER_2
+
+// ============================================================================
+// Test insert_many_fix_len_data() for numeric types
+// ============================================================================
+TEST(PredicateColumnTest, InsertManyFixLenDataInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    col->reserve(5);
+    Int32 vals[] = {1, 2, 3, 4, 5};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 5);
+    EXPECT_EQ(col->size(), 5);
+    for (int i = 0; i < 5; i++) {
+        EXPECT_EQ(col->get_data()[i], i + 1);
+    }
+}
+
+TEST(PredicateColumnTest, InsertManyFixLenDataBigInt) {
+    auto col = PredicateColumnType<TYPE_BIGINT>::create();
+    col->reserve(3);
+    Int64 vals[] = {100000000000LL, 200000000000LL, 300000000000LL};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 3);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], 100000000000LL);
+    EXPECT_EQ(col->get_data()[1], 200000000000LL);
+    EXPECT_EQ(col->get_data()[2], 300000000000LL);
+}
+
+TEST(PredicateColumnTest, InsertManyFixLenDataFloat) {
+    auto col = PredicateColumnType<TYPE_FLOAT>::create();
+    col->reserve(3);
+    Float32 vals[] = {1.1f, 2.2f, 3.3f};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 3);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_FLOAT_EQ(col->get_data()[0], 1.1f);
+    EXPECT_FLOAT_EQ(col->get_data()[1], 2.2f);
+    EXPECT_FLOAT_EQ(col->get_data()[2], 3.3f);
+}
+
+TEST(PredicateColumnTest, InsertManyFixLenDataDouble) {
+    auto col = PredicateColumnType<TYPE_DOUBLE>::create();
+    col->reserve(3);
+    Float64 vals[] = {1.11, 2.22, 3.33};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 3);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_DOUBLE_EQ(col->get_data()[0], 1.11);
+    EXPECT_DOUBLE_EQ(col->get_data()[1], 2.22);
+    EXPECT_DOUBLE_EQ(col->get_data()[2], 3.33);
+}
+
+TEST(PredicateColumnTest, InsertManyFixLenDataDateV2) {
+    auto col = PredicateColumnType<TYPE_DATEV2>::create();
+    col->reserve(3);
+    uint32_t vals[] = {20230115, 20230620, 20231231};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 3);
+    EXPECT_EQ(col->size(), 3);
+}
+
+TEST(PredicateColumnTest, InsertManyFixLenDataDateTimeV2) {
+    auto col = PredicateColumnType<TYPE_DATETIMEV2>::create();
+    col->reserve(3);
+    uint64_t vals[] = {1234567890123ULL, 2345678901234ULL, 3456789012345ULL};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 3);
+    EXPECT_EQ(col->size(), 3);
+}
+
+TEST(PredicateColumnTest, InsertManyFixLenDataDecimal32) {
+    auto col = PredicateColumnType<TYPE_DECIMAL32>::create();
+    col->reserve(3);
+    Decimal32 vals[] = {Decimal32(100), Decimal32(200), Decimal32(300)};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 3);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], Decimal32(100));
+    EXPECT_EQ(col->get_data()[1], Decimal32(200));
+    EXPECT_EQ(col->get_data()[2], Decimal32(300));
+}
+
+TEST(PredicateColumnTest, InsertManyFixLenDataDecimal64) {
+    auto col = PredicateColumnType<TYPE_DECIMAL64>::create();
+    col->reserve(3);
+    Decimal64 vals[] = {Decimal64(Int64(1000)), Decimal64(Int64(2000)), Decimal64(Int64(3000))};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 3);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], Decimal64(Int64(1000)));
+    EXPECT_EQ(col->get_data()[1], Decimal64(Int64(2000)));
+    EXPECT_EQ(col->get_data()[2], Decimal64(Int64(3000)));
+}
+
+TEST(PredicateColumnTest, InsertManyFixLenDataIPv4) {
+    auto col = PredicateColumnType<TYPE_IPV4>::create();
+    col->reserve(3);
+    IPv4 vals[] = {IPv4(1), IPv4(2), IPv4(3)};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 3);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], IPv4(1));
+    EXPECT_EQ(col->get_data()[1], IPv4(2));
+    EXPECT_EQ(col->get_data()[2], IPv4(3));
+}
+
+// ============================================================================
+// Test insert_many_date() for TYPE_DATE
+// ============================================================================
+TEST(PredicateColumnTest, InsertManyDate) {
+    auto col = PredicateColumnType<TYPE_DATE>::create();
+    col->reserve(3);
+    uint24_t date_vals[3];
+    date_vals[0] = (2023 << 9) | (1 << 5) | 15;
+    date_vals[1] = (2023 << 9) | (6 << 5) | 20;
+    date_vals[2] = (2023 << 9) | (12 << 5) | 31;
+    col->insert_many_date(reinterpret_cast<const char*>(date_vals), 3);
+    EXPECT_EQ(col->size(), 3);
+}
+
+// ============================================================================
+// Test insert_many_datetime() for TYPE_DATETIME
+// ============================================================================
+TEST(PredicateColumnTest, InsertManyDateTime) {
+    auto col = PredicateColumnType<TYPE_DATETIME>::create();
+    col->reserve(3);
+    uint64_t datetime_vals[] = {20230115120000ULL, 20230620153045ULL, 20231231235959ULL};
+    col->insert_many_datetime(reinterpret_cast<const char*>(datetime_vals), 3);
+    EXPECT_EQ(col->size(), 3);
+}
+
+// ============================================================================
+// Test insert_many_decimalv2() for TYPE_DECIMALV2
+// ============================================================================
+TEST(PredicateColumnTest, InsertManyDecimalV2) {
+    auto col = PredicateColumnType<TYPE_DECIMALV2>::create();
+    col->reserve(3);
+    decimal12_t decimals[3];
+    decimals[0].integer = 123;
+    decimals[0].fraction = 456000000;
+    decimals[1].integer = -789;
+    decimals[1].fraction = 123000000;
+    decimals[2].integer = 0;
+    decimals[2].fraction = 999000000;
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(decimals), 3);
+    EXPECT_EQ(col->size(), 3);
+}
+
+// ============================================================================
+// Test insert_many_strings() for string types
+// ============================================================================
+TEST(PredicateColumnTest, InsertManyStringsString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(5);
+    StringRef strings[] = {StringRef("one", 3), StringRef("two", 3), StringRef("three", 5)};
+    col->insert_many_strings(strings, 3);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(std::string(col->get_data()[0].data, col->get_data()[0].size), "one");
+    EXPECT_EQ(std::string(col->get_data()[1].data, col->get_data()[1].size), "two");
+    EXPECT_EQ(std::string(col->get_data()[2].data, col->get_data()[2].size), "three");
+}
+
+TEST(PredicateColumnTest, InsertManyStringsVarchar) {
+    auto col = PredicateColumnType<TYPE_VARCHAR>::create();
+    col->reserve(3);
+    StringRef strings[] = {StringRef("abc", 3), StringRef("defgh", 5)};
+    col->insert_many_strings(strings, 2);
+    EXPECT_EQ(col->size(), 2);
+    EXPECT_EQ(std::string(col->get_data()[0].data, col->get_data()[0].size), "abc");
+    EXPECT_EQ(std::string(col->get_data()[1].data, col->get_data()[1].size), "defgh");
+}
+
+TEST(PredicateColumnTest, InsertManyStringsChar) {
+    auto col = PredicateColumnType<TYPE_CHAR>::create();
+    col->reserve(3);
+    StringRef strings[] = {StringRef("ab", 2), StringRef("cd", 2)};
+    col->insert_many_strings(strings, 2);
+    EXPECT_EQ(col->size(), 2);
+}
+
+TEST(PredicateColumnTest, InsertManyStringsEmpty) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(3);
+    col->insert_many_strings(nullptr, 0);
+    EXPECT_EQ(col->size(), 0);
+}
+
+// ============================================================================
+// Test insert_many_continuous_binary_data() for string types
+// ============================================================================
+TEST(PredicateColumnTest, InsertManyContinuousBinaryDataString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(3);
+    const char* data = "helloworld!";
+    uint32_t offsets[] = {0, 5, 10, 11};
+    col->insert_many_continuous_binary_data(data, offsets, 3);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(std::string(col->get_data()[0].data, col->get_data()[0].size), "hello");
+    EXPECT_EQ(std::string(col->get_data()[1].data, col->get_data()[1].size), "world");
+    EXPECT_EQ(std::string(col->get_data()[2].data, col->get_data()[2].size), "!");
+}
+
+TEST(PredicateColumnTest, InsertManyContinuousBinaryDataVarchar) {
+    auto col = PredicateColumnType<TYPE_VARCHAR>::create();
+    col->reserve(2);
+    const char* data = "abcdef";
+    uint32_t offsets[] = {0, 3, 6};
+    col->insert_many_continuous_binary_data(data, offsets, 2);
+    EXPECT_EQ(col->size(), 2);
+    EXPECT_EQ(std::string(col->get_data()[0].data, col->get_data()[0].size), "abc");
+    EXPECT_EQ(std::string(col->get_data()[1].data, col->get_data()[1].size), "def");
+}
+
+TEST(PredicateColumnTest, InsertManyContinuousBinaryDataEmpty) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(3);
+    const char* data = "test";
+    uint32_t offsets[] = {0};
+    col->insert_many_continuous_binary_data(data, offsets, 0);
+    EXPECT_EQ(col->size(), 0);
+}
+
+// ============================================================================
+// Test insert_many_dict_data() for string types
+// ============================================================================
+TEST(PredicateColumnTest, InsertManyDictDataString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(5);
+    StringRef dict[] = {StringRef("apple", 5), StringRef("banana", 6), StringRef("cherry", 6)};
+    int32_t codewords[] = {0, 1, 2, 0, 1};
+    col->insert_many_dict_data(codewords, 0, dict, 5, 3);
+    EXPECT_EQ(col->size(), 5);
+    EXPECT_EQ(std::string(col->get_data()[0].data, col->get_data()[0].size), "apple");
+    EXPECT_EQ(std::string(col->get_data()[1].data, col->get_data()[1].size), "banana");
+    EXPECT_EQ(std::string(col->get_data()[2].data, col->get_data()[2].size), "cherry");
+    EXPECT_EQ(std::string(col->get_data()[3].data, col->get_data()[3].size), "apple");
+    EXPECT_EQ(std::string(col->get_data()[4].data, col->get_data()[4].size), "banana");
+}
+
+TEST(PredicateColumnTest, InsertManyDictDataVarchar) {
+    auto col = PredicateColumnType<TYPE_VARCHAR>::create();
+    col->reserve(3);
+    StringRef dict[] = {StringRef("x", 1), StringRef("yy", 2)};
+    int32_t codewords[] = {0, 1, 0};
+    col->insert_many_dict_data(codewords, 0, dict, 3, 2);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(std::string(col->get_data()[0].data, col->get_data()[0].size), "x");
+    EXPECT_EQ(std::string(col->get_data()[1].data, col->get_data()[1].size), "yy");
+    EXPECT_EQ(std::string(col->get_data()[2].data, col->get_data()[2].size), "x");
+}
+
+// MORE_TESTS_PLACEHOLDER_3
+
+// ============================================================================
+// Test insert_duplicate_fields() for all types
+// ============================================================================
+TEST(PredicateColumnTest, InsertDuplicateFieldsString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(10);
+    std::string test_str = "hello";
+    Field field = Field::create_field<TYPE_STRING>(test_str);
+    col->insert_duplicate_fields(field, 5);
+    EXPECT_EQ(col->size(), 5);
+    for (size_t i = 0; i < 5; i++) {
+        StringRef ref = col->get_data()[i];
+        EXPECT_EQ(std::string(ref.data, ref.size), test_str);
+    }
+    // Insert another batch to verify memory doesn't overlap
+    std::string str2 = "world";
+    Field field2 = Field::create_field<TYPE_STRING>(str2);
+    col->insert_duplicate_fields(field2, 3);
+    EXPECT_EQ(col->size(), 8);
+    for (size_t i = 0; i < 5; i++) {
+        EXPECT_EQ(std::string(col->get_data()[i].data, col->get_data()[i].size), test_str);
+    }
+    for (size_t i = 5; i < 8; i++) {
+        EXPECT_EQ(std::string(col->get_data()[i].data, col->get_data()[i].size), str2);
+    }
+}
+
+TEST(PredicateColumnTest, InsertDuplicateFieldsInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    col->reserve(10);
+    Int32 val = 42;
+    Field field = Field::create_field<TYPE_INT>(val);
+    col->insert_duplicate_fields(field, 5);
+    EXPECT_EQ(col->size(), 5);
+    for (size_t i = 0; i < 5; i++) {
+        EXPECT_EQ(col->get_data()[i], 42);
+    }
+}
+
+TEST(PredicateColumnTest, InsertDuplicateFieldsLargeInt) {
+    auto col = PredicateColumnType<TYPE_LARGEINT>::create();
+    col->reserve(10);
+    Int128 val = Int128(123456789012345LL) * Int128(1000000000LL);
+    Field field = Field::create_field<TYPE_LARGEINT>(val);
+    col->insert_duplicate_fields(field, 3);
+    EXPECT_EQ(col->size(), 3);
+    for (size_t i = 0; i < 3; i++) {
+        EXPECT_EQ(col->get_data()[i], val);
+    }
+}
+
+TEST(PredicateColumnTest, InsertDuplicateFieldsZeroCount) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    col->reserve(5);
+    Int32 val = 42;
+    Field field = Field::create_field<TYPE_INT>(val);
+    col->insert_duplicate_fields(field, 0);
+    EXPECT_EQ(col->size(), 0);
+}
+
+// ============================================================================
+// Test insert_default() for all types
+// ============================================================================
+TEST(PredicateColumnTest, InsertDefaultInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    col->reserve(3);
+    col->insert_default();
+    col->insert_default();
+    EXPECT_EQ(col->size(), 2);
+    EXPECT_EQ(col->get_data()[0], 0);
+    EXPECT_EQ(col->get_data()[1], 0);
+}
+
+TEST(PredicateColumnTest, InsertDefaultDouble) {
+    auto col = PredicateColumnType<TYPE_DOUBLE>::create();
+    col->reserve(2);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+    EXPECT_DOUBLE_EQ(col->get_data()[0], 0.0);
+}
+
+TEST(PredicateColumnTest, InsertDefaultString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(2);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+    EXPECT_EQ(col->get_data()[0].size, 0);
+}
+
+// ============================================================================
+// Test clear() for all types
+// ============================================================================
+TEST(PredicateColumnTest, ClearInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    col->reserve(10);
+    Int32 val = 42;
+    col->insert_data(reinterpret_cast<const char*>(&val), sizeof(val));
+    col->insert_data(reinterpret_cast<const char*>(&val), sizeof(val));
+    EXPECT_EQ(col->size(), 2);
+    col->clear();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_data(reinterpret_cast<const char*>(&val), sizeof(val));
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, ClearString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(5);
+    std::string s = "test";
+    col->insert_data(s.data(), s.size());
+    EXPECT_EQ(col->size(), 1);
+    col->clear();
+    EXPECT_EQ(col->size(), 0);
+}
+
+// ============================================================================
+// Test reserve() for all types
+// ============================================================================
+TEST(PredicateColumnTest, ReserveInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    col->reserve(100);
+    EXPECT_EQ(col->size(), 0);
+    for (int i = 0; i < 100; i++) {
+        Int32 val = i;
+        col->insert_data(reinterpret_cast<const char*>(&val), sizeof(val));
+    }
+    EXPECT_EQ(col->size(), 100);
+}
+
+TEST(PredicateColumnTest, ReserveString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(50);
+    EXPECT_EQ(col->size(), 0);
+}
+
+// ============================================================================
+// Test byte_size() and allocated_bytes() for all types
+// ============================================================================
+TEST(PredicateColumnTest, ByteSizeInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    col->reserve(5);
+    EXPECT_EQ(col->byte_size(), 0);
+    Int32 val = 1;
+    col->insert_data(reinterpret_cast<const char*>(&val), sizeof(val));
+    EXPECT_EQ(col->byte_size(), sizeof(Int32));
+    col->insert_data(reinterpret_cast<const char*>(&val), sizeof(val));
+    EXPECT_EQ(col->byte_size(), 2 * sizeof(Int32));
+    EXPECT_EQ(col->allocated_bytes(), col->byte_size());
+}
+
+TEST(PredicateColumnTest, ByteSizeBigInt) {
+    auto col = PredicateColumnType<TYPE_BIGINT>::create();
+    col->reserve(3);
+    Int64 val = 12345;
+    col->insert_data(reinterpret_cast<const char*>(&val), sizeof(val));
+    col->insert_data(reinterpret_cast<const char*>(&val), sizeof(val));
+    col->insert_data(reinterpret_cast<const char*>(&val), sizeof(val));
+    EXPECT_EQ(col->byte_size(), 3 * sizeof(Int64));
+    EXPECT_EQ(col->allocated_bytes(), 3 * sizeof(Int64));
+}
+
+TEST(PredicateColumnTest, ByteSizeString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(3);
+    std::string s = "hello";
+    col->insert_data(s.data(), s.size());
+    EXPECT_EQ(col->byte_size(), sizeof(StringRef));
+}
+
+// ============================================================================
+// Test get_name() for all types
+// ============================================================================
+TEST(PredicateColumnTest, GetNameAllTypes) {
+    EXPECT_EQ(PredicateColumnType<TYPE_BOOLEAN>::create()->get_name(), "BOOL");
+    EXPECT_EQ(PredicateColumnType<TYPE_TINYINT>::create()->get_name(), "TINYINT");
+    EXPECT_EQ(PredicateColumnType<TYPE_SMALLINT>::create()->get_name(), "SMALLINT");
+    EXPECT_EQ(PredicateColumnType<TYPE_INT>::create()->get_name(), "INT");
+    EXPECT_EQ(PredicateColumnType<TYPE_BIGINT>::create()->get_name(), "BIGINT");
+    EXPECT_EQ(PredicateColumnType<TYPE_LARGEINT>::create()->get_name(), "LARGEINT");
+    EXPECT_EQ(PredicateColumnType<TYPE_FLOAT>::create()->get_name(), "FLOAT");
+    EXPECT_EQ(PredicateColumnType<TYPE_DOUBLE>::create()->get_name(), "DOUBLE");
+    EXPECT_EQ(PredicateColumnType<TYPE_DATE>::create()->get_name(), "DATE");
+    EXPECT_EQ(PredicateColumnType<TYPE_DATEV2>::create()->get_name(), "DATEV2");
+    EXPECT_EQ(PredicateColumnType<TYPE_DATETIME>::create()->get_name(), "DATETIME");
+    EXPECT_EQ(PredicateColumnType<TYPE_DATETIMEV2>::create()->get_name(), "DATETIMEV2");
+    EXPECT_EQ(PredicateColumnType<TYPE_CHAR>::create()->get_name(), "CHAR");
+    EXPECT_EQ(PredicateColumnType<TYPE_VARCHAR>::create()->get_name(), "VARCHAR");
+    EXPECT_EQ(PredicateColumnType<TYPE_STRING>::create()->get_name(), "STRING");
+    EXPECT_EQ(PredicateColumnType<TYPE_DECIMALV2>::create()->get_name(), "DECIMALV2");
+    EXPECT_EQ(PredicateColumnType<TYPE_DECIMAL32>::create()->get_name(), "DECIMAL32");
+    EXPECT_EQ(PredicateColumnType<TYPE_DECIMAL64>::create()->get_name(), "DECIMAL64");
+    EXPECT_EQ(PredicateColumnType<TYPE_DECIMAL128I>::create()->get_name(), "DECIMAL128I");
+    EXPECT_EQ(PredicateColumnType<TYPE_DECIMAL256>::create()->get_name(), "DECIMAL256");
+    EXPECT_EQ(PredicateColumnType<TYPE_IPV4>::create()->get_name(), "IPV4");
+    EXPECT_EQ(PredicateColumnType<TYPE_IPV6>::create()->get_name(), "IPV6");
+}
+
+// ============================================================================
+// Test clone_resized() for all types
+// ============================================================================
+TEST(PredicateColumnTest, CloneResizedInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    col->reserve(5);
+    Int32 val = 42;
+    col->insert_data(reinterpret_cast<const char*>(&val), sizeof(val));
+    auto cloned = col->clone_resized(0);
+    EXPECT_EQ(cloned->size(), 0);
+}
+
+TEST(PredicateColumnTest, CloneResizedString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(5);
+    std::string s = "test";
+    col->insert_data(s.data(), s.size());
+    auto cloned = col->clone_resized(0);
+    EXPECT_EQ(cloned->size(), 0);
+}
+
+// MORE_TESTS_PLACEHOLDER_4
+
+// ============================================================================
+// Test get_data_at() for string types
+// ============================================================================
+TEST(PredicateColumnTest, GetDataAtString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(3);
+    std::string s1 = "abc";
+    std::string s2 = "defgh";
+    col->insert_data(s1.data(), s1.size());
+    col->insert_data(s2.data(), s2.size());
+    StringRef ref0 = col->get_data_at(0);
+    StringRef ref1 = col->get_data_at(1);
+    EXPECT_EQ(std::string(ref0.data, ref0.size), "abc");
+    EXPECT_EQ(std::string(ref1.data, ref1.size), "defgh");
+}
+
+TEST(PredicateColumnTest, GetDataAtVarchar) {
+    auto col = PredicateColumnType<TYPE_VARCHAR>::create();
+    col->reserve(2);
+    std::string s1 = "test";
+    col->insert_data(s1.data(), s1.size());
+    StringRef ref = col->get_data_at(0);
+    EXPECT_EQ(std::string(ref.data, ref.size), "test");
+}
+
+TEST(PredicateColumnTest, GetDataAtCharTrimsSpaces) {
+    auto col = PredicateColumnType<TYPE_CHAR>::create();
+    col->reserve(2);
+    // CHAR type trims trailing spaces in get_data_at

Review Comment:
   `PredicateColumnType<TYPE_CHAR>::get_data_at()` does not trim trailing spaces here; it uses `strnlen`, so the CHAR-specific branch only shortens trailing `\0` bytes from fixed-width CHAR storage. With `"abc   "` this branch is a no-op, so the current name/comment are misleading and the test doesn't actually validate the CHAR behavior. Please use zero-padded input (for example `std::string("abc\0\0\0", 6)`) and assert the returned size becomes 3.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](column) Fix incorrect for-loop [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #62517:
URL: https://github.com/apache/doris/pull/62517#discussion_r3091418715


##########
be/test/core/column/predicate_column_test.cpp:
##########
@@ -0,0 +1,1100 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#include "core/column/predicate_column.h"
+
+#include <gtest/gtest-message.h>
+#include <gtest/gtest-test-part.h>
+#include <gtest/gtest.h>
+
+#include "common/status.h"
+#include "core/column/column_decimal.h"
+#include "core/column/column_nullable.h"
+#include "core/data_type/data_type.h"
+#include "core/data_type/data_type_number.h"
+#include "core/data_type/define_primitive_type.h"
+#include "core/decimal12.h"
+#include "core/field.h"
+#include "core/types.h"
+#include "core/uint24.h"
+#include "core/value/vdatetime_value.h"
+#include "testutil/column_helper.h"
+
+namespace doris {
+
+// ============================================================================
+// Test size() for all types
+// ============================================================================
+TEST(PredicateColumnTest, SizeBoolean) {
+    auto col = PredicateColumnType<TYPE_BOOLEAN>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 2);
+}
+
+TEST(PredicateColumnTest, SizeTinyInt) {
+    auto col = PredicateColumnType<TYPE_TINYINT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+// MORE_TESTS_PLACEHOLDER_1
+
+TEST(PredicateColumnTest, SizeSmallInt) {
+    auto col = PredicateColumnType<TYPE_SMALLINT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeBigInt) {
+    auto col = PredicateColumnType<TYPE_BIGINT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeLargeInt) {
+    auto col = PredicateColumnType<TYPE_LARGEINT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeFloat) {
+    auto col = PredicateColumnType<TYPE_FLOAT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDouble) {
+    auto col = PredicateColumnType<TYPE_DOUBLE>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDate) {
+    auto col = PredicateColumnType<TYPE_DATE>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDateV2) {
+    auto col = PredicateColumnType<TYPE_DATEV2>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDateTime) {
+    auto col = PredicateColumnType<TYPE_DATETIME>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDateTimeV2) {
+    auto col = PredicateColumnType<TYPE_DATETIMEV2>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeChar) {
+    auto col = PredicateColumnType<TYPE_CHAR>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeVarchar) {
+    auto col = PredicateColumnType<TYPE_VARCHAR>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDecimalV2) {
+    auto col = PredicateColumnType<TYPE_DECIMALV2>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDecimal32) {
+    auto col = PredicateColumnType<TYPE_DECIMAL32>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDecimal64) {
+    auto col = PredicateColumnType<TYPE_DECIMAL64>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDecimal128I) {
+    auto col = PredicateColumnType<TYPE_DECIMAL128I>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDecimal256) {
+    auto col = PredicateColumnType<TYPE_DECIMAL256>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeIPv4) {
+    auto col = PredicateColumnType<TYPE_IPV4>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeIPv6) {
+    auto col = PredicateColumnType<TYPE_IPV6>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+// ============================================================================
+// Test insert_data() for all types
+// ============================================================================
+TEST(PredicateColumnTest, InsertDataBoolean) {
+    auto col = PredicateColumnType<TYPE_BOOLEAN>::create();
+    col->reserve(3);
+    UInt8 vals[] = {0, 1, 1};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], 0);
+    EXPECT_EQ(col->get_data()[1], 1);
+    EXPECT_EQ(col->get_data()[2], 1);
+}
+
+TEST(PredicateColumnTest, InsertDataTinyInt) {
+    auto col = PredicateColumnType<TYPE_TINYINT>::create();
+    col->reserve(3);
+    Int8 vals[] = {-128, 0, 127};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], -128);
+    EXPECT_EQ(col->get_data()[1], 0);
+    EXPECT_EQ(col->get_data()[2], 127);
+}
+
+TEST(PredicateColumnTest, InsertDataSmallInt) {
+    auto col = PredicateColumnType<TYPE_SMALLINT>::create();
+    col->reserve(3);
+    Int16 vals[] = {-32768, 0, 32767};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], -32768);
+    EXPECT_EQ(col->get_data()[1], 0);
+    EXPECT_EQ(col->get_data()[2], 32767);
+}
+
+TEST(PredicateColumnTest, InsertDataInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    col->reserve(3);
+    Int32 vals[] = {INT32_MIN, 0, INT32_MAX};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], INT32_MIN);
+    EXPECT_EQ(col->get_data()[1], 0);
+    EXPECT_EQ(col->get_data()[2], INT32_MAX);
+}
+
+TEST(PredicateColumnTest, InsertDataBigInt) {
+    auto col = PredicateColumnType<TYPE_BIGINT>::create();
+    col->reserve(3);
+    Int64 vals[] = {INT64_MIN, 0, INT64_MAX};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], INT64_MIN);
+    EXPECT_EQ(col->get_data()[1], 0);
+    EXPECT_EQ(col->get_data()[2], INT64_MAX);
+}
+
+TEST(PredicateColumnTest, InsertDataLargeInt) {
+    auto col = PredicateColumnType<TYPE_LARGEINT>::create();
+    col->reserve(3);
+    Int128 vals[] = {Int128(-1) << 100, Int128(0), Int128(1) << 100};

Review Comment:
   `Int128(-1) << 100` is undefined behavior in C++ because the left operand is negative. That makes this regression value compiler-dependent instead of a stable oracle. Please build the magnitude first and then negate it.
   
   ```suggestion
       Int128 vals[] = {-(Int128(1) << 100), Int128(0), Int128(1) << 100};
   ```



##########
be/test/core/column/predicate_column_test.cpp:
##########
@@ -0,0 +1,1100 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#include "core/column/predicate_column.h"
+
+#include <gtest/gtest-message.h>
+#include <gtest/gtest-test-part.h>
+#include <gtest/gtest.h>
+
+#include "common/status.h"
+#include "core/column/column_decimal.h"
+#include "core/column/column_nullable.h"
+#include "core/data_type/data_type.h"
+#include "core/data_type/data_type_number.h"
+#include "core/data_type/define_primitive_type.h"
+#include "core/decimal12.h"
+#include "core/field.h"
+#include "core/types.h"
+#include "core/uint24.h"
+#include "core/value/vdatetime_value.h"
+#include "testutil/column_helper.h"
+
+namespace doris {
+
+// ============================================================================
+// Test size() for all types
+// ============================================================================
+TEST(PredicateColumnTest, SizeBoolean) {
+    auto col = PredicateColumnType<TYPE_BOOLEAN>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 2);
+}
+
+TEST(PredicateColumnTest, SizeTinyInt) {
+    auto col = PredicateColumnType<TYPE_TINYINT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+// MORE_TESTS_PLACEHOLDER_1
+
+TEST(PredicateColumnTest, SizeSmallInt) {
+    auto col = PredicateColumnType<TYPE_SMALLINT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeBigInt) {
+    auto col = PredicateColumnType<TYPE_BIGINT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeLargeInt) {
+    auto col = PredicateColumnType<TYPE_LARGEINT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeFloat) {
+    auto col = PredicateColumnType<TYPE_FLOAT>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDouble) {
+    auto col = PredicateColumnType<TYPE_DOUBLE>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDate) {
+    auto col = PredicateColumnType<TYPE_DATE>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDateV2) {
+    auto col = PredicateColumnType<TYPE_DATEV2>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDateTime) {
+    auto col = PredicateColumnType<TYPE_DATETIME>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDateTimeV2) {
+    auto col = PredicateColumnType<TYPE_DATETIMEV2>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeChar) {
+    auto col = PredicateColumnType<TYPE_CHAR>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeVarchar) {
+    auto col = PredicateColumnType<TYPE_VARCHAR>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDecimalV2) {
+    auto col = PredicateColumnType<TYPE_DECIMALV2>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDecimal32) {
+    auto col = PredicateColumnType<TYPE_DECIMAL32>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDecimal64) {
+    auto col = PredicateColumnType<TYPE_DECIMAL64>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDecimal128I) {
+    auto col = PredicateColumnType<TYPE_DECIMAL128I>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeDecimal256) {
+    auto col = PredicateColumnType<TYPE_DECIMAL256>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeIPv4) {
+    auto col = PredicateColumnType<TYPE_IPV4>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, SizeIPv6) {
+    auto col = PredicateColumnType<TYPE_IPV6>::create();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+}
+
+// ============================================================================
+// Test insert_data() for all types
+// ============================================================================
+TEST(PredicateColumnTest, InsertDataBoolean) {
+    auto col = PredicateColumnType<TYPE_BOOLEAN>::create();
+    col->reserve(3);
+    UInt8 vals[] = {0, 1, 1};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], 0);
+    EXPECT_EQ(col->get_data()[1], 1);
+    EXPECT_EQ(col->get_data()[2], 1);
+}
+
+TEST(PredicateColumnTest, InsertDataTinyInt) {
+    auto col = PredicateColumnType<TYPE_TINYINT>::create();
+    col->reserve(3);
+    Int8 vals[] = {-128, 0, 127};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], -128);
+    EXPECT_EQ(col->get_data()[1], 0);
+    EXPECT_EQ(col->get_data()[2], 127);
+}
+
+TEST(PredicateColumnTest, InsertDataSmallInt) {
+    auto col = PredicateColumnType<TYPE_SMALLINT>::create();
+    col->reserve(3);
+    Int16 vals[] = {-32768, 0, 32767};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], -32768);
+    EXPECT_EQ(col->get_data()[1], 0);
+    EXPECT_EQ(col->get_data()[2], 32767);
+}
+
+TEST(PredicateColumnTest, InsertDataInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    col->reserve(3);
+    Int32 vals[] = {INT32_MIN, 0, INT32_MAX};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], INT32_MIN);
+    EXPECT_EQ(col->get_data()[1], 0);
+    EXPECT_EQ(col->get_data()[2], INT32_MAX);
+}
+
+TEST(PredicateColumnTest, InsertDataBigInt) {
+    auto col = PredicateColumnType<TYPE_BIGINT>::create();
+    col->reserve(3);
+    Int64 vals[] = {INT64_MIN, 0, INT64_MAX};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], INT64_MIN);
+    EXPECT_EQ(col->get_data()[1], 0);
+    EXPECT_EQ(col->get_data()[2], INT64_MAX);
+}
+
+TEST(PredicateColumnTest, InsertDataLargeInt) {
+    auto col = PredicateColumnType<TYPE_LARGEINT>::create();
+    col->reserve(3);
+    Int128 vals[] = {Int128(-1) << 100, Int128(0), Int128(1) << 100};
+    for (auto& v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], vals[0]);
+    EXPECT_EQ(col->get_data()[1], vals[1]);
+    EXPECT_EQ(col->get_data()[2], vals[2]);
+}
+
+TEST(PredicateColumnTest, InsertDataFloat) {
+    auto col = PredicateColumnType<TYPE_FLOAT>::create();
+    col->reserve(3);
+    Float32 vals[] = {-3.14f, 0.0f, 2.718f};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_FLOAT_EQ(col->get_data()[0], -3.14f);
+    EXPECT_FLOAT_EQ(col->get_data()[1], 0.0f);
+    EXPECT_FLOAT_EQ(col->get_data()[2], 2.718f);
+}
+
+TEST(PredicateColumnTest, InsertDataDouble) {
+    auto col = PredicateColumnType<TYPE_DOUBLE>::create();
+    col->reserve(3);
+    Float64 vals[] = {-3.14159265358979, 0.0, 2.71828182845904};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_DOUBLE_EQ(col->get_data()[0], -3.14159265358979);
+    EXPECT_DOUBLE_EQ(col->get_data()[1], 0.0);
+    EXPECT_DOUBLE_EQ(col->get_data()[2], 2.71828182845904);
+}
+
+TEST(PredicateColumnTest, InsertDataDateV2) {
+    auto col = PredicateColumnType<TYPE_DATEV2>::create();
+    col->reserve(3);
+    uint32_t vals[] = {20230115, 20230620, 20231231};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+}
+
+TEST(PredicateColumnTest, InsertDataDateTimeV2) {
+    auto col = PredicateColumnType<TYPE_DATETIMEV2>::create();
+    col->reserve(3);
+    uint64_t vals[] = {1234567890123ULL, 2345678901234ULL, 3456789012345ULL};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+}
+
+TEST(PredicateColumnTest, InsertDataString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(3);
+    std::string s1 = "hello";
+    std::string s2 = "world";
+    std::string s3 = "";
+    col->insert_data(s1.data(), s1.size());
+    col->insert_data(s2.data(), s2.size());
+    col->insert_data(s3.data(), s3.size());
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(std::string(col->get_data()[0].data, col->get_data()[0].size), "hello");
+    EXPECT_EQ(std::string(col->get_data()[1].data, col->get_data()[1].size), "world");
+    EXPECT_EQ(col->get_data()[2].size, 0);
+}
+
+TEST(PredicateColumnTest, InsertDataDecimal32) {
+    auto col = PredicateColumnType<TYPE_DECIMAL32>::create();
+    col->reserve(3);
+    Decimal32 vals[] = {Decimal32(12345), Decimal32(-67890), Decimal32(0)};
+    for (auto& v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], Decimal32(12345));
+    EXPECT_EQ(col->get_data()[1], Decimal32(-67890));
+    EXPECT_EQ(col->get_data()[2], Decimal32(0));
+}
+
+TEST(PredicateColumnTest, InsertDataDecimal64) {
+    auto col = PredicateColumnType<TYPE_DECIMAL64>::create();
+    col->reserve(3);
+    Decimal64 vals[] = {Decimal64(Int64(123456789012LL)), Decimal64(Int64(-987654321098LL)),
+                        Decimal64(Int64(0))};
+    for (auto& v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], Decimal64(Int64(123456789012LL)));
+    EXPECT_EQ(col->get_data()[1], Decimal64(Int64(-987654321098LL)));
+    EXPECT_EQ(col->get_data()[2], Decimal64(Int64(0)));
+}
+
+TEST(PredicateColumnTest, InsertDataIPv4) {
+    auto col = PredicateColumnType<TYPE_IPV4>::create();
+    col->reserve(3);
+    IPv4 vals[] = {IPv4(0x7F000001), IPv4(0xC0A80001), IPv4(0x00000000)};
+    for (auto v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], IPv4(0x7F000001));
+    EXPECT_EQ(col->get_data()[1], IPv4(0xC0A80001));
+    EXPECT_EQ(col->get_data()[2], IPv4(0x00000000));
+}
+
+TEST(PredicateColumnTest, InsertDataIPv6) {
+    auto col = PredicateColumnType<TYPE_IPV6>::create();
+    col->reserve(2);
+    IPv6 vals[] = {IPv6(1), IPv6(0)};
+    for (auto& v : vals) {
+        col->insert_data(reinterpret_cast<const char*>(&v), sizeof(v));
+    }
+    EXPECT_EQ(col->size(), 2);
+    EXPECT_EQ(col->get_data()[0], IPv6(1));
+    EXPECT_EQ(col->get_data()[1], IPv6(0));
+}
+
+// MORE_TESTS_PLACEHOLDER_2
+
+// ============================================================================
+// Test insert_many_fix_len_data() for numeric types
+// ============================================================================
+TEST(PredicateColumnTest, InsertManyFixLenDataInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    col->reserve(5);
+    Int32 vals[] = {1, 2, 3, 4, 5};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 5);
+    EXPECT_EQ(col->size(), 5);
+    for (int i = 0; i < 5; i++) {
+        EXPECT_EQ(col->get_data()[i], i + 1);
+    }
+}
+
+TEST(PredicateColumnTest, InsertManyFixLenDataBigInt) {
+    auto col = PredicateColumnType<TYPE_BIGINT>::create();
+    col->reserve(3);
+    Int64 vals[] = {100000000000LL, 200000000000LL, 300000000000LL};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 3);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], 100000000000LL);
+    EXPECT_EQ(col->get_data()[1], 200000000000LL);
+    EXPECT_EQ(col->get_data()[2], 300000000000LL);
+}
+
+TEST(PredicateColumnTest, InsertManyFixLenDataFloat) {
+    auto col = PredicateColumnType<TYPE_FLOAT>::create();
+    col->reserve(3);
+    Float32 vals[] = {1.1f, 2.2f, 3.3f};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 3);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_FLOAT_EQ(col->get_data()[0], 1.1f);
+    EXPECT_FLOAT_EQ(col->get_data()[1], 2.2f);
+    EXPECT_FLOAT_EQ(col->get_data()[2], 3.3f);
+}
+
+TEST(PredicateColumnTest, InsertManyFixLenDataDouble) {
+    auto col = PredicateColumnType<TYPE_DOUBLE>::create();
+    col->reserve(3);
+    Float64 vals[] = {1.11, 2.22, 3.33};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 3);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_DOUBLE_EQ(col->get_data()[0], 1.11);
+    EXPECT_DOUBLE_EQ(col->get_data()[1], 2.22);
+    EXPECT_DOUBLE_EQ(col->get_data()[2], 3.33);
+}
+
+TEST(PredicateColumnTest, InsertManyFixLenDataDateV2) {
+    auto col = PredicateColumnType<TYPE_DATEV2>::create();
+    col->reserve(3);
+    uint32_t vals[] = {20230115, 20230620, 20231231};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 3);
+    EXPECT_EQ(col->size(), 3);
+}
+
+TEST(PredicateColumnTest, InsertManyFixLenDataDateTimeV2) {
+    auto col = PredicateColumnType<TYPE_DATETIMEV2>::create();
+    col->reserve(3);
+    uint64_t vals[] = {1234567890123ULL, 2345678901234ULL, 3456789012345ULL};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 3);
+    EXPECT_EQ(col->size(), 3);
+}
+
+TEST(PredicateColumnTest, InsertManyFixLenDataDecimal32) {
+    auto col = PredicateColumnType<TYPE_DECIMAL32>::create();
+    col->reserve(3);
+    Decimal32 vals[] = {Decimal32(100), Decimal32(200), Decimal32(300)};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 3);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], Decimal32(100));
+    EXPECT_EQ(col->get_data()[1], Decimal32(200));
+    EXPECT_EQ(col->get_data()[2], Decimal32(300));
+}
+
+TEST(PredicateColumnTest, InsertManyFixLenDataDecimal64) {
+    auto col = PredicateColumnType<TYPE_DECIMAL64>::create();
+    col->reserve(3);
+    Decimal64 vals[] = {Decimal64(Int64(1000)), Decimal64(Int64(2000)), Decimal64(Int64(3000))};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 3);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], Decimal64(Int64(1000)));
+    EXPECT_EQ(col->get_data()[1], Decimal64(Int64(2000)));
+    EXPECT_EQ(col->get_data()[2], Decimal64(Int64(3000)));
+}
+
+TEST(PredicateColumnTest, InsertManyFixLenDataIPv4) {
+    auto col = PredicateColumnType<TYPE_IPV4>::create();
+    col->reserve(3);
+    IPv4 vals[] = {IPv4(1), IPv4(2), IPv4(3)};
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(vals), 3);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(col->get_data()[0], IPv4(1));
+    EXPECT_EQ(col->get_data()[1], IPv4(2));
+    EXPECT_EQ(col->get_data()[2], IPv4(3));
+}
+
+// ============================================================================
+// Test insert_many_date() for TYPE_DATE
+// ============================================================================
+TEST(PredicateColumnTest, InsertManyDate) {
+    auto col = PredicateColumnType<TYPE_DATE>::create();
+    col->reserve(3);
+    uint24_t date_vals[3];
+    date_vals[0] = (2023 << 9) | (1 << 5) | 15;
+    date_vals[1] = (2023 << 9) | (6 << 5) | 20;
+    date_vals[2] = (2023 << 9) | (12 << 5) | 31;
+    col->insert_many_date(reinterpret_cast<const char*>(date_vals), 3);
+    EXPECT_EQ(col->size(), 3);
+}
+
+// ============================================================================
+// Test insert_many_datetime() for TYPE_DATETIME
+// ============================================================================
+TEST(PredicateColumnTest, InsertManyDateTime) {
+    auto col = PredicateColumnType<TYPE_DATETIME>::create();
+    col->reserve(3);
+    uint64_t datetime_vals[] = {20230115120000ULL, 20230620153045ULL, 20231231235959ULL};
+    col->insert_many_datetime(reinterpret_cast<const char*>(datetime_vals), 3);
+    EXPECT_EQ(col->size(), 3);
+}
+
+// ============================================================================
+// Test insert_many_decimalv2() for TYPE_DECIMALV2
+// ============================================================================
+TEST(PredicateColumnTest, InsertManyDecimalV2) {
+    auto col = PredicateColumnType<TYPE_DECIMALV2>::create();
+    col->reserve(3);
+    decimal12_t decimals[3];
+    decimals[0].integer = 123;
+    decimals[0].fraction = 456000000;
+    decimals[1].integer = -789;
+    decimals[1].fraction = 123000000;
+    decimals[2].integer = 0;
+    decimals[2].fraction = 999000000;
+    col->insert_many_fix_len_data(reinterpret_cast<const char*>(decimals), 3);
+    EXPECT_EQ(col->size(), 3);
+}
+
+// ============================================================================
+// Test insert_many_strings() for string types
+// ============================================================================
+TEST(PredicateColumnTest, InsertManyStringsString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(5);
+    StringRef strings[] = {StringRef("one", 3), StringRef("two", 3), StringRef("three", 5)};
+    col->insert_many_strings(strings, 3);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(std::string(col->get_data()[0].data, col->get_data()[0].size), "one");
+    EXPECT_EQ(std::string(col->get_data()[1].data, col->get_data()[1].size), "two");
+    EXPECT_EQ(std::string(col->get_data()[2].data, col->get_data()[2].size), "three");
+}
+
+TEST(PredicateColumnTest, InsertManyStringsVarchar) {
+    auto col = PredicateColumnType<TYPE_VARCHAR>::create();
+    col->reserve(3);
+    StringRef strings[] = {StringRef("abc", 3), StringRef("defgh", 5)};
+    col->insert_many_strings(strings, 2);
+    EXPECT_EQ(col->size(), 2);
+    EXPECT_EQ(std::string(col->get_data()[0].data, col->get_data()[0].size), "abc");
+    EXPECT_EQ(std::string(col->get_data()[1].data, col->get_data()[1].size), "defgh");
+}
+
+TEST(PredicateColumnTest, InsertManyStringsChar) {
+    auto col = PredicateColumnType<TYPE_CHAR>::create();
+    col->reserve(3);
+    StringRef strings[] = {StringRef("ab", 2), StringRef("cd", 2)};
+    col->insert_many_strings(strings, 2);
+    EXPECT_EQ(col->size(), 2);
+}
+
+TEST(PredicateColumnTest, InsertManyStringsEmpty) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(3);
+    col->insert_many_strings(nullptr, 0);
+    EXPECT_EQ(col->size(), 0);
+}
+
+// ============================================================================
+// Test insert_many_continuous_binary_data() for string types
+// ============================================================================
+TEST(PredicateColumnTest, InsertManyContinuousBinaryDataString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(3);
+    const char* data = "helloworld!";
+    uint32_t offsets[] = {0, 5, 10, 11};
+    col->insert_many_continuous_binary_data(data, offsets, 3);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(std::string(col->get_data()[0].data, col->get_data()[0].size), "hello");
+    EXPECT_EQ(std::string(col->get_data()[1].data, col->get_data()[1].size), "world");
+    EXPECT_EQ(std::string(col->get_data()[2].data, col->get_data()[2].size), "!");
+}
+
+TEST(PredicateColumnTest, InsertManyContinuousBinaryDataVarchar) {
+    auto col = PredicateColumnType<TYPE_VARCHAR>::create();
+    col->reserve(2);
+    const char* data = "abcdef";
+    uint32_t offsets[] = {0, 3, 6};
+    col->insert_many_continuous_binary_data(data, offsets, 2);
+    EXPECT_EQ(col->size(), 2);
+    EXPECT_EQ(std::string(col->get_data()[0].data, col->get_data()[0].size), "abc");
+    EXPECT_EQ(std::string(col->get_data()[1].data, col->get_data()[1].size), "def");
+}
+
+TEST(PredicateColumnTest, InsertManyContinuousBinaryDataEmpty) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(3);
+    const char* data = "test";
+    uint32_t offsets[] = {0};
+    col->insert_many_continuous_binary_data(data, offsets, 0);
+    EXPECT_EQ(col->size(), 0);
+}
+
+// ============================================================================
+// Test insert_many_dict_data() for string types
+// ============================================================================
+TEST(PredicateColumnTest, InsertManyDictDataString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(5);
+    StringRef dict[] = {StringRef("apple", 5), StringRef("banana", 6), StringRef("cherry", 6)};
+    int32_t codewords[] = {0, 1, 2, 0, 1};
+    col->insert_many_dict_data(codewords, 0, dict, 5, 3);
+    EXPECT_EQ(col->size(), 5);
+    EXPECT_EQ(std::string(col->get_data()[0].data, col->get_data()[0].size), "apple");
+    EXPECT_EQ(std::string(col->get_data()[1].data, col->get_data()[1].size), "banana");
+    EXPECT_EQ(std::string(col->get_data()[2].data, col->get_data()[2].size), "cherry");
+    EXPECT_EQ(std::string(col->get_data()[3].data, col->get_data()[3].size), "apple");
+    EXPECT_EQ(std::string(col->get_data()[4].data, col->get_data()[4].size), "banana");
+}
+
+TEST(PredicateColumnTest, InsertManyDictDataVarchar) {
+    auto col = PredicateColumnType<TYPE_VARCHAR>::create();
+    col->reserve(3);
+    StringRef dict[] = {StringRef("x", 1), StringRef("yy", 2)};
+    int32_t codewords[] = {0, 1, 0};
+    col->insert_many_dict_data(codewords, 0, dict, 3, 2);
+    EXPECT_EQ(col->size(), 3);
+    EXPECT_EQ(std::string(col->get_data()[0].data, col->get_data()[0].size), "x");
+    EXPECT_EQ(std::string(col->get_data()[1].data, col->get_data()[1].size), "yy");
+    EXPECT_EQ(std::string(col->get_data()[2].data, col->get_data()[2].size), "x");
+}
+
+// MORE_TESTS_PLACEHOLDER_3
+
+// ============================================================================
+// Test insert_duplicate_fields() for all types
+// ============================================================================
+TEST(PredicateColumnTest, InsertDuplicateFieldsString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(10);
+    std::string test_str = "hello";
+    Field field = Field::create_field<TYPE_STRING>(test_str);
+    col->insert_duplicate_fields(field, 5);
+    EXPECT_EQ(col->get_data()[col->size() - 1].data,
+              col->get_data()[0].data + (col->size() - 1) * test_str.size());
+    EXPECT_EQ(col->size(), 5);
+    for (size_t i = 0; i < 5; i++) {
+        StringRef ref = col->get_data()[i];
+        EXPECT_EQ(std::string(ref.data, ref.size), test_str);
+    }
+    // Insert another batch to verify memory doesn't overlap
+    std::string str2 = "world";
+    Field field2 = Field::create_field<TYPE_STRING>(str2);
+    col->insert_duplicate_fields(field2, 3);
+    EXPECT_EQ(col->size(), 8);
+    for (size_t i = 0; i < 5; i++) {
+        EXPECT_EQ(std::string(col->get_data()[i].data, col->get_data()[i].size), test_str);
+    }
+    for (size_t i = 5; i < 8; i++) {
+        EXPECT_EQ(std::string(col->get_data()[i].data, col->get_data()[i].size), str2);
+    }
+}
+
+TEST(PredicateColumnTest, InsertDuplicateFieldsInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    col->reserve(10);
+    Int32 val = 42;
+    Field field = Field::create_field<TYPE_INT>(val);
+    col->insert_duplicate_fields(field, 5);
+    EXPECT_EQ(col->size(), 5);
+    for (size_t i = 0; i < 5; i++) {
+        EXPECT_EQ(col->get_data()[i], 42);
+    }
+}
+
+TEST(PredicateColumnTest, InsertDuplicateFieldsLargeInt) {
+    auto col = PredicateColumnType<TYPE_LARGEINT>::create();
+    col->reserve(10);
+    Int128 val = Int128(123456789012345LL) * Int128(1000000000LL);
+    Field field = Field::create_field<TYPE_LARGEINT>(val);
+    col->insert_duplicate_fields(field, 3);
+    EXPECT_EQ(col->size(), 3);
+    for (size_t i = 0; i < 3; i++) {
+        EXPECT_EQ(col->get_data()[i], val);
+    }
+}
+
+TEST(PredicateColumnTest, InsertDuplicateFieldsZeroCount) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    col->reserve(5);
+    Int32 val = 42;
+    Field field = Field::create_field<TYPE_INT>(val);
+    col->insert_duplicate_fields(field, 0);
+    EXPECT_EQ(col->size(), 0);
+}
+
+// ============================================================================
+// Test insert_default() for all types
+// ============================================================================
+TEST(PredicateColumnTest, InsertDefaultInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    col->reserve(3);
+    col->insert_default();
+    col->insert_default();
+    EXPECT_EQ(col->size(), 2);
+    EXPECT_EQ(col->get_data()[0], 0);
+    EXPECT_EQ(col->get_data()[1], 0);
+}
+
+TEST(PredicateColumnTest, InsertDefaultDouble) {
+    auto col = PredicateColumnType<TYPE_DOUBLE>::create();
+    col->reserve(2);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+    EXPECT_DOUBLE_EQ(col->get_data()[0], 0.0);
+}
+
+TEST(PredicateColumnTest, InsertDefaultString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(2);
+    col->insert_default();
+    EXPECT_EQ(col->size(), 1);
+    EXPECT_EQ(col->get_data()[0].size, 0);
+}
+
+// ============================================================================
+// Test clear() for all types
+// ============================================================================
+TEST(PredicateColumnTest, ClearInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    col->reserve(10);
+    Int32 val = 42;
+    col->insert_data(reinterpret_cast<const char*>(&val), sizeof(val));
+    col->insert_data(reinterpret_cast<const char*>(&val), sizeof(val));
+    EXPECT_EQ(col->size(), 2);
+    col->clear();
+    EXPECT_EQ(col->size(), 0);
+    col->insert_data(reinterpret_cast<const char*>(&val), sizeof(val));
+    EXPECT_EQ(col->size(), 1);
+}
+
+TEST(PredicateColumnTest, ClearString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(5);
+    std::string s = "test";
+    col->insert_data(s.data(), s.size());
+    EXPECT_EQ(col->size(), 1);
+    col->clear();
+    EXPECT_EQ(col->size(), 0);
+}
+
+// ============================================================================
+// Test reserve() for all types
+// ============================================================================
+TEST(PredicateColumnTest, ReserveInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    col->reserve(100);
+    EXPECT_EQ(col->size(), 0);
+    for (int i = 0; i < 100; i++) {
+        Int32 val = i;
+        col->insert_data(reinterpret_cast<const char*>(&val), sizeof(val));
+    }
+    EXPECT_EQ(col->size(), 100);
+}
+
+TEST(PredicateColumnTest, ReserveString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(50);
+    EXPECT_EQ(col->size(), 0);
+}
+
+// ============================================================================
+// Test byte_size() and allocated_bytes() for all types
+// ============================================================================
+TEST(PredicateColumnTest, ByteSizeInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    col->reserve(5);
+    EXPECT_EQ(col->byte_size(), 0);
+    Int32 val = 1;
+    col->insert_data(reinterpret_cast<const char*>(&val), sizeof(val));
+    EXPECT_EQ(col->byte_size(), sizeof(Int32));
+    col->insert_data(reinterpret_cast<const char*>(&val), sizeof(val));
+    EXPECT_EQ(col->byte_size(), 2 * sizeof(Int32));
+    EXPECT_EQ(col->allocated_bytes(), col->byte_size());
+}
+
+TEST(PredicateColumnTest, ByteSizeBigInt) {
+    auto col = PredicateColumnType<TYPE_BIGINT>::create();
+    col->reserve(3);
+    Int64 val = 12345;
+    col->insert_data(reinterpret_cast<const char*>(&val), sizeof(val));
+    col->insert_data(reinterpret_cast<const char*>(&val), sizeof(val));
+    col->insert_data(reinterpret_cast<const char*>(&val), sizeof(val));
+    EXPECT_EQ(col->byte_size(), 3 * sizeof(Int64));
+    EXPECT_EQ(col->allocated_bytes(), 3 * sizeof(Int64));
+}
+
+TEST(PredicateColumnTest, ByteSizeString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(3);
+    std::string s = "hello";
+    col->insert_data(s.data(), s.size());
+    EXPECT_EQ(col->byte_size(), sizeof(StringRef));
+}
+
+// ============================================================================
+// Test get_name() for all types
+// ============================================================================
+TEST(PredicateColumnTest, GetNameAllTypes) {
+    EXPECT_EQ(PredicateColumnType<TYPE_BOOLEAN>::create()->get_name(), "BOOL");
+    EXPECT_EQ(PredicateColumnType<TYPE_TINYINT>::create()->get_name(), "TINYINT");
+    EXPECT_EQ(PredicateColumnType<TYPE_SMALLINT>::create()->get_name(), "SMALLINT");
+    EXPECT_EQ(PredicateColumnType<TYPE_INT>::create()->get_name(), "INT");
+    EXPECT_EQ(PredicateColumnType<TYPE_BIGINT>::create()->get_name(), "BIGINT");
+    EXPECT_EQ(PredicateColumnType<TYPE_LARGEINT>::create()->get_name(), "LARGEINT");
+    EXPECT_EQ(PredicateColumnType<TYPE_FLOAT>::create()->get_name(), "FLOAT");
+    EXPECT_EQ(PredicateColumnType<TYPE_DOUBLE>::create()->get_name(), "DOUBLE");
+    EXPECT_EQ(PredicateColumnType<TYPE_DATE>::create()->get_name(), "DATE");
+    EXPECT_EQ(PredicateColumnType<TYPE_DATEV2>::create()->get_name(), "DATEV2");
+    EXPECT_EQ(PredicateColumnType<TYPE_DATETIME>::create()->get_name(), "DATETIME");
+    EXPECT_EQ(PredicateColumnType<TYPE_DATETIMEV2>::create()->get_name(), "DATETIMEV2");
+    EXPECT_EQ(PredicateColumnType<TYPE_CHAR>::create()->get_name(), "CHAR");
+    EXPECT_EQ(PredicateColumnType<TYPE_VARCHAR>::create()->get_name(), "VARCHAR");
+    EXPECT_EQ(PredicateColumnType<TYPE_STRING>::create()->get_name(), "STRING");
+    EXPECT_EQ(PredicateColumnType<TYPE_DECIMALV2>::create()->get_name(), "DECIMALV2");
+    EXPECT_EQ(PredicateColumnType<TYPE_DECIMAL32>::create()->get_name(), "DECIMAL32");
+    EXPECT_EQ(PredicateColumnType<TYPE_DECIMAL64>::create()->get_name(), "DECIMAL64");
+    EXPECT_EQ(PredicateColumnType<TYPE_DECIMAL128I>::create()->get_name(), "DECIMAL128I");
+    EXPECT_EQ(PredicateColumnType<TYPE_DECIMAL256>::create()->get_name(), "DECIMAL256");
+    EXPECT_EQ(PredicateColumnType<TYPE_IPV4>::create()->get_name(), "IPV4");
+    EXPECT_EQ(PredicateColumnType<TYPE_IPV6>::create()->get_name(), "IPV6");
+}
+
+// ============================================================================
+// Test clone_resized() for all types
+// ============================================================================
+TEST(PredicateColumnTest, CloneResizedInt) {
+    auto col = PredicateColumnType<TYPE_INT>::create();
+    col->reserve(5);
+    Int32 val = 42;
+    col->insert_data(reinterpret_cast<const char*>(&val), sizeof(val));
+    auto cloned = col->clone_resized(0);
+    EXPECT_EQ(cloned->size(), 0);
+}
+
+TEST(PredicateColumnTest, CloneResizedString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(5);
+    std::string s = "test";
+    col->insert_data(s.data(), s.size());
+    auto cloned = col->clone_resized(0);
+    EXPECT_EQ(cloned->size(), 0);
+}
+
+// MORE_TESTS_PLACEHOLDER_4
+
+// ============================================================================
+// Test get_data_at() for string types
+// ============================================================================
+TEST(PredicateColumnTest, GetDataAtString) {
+    auto col = PredicateColumnType<TYPE_STRING>::create();
+    col->reserve(3);
+    std::string s1 = "abc";
+    std::string s2 = "defgh";
+    col->insert_data(s1.data(), s1.size());
+    col->insert_data(s2.data(), s2.size());
+    StringRef ref0 = col->get_data_at(0);
+    StringRef ref1 = col->get_data_at(1);
+    EXPECT_EQ(std::string(ref0.data, ref0.size), "abc");
+    EXPECT_EQ(std::string(ref1.data, ref1.size), "defgh");
+}
+
+TEST(PredicateColumnTest, GetDataAtVarchar) {
+    auto col = PredicateColumnType<TYPE_VARCHAR>::create();
+    col->reserve(2);
+    std::string s1 = "test";
+    col->insert_data(s1.data(), s1.size());
+    StringRef ref = col->get_data_at(0);
+    EXPECT_EQ(std::string(ref.data, ref.size), "test");
+}
+
+TEST(PredicateColumnTest, GetDataAtCharTrimsSpaces) {
+    auto col = PredicateColumnType<TYPE_CHAR>::create();
+    col->reserve(2);
+    std::string s1 = "abc   ";

Review Comment:
   This input does not exercise the `TYPE_CHAR` behavior the test name describes. `PredicateColumnType<TYPE_CHAR>::get_data_at()` uses `strnlen`, so the special branch trims trailing `\0`, not spaces. With `"abc   "`, the result still has length 6, so this test would pass even if the `TYPE_CHAR` branch were removed. Please either rename the test/comment to match the current behavior or feed a buffer with trailing zero bytes and assert the trimmed length.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](column) Fix incorrect for-loop [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #62517:
URL: https://github.com/apache/doris/pull/62517#issuecomment-4251468418

   # BE Regression && UT Coverage Report
   Increment line coverage `100.00% (1/1)` :tada:
   
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/62517_637a72ada256049592d50b4af5ee74909f7fcb41_merge/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/62517_637a72ada256049592d50b4af5ee74909f7fcb41_merge/report/index.html)
   | Category          | Coverage           |
   |-------------------|--------------------|
   | Function Coverage | 73.57% (27383/37222) |
   | Line Coverage     | 57.26% (295868/516668) |
   | Region Coverage   | 54.32% (245670/452296) |
   | Branch Coverage   | 56.04% (106619/190250) |


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](column) Fix incorrect for-loop [doris]

Posted by "Gabriel39 (via GitHub)" <gi...@apache.org>.
Gabriel39 commented on PR #62517:
URL: https://github.com/apache/doris/pull/62517#issuecomment-4257951358

   /review
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](column) Fix incorrect for-loop [doris]

Posted by "Gabriel39 (via GitHub)" <gi...@apache.org>.
Gabriel39 commented on PR #62517:
URL: https://github.com/apache/doris/pull/62517#issuecomment-4258740044

   /review


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](column) Fix incorrect for-loop [doris]

Posted by "Gabriel39 (via GitHub)" <gi...@apache.org>.
Gabriel39 commented on PR #62517:
URL: https://github.com/apache/doris/pull/62517#issuecomment-4252896489

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](column) Fix incorrect for-loop [doris]

Posted by "Gabriel39 (via GitHub)" <gi...@apache.org>.
Gabriel39 commented on PR #62517:
URL: https://github.com/apache/doris/pull/62517#issuecomment-4250282428

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](column) Fix incorrect for-loop [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #62517:
URL: https://github.com/apache/doris/pull/62517#issuecomment-4256842946

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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](column) Fix incorrect for-loop [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #62517:
URL: https://github.com/apache/doris/pull/62517#issuecomment-4249911610

   
   Thank you for your contribution to Apache Doris.
   Don't know what should be done next? See [How to process your PR](https://cwiki.apache.org/confluence/display/DORIS/How+to+process+your+PR).
   
   Please clearly describe your PR:
   1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
   2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
   3. What features were added. Why was this function added?
   4. Which code was refactored and why was this part of the code refactored?
   5. Which functions were optimized and what is the difference before and after the optimization?
       


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](column) Fix incorrect for-loop [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #62517:
URL: https://github.com/apache/doris/pull/62517#issuecomment-4249936438

   PR approved by anyone and no changes requested.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](column) Fix incorrect for-loop [doris]

Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei commented on code in PR #62517:
URL: https://github.com/apache/doris/pull/62517#discussion_r3086066856


##########
be/test/core/column/predicate_column_test.cpp:
##########
@@ -0,0 +1,97 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#include "core/column/predicate_column.h"
+
+#include <gtest/gtest-message.h>
+#include <gtest/gtest-test-part.h>
+#include <gtest/gtest.h>
+
+#include "common/status.h"
+#include "core/column/column_nullable.h"
+#include "core/data_type/data_type.h"
+#include "core/data_type/data_type_number.h"
+#include "core/data_type/define_primitive_type.h"
+#include "core/field.h"
+#include "core/types.h"
+#include "testutil/column_helper.h"
+
+namespace doris {
+
+TEST(PredicateColumnTest, InsertDuplicateFieldsString) {

Review Comment:
   add more test to predicate column to coverer all the path of the class.
   And add more type to the test especially for datev1 and decimalv2, string. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](column) Fix incorrect for-loop [doris]

Posted by "Gabriel39 (via GitHub)" <gi...@apache.org>.
Gabriel39 commented on PR #62517:
URL: https://github.com/apache/doris/pull/62517#issuecomment-4258740762

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](column) Fix incorrect for-loop [doris]

Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei merged PR #62517:
URL: https://github.com/apache/doris/pull/62517


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org