Skip to content

[fix](mtmv) Fix IVM row binlog schema mapping - #20

Merged
yujun777 merged 2 commits into
yujun777:ivmfrom
seawinde:test-mtmv-row-binlog-yujun777-ivm
Jul 20, 2026
Merged

yujun777 merged 2 commits into
yujun777:ivmfrom
seawinde:test-mtmv-row-binlog-yujun777-ivm

Conversation

@seawinde

@seawinde seawinde commented Jun 26, 2026 •

Copy link
Copy Markdown
Collaborator

What problem does this PR solve?

Issue Number: N/A

Related PR: N/A

Problem Summary:
IVM MTMV keeps __DORIS_IVM_ROW_ID_COL__ as a hidden key column. Row binlog must write this hidden key into the physical row-binlog schema so BE can build the correct key index and historical-row lookup keys. At the same time, other IVM hidden internal columns should not be exposed through normal row-binlog output.

Root cause:
The row-binlog schema was generated from visible base columns only. For IVM MTMV, that dropped the hidden row id key from the physical row-binlog schema. BE row-binlog writing also used visible-column counts and visible-value ranges, which are not enough once a hidden key is part of the source schema.

Example source schema:

source cid column role
0 k1 visible key
1 __DORIS_IVM_ROW_ID_COL__ hidden key
2 v1 visible value
3 hidden IVM state column hidden non-key internal column

The physical row-binlog normal area should contain k1, __DORIS_IVM_ROW_ID_COL__, and v1 in source-schema order. The hidden non-key internal column is not written to row binlog. BEFORE columns are generated only for visible value columns such as v1.

Change Summary:

File Change Description
OlapTable.java Generate row-binlog schema from full base schema, include visible columns plus the hidden IVM row id key, skip hidden non-key columns, and reject unsupported hidden key columns.
TableBinlogFunction.java Allow binlog() for OLAP-family tables such as MTMV, and hide IVM hidden columns from TVF output unless show_hidden_columns is enabled.
row_binlog_segment_writer.{h,cpp} Use a row-binlog normal-column prefix that includes visible columns and hidden key columns, keep converted source columns indexed by source cid, filter partial/missing cids to that normal prefix, include hidden key columns in lookup/key-index input, and build BEFORE columns from visible value columns only.
row_binlog_source_data_writer_test.cpp Cover BE row-binlog source writing with hidden row id as a key column and rejection of invalid visible/key columns after hidden non-key columns.
OlapTableRowBinlogSchemaTest.java Cover IVM row-binlog schema layout with hidden row id and without hidden IVM state columns.
test_ivm_mtmv_row_binlog.groovy/.out Add regression coverage for IVM MV rows, row-binlog output, and hidden row id consistency when hidden columns are shown.

Row-binlog write flow after this PR:

graph TD
    A[FE full source schema] --> B[Keep visible columns and hidden IVM row id key]
    B --> C[Skip hidden non-key IVM internal columns]
    C --> D[BE normal prefix count]
    D --> E[Write AFTER normal columns]
    D --> F[Build key index and historical lookup from all key columns]
    F --> G[Fill BEFORE visible value columns]
    B --> H[binlog TVF filters IVM hidden columns by show_hidden_columns]
Loading

Release note

Fixed IVM MTMV row-binlog schema and write handling so the hidden row id key is preserved in physical row binlog while IVM hidden columns remain hidden from normal binlog() output.

Check List (For Author)

  • Test

    • Regression test
      • Added regression-test/suites/mtmv_p0/ivm/test_ivm_mtmv_row_binlog.groovy and expected output. Pending cluster verification.
    • Unit Test
      • ./run-fe-ut.sh --run org.apache.doris.catalog.OlapTableRowBinlogSchemaTest
      • Remote lite1: ./run-be-ut.sh --run --filter=RowBinlogSourceDataWriterTest.* -j20 (2 tests passed)
    • Manual test (add detailed scripts or steps below)
      • ./build-support/clang-format.sh
      • ./build-support/check-format.sh
      • git diff --check
      • Remote lite1: ./build.sh --be -j20
    • 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
  • Behavior changed:

    • No.
    • Yes. IVM MTMV row binlog now keeps the hidden row id key in the physical row-binlog schema, and binlog() can read MTMV row binlog while filtering IVM hidden columns by default.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@seawinde
seawinde force-pushed the test-mtmv-row-binlog-yujun777-ivm branch 3 times, most recently from 567229a to 6f647f2 Compare June 29, 2026 13:21
@seawinde
seawinde marked this pull request as ready for review June 29, 2026 13:35
@seawinde
seawinde force-pushed the test-mtmv-row-binlog-yujun777-ivm branch from d869ae6 to 329507b Compare June 30, 2026 05:23
@yujun777
yujun777 force-pushed the ivm branch 2 times, most recently from 8348390 to bff985f Compare July 6, 2026 03:15
yujun777 pushed a commit that referenced this pull request Jul 8, 2026
Issue Number: None

Related PR: None

Problem Summary: 
UBSAN/ASAN reported a heap-use-after-free during BE shutdown in
TimeSharingTaskExecutor destruction. The scan executor owned pending
split runners, while the split runner function held ScannerContext, and
ScannerContext cleaned up its task by copying the executor shared_ptr
back from the scheduler. When the scheduler was already destroying that
shared_ptr, copying the same shared_ptr member could re-enter the
executor destruction path and release members such as MetricEntity
twice. Keep ScannerContext cleanup tied to a weak reference of the
executor captured when the task is created, and avoid capturing the
scheduler this pointer in split cleanup lambdas.

旧代码的链路大致是:

1. TaskExecutorSimplifiedScanScheduler 析构,成员 _task_executor 是最后阶段要销毁的
std::shared_ptr<TaskExecutor>。
2. 这个 shared_ptr 引用计数降到 0,于是开始执行
TimeSharingTaskExecutor::~TimeSharingTaskExecutor()。
  3. TimeSharingTaskExecutor 析构时会释放它持有的 split/task 容器。
4. split 里有 ScannerSplitRunner,它的 std::function 捕获了
std::shared_ptr<ScannerContext>。
5. 释放 split 会释放这个 captured ScannerContext,于是进入
ScannerContext::~ScannerContext()。
  6. 旧代码在 ScannerContext::~ScannerContext() 里又执行:

  task_executor_scheduler->task_executor()->remove_task(_task_handle)

  而 task_executor() 返回的是:

std::shared_ptr<TaskExecutor> task_executor() const { return
_task_executor; }

  也就是从 scheduler 的 _task_executor 成员再复制一个 shared_ptr。

问题在于:第 1 步里,scheduler 的 _task_executor 这个 shared_ptr 正在析构,并且它已经触发了
TimeSharingTaskExecutor 的析构。此时再从同一个 member
shared_ptr 复制引用,等价于在其析构过程中重新操作它的 control block。这个 control block 可能已经处于
release-last-use 路径,随后临时复制出来的
shared_ptr 析构又会再次 release 同一个 control block,导致 TimeSharingTaskExecutor
析构链被重入或二次释放其成员。

```
/usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/shared_ptr_base.h:1069:11: runtime error: member call on address 0x7c63e14891c0 which does not point to an object of type 'std::_Sp_counted_base<>'
0x7c63e14891c0: note: object has invalid vptr
 00 00 00 00 e0 74 1d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 be be be be d0 26 2b e1
              ^~~~~~~~~~~~~~~~~~~~~~~
              invalid vptr
    #0 0x55e77069caee in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/shared_ptr_base.h:1069:11
    #1 0x55e77069caee in std::__shared_ptr<doris::MetricEntity, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/shared_ptr_base.h:1531:31
    #2 0x55e77069caee in doris::TimeSharingTaskExecutor::~TimeSharingTaskExecutor() be/build_ASAN/./be/build_ASAN/../src/exec/scan/task_executor/time_sharing/time_sharing_task_executor.cpp:306:1
    #3 0x55e75b584397 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release_last_use() /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/shared_ptr_base.h:174:2
    #4 0x55e7706486ac in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/shared_ptr_base.h:1069:11
    #5 0x55e7706486ac in std::__shared_ptr<doris::TaskExecutor, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/shared_ptr_base.h:1531:31
    #6 0x55e7706486ac in doris::ScannerContext::~ScannerContext() be/build_ASAN/./be/build_ASAN/../src/exec/scan/scanner_context.cpp:277:13
    #7 0x55e75b584397 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release_last_use() /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/shared_ptr_base.h:174:2
    #8 0x55e7706f288d in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/shared_ptr_base.h:1069:11
    #9 0x55e7706f288d in std::__shared_ptr<doris::ScannerContext, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/shared_ptr_base.h:1531:31
    #10 0x55e7706f288d in doris::ScannerScheduler::submit(std::shared_ptr<doris::ScannerContext>, std::shared_ptr<doris::ScanTask>)::$_0::operator()() const::'lambda'()::~() be/build_ASAN/./be/build_ASAN/../src/exec/scan/scanner_scheduler.cpp:77:26
    #11 0x55e7706f39bb in std::_Function_base::_Base_manager<doris::ScannerScheduler::submit(std::shared_ptr<doris::ScannerContext>, std::shared_ptr<doris::ScanTask>)::$_0::operator()() const::'lambda'()>::_M_destroy(std::_Any_data&, std::integral_constant<bool, false>) /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/std_function.h:177:4
    #12 0x55e7706f39bb in std::_Function_base::_Base_manager<doris::ScannerScheduler::submit(std::shared_ptr<doris::ScannerContext>, std::shared_ptr<doris::ScanTask>)::$_0::operator()() const::'lambda'()>::_M_manager(std::_Any_data&, std::_Any_data const&, std::_Manager_operation) /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/std_function.h:205:8
    #13 0x55e7706f39bb in std::_Function_handler<bool (), doris::ScannerScheduler::submit(std::shared_ptr<doris::ScannerContext>, std::shared_ptr<doris::ScanTask>)::$_0::operator()() const::'lambda'()>::_M_manager(std::_Any_data&, std::_Any_data const&, std::_Manager_operation) /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/std_function.h:284:6
    #14 0x55e770702246 in std::_Function_base::~_Function_base() /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/std_function.h:246:2
    #15 0x55e770702246 in doris::ScannerSplitRunner::~ScannerSplitRunner() be/build_ASAN/../src/exec/scan/scanner_scheduler.h:62:7
    #16 0x55e75b584397 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release_last_use() /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/shared_ptr_base.h:174:2
    #17 0x55e7706e11e9 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/shared_ptr_base.h:1069:11
    #18 0x55e7706e11e9 in std::__shared_ptr<doris::SplitRunner, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/shared_ptr_base.h:1531:31
    #19 0x55e7706e11e9 in doris::PrioritizedSplitRunner::~PrioritizedSplitRunner() be/build_ASAN/../src/exec/scan/task_executor/time_sharing/prioritized_split_runner.h:54:47
    #20 0x55e75b584397 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release_last_use() /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/shared_ptr_base.h:174:2
    #21 0x55e7706b8ba4 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/shared_ptr_base.h:1069:11
    #22 0x55e7706b8ba4 in std::__shared_ptr<doris::PrioritizedSplitRunner, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/shared_ptr_base.h:1531:31
    #23 0x55e7706b8ba4 in void std::destroy_at<std::shared_ptr<doris::PrioritizedSplitRunner> >(std::shared_ptr<doris::PrioritizedSplitRunner>*) /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/stl_construct.h:88:15
    #24 0x55e7706b8ba4 in void std::allocator_traits<std::allocator<std::__detail::_Hash_node<std::shared_ptr<doris::PrioritizedSplitRunner>, false> > >::destroy<std::shared_ptr<doris::PrioritizedSplitRunner> >(std::allocator<std::__detail::_Hash_node<std::shared_ptr<doris::PrioritizedSplitRunner>, false> >&, std::shared_ptr<doris::PrioritizedSplitRunner>*) /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/alloc_traits.h:698:4
    #25 0x55e7706b8ba4 in std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::shared_ptr<doris::PrioritizedSplitRunner>, false> > >::_M_deallocate_node(std::__detail::_Hash_node<std::shared_ptr<doris::PrioritizedSplitRunner>, false>*) /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/hashtable_policy.h:1572:7
    #26 0x55e7706b89ff in std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::shared_ptr<doris::PrioritizedSplitRunner>, false> > >::_M_deallocate_nodes(std::__detail::_Hash_node<std::shared_ptr<doris::PrioritizedSplitRunner>, false>*) /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/hashtable_policy.h:1594:4
    #27 0x55e7706b89ff in std::_Hashtable<std::shared_ptr<doris::PrioritizedSplitRunner>, std::shared_ptr<doris::PrioritizedSplitRunner>, std::allocator<std::shared_ptr<doris::PrioritizedSplitRunner> >, std::__detail::_Identity, std::equal_to<std::shared_ptr<doris::PrioritizedSplitRunner> >, std::hash<std::shared_ptr<doris::PrioritizedSplitRunner> >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, true, true> >::~_Hashtable() /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/hashtable.h:1852:13
    #28 0x55e77069c6ca in std::unordered_set<std::shared_ptr<doris::PrioritizedSplitRunner>, std::hash<std::shared_ptr<doris::PrioritizedSplitRunner> >, std::equal_to<std::shared_ptr<doris::PrioritizedSplitRunner> >, std::allocator<std::shared_ptr<doris::PrioritizedSplitRunner> > >::~unordered_set() /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/unordered_set.h:107:11
    #29 0x55e77069c6ca in doris::TimeSharingTaskExecutor::~TimeSharingTaskExecutor() be/build_ASAN/./be/build_ASAN/../src/exec/scan/task_executor/time_sharing/time_sharing_task_executor.cpp:306:1
    #30 0x55e75b583fa1 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/shared_ptr_base.h:345:8
    #31 0x55e770688ecf in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/shared_ptr_base.h:1069:11
    #32 0x55e770688ecf in std::__shared_ptr<doris::TaskExecutor, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/shared_ptr_base.h:1531:31
    #33 0x55e770688ecf in doris::TaskExecutorSimplifiedScanScheduler::~TaskExecutorSimplifiedScanScheduler() be/build_ASAN/../src/exec/scan/scanner_scheduler.h:266:5
    #34 0x55e7706891ed in doris::TaskExecutorSimplifiedScanScheduler::~TaskExecutorSimplifiedScanScheduler() be/build_ASAN/../src/exec/scan/scanner_scheduler.h:261:53
    apache#35 0x55e7744d5afa in std::default_delete<doris::ScannerScheduler>::operator()(doris::ScannerScheduler*) const /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/unique_ptr.h:93:2
    apache#36 0x55e7744d5afa in std::__uniq_ptr_impl<doris::ScannerScheduler, std::default_delete<doris::ScannerScheduler> >::reset(doris::ScannerScheduler*) /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/unique_ptr.h:205:4
    apache#37 0x55e7744d5afa in std::unique_ptr<doris::ScannerScheduler, std::default_delete<doris::ScannerScheduler> >::reset(doris::ScannerScheduler*) /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/unique_ptr.h:512:7
    apache#38 0x55e7744d5afa in doris::WorkloadGroup::destroy_schedulers() be/build_ASAN/./be/build_ASAN/../src/runtime/workload_group/workload_group.cpp:776:22
    apache#39 0x55e774501af0 in doris::WorkloadGroupMgr::destroy_schedulers() be/build_ASAN/./be/build_ASAN/../src/runtime/workload_group/workload_group_manager.cpp:977:23
    apache#40 0x55e7740e0ddc in doris::ExecEnv::destroy() be/build_ASAN/./be/build_ASAN/../src/runtime/exec_env_init.cpp:892:34
    apache#41 0x55e75b5601f2 in main be/build_ASAN/./be/build_ASAN/../src/service/doris_main.cpp:734:15
    apache#42 0x7f53e1e6b082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
    apache#43 0x55e75b470029 in _start (/mnt/ssd01/pipline/OpenSourceDoris/clusterEnv/P0/Cluster0/be/lib/doris_be+0x247b8029)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/shared_ptr_base.h:1069:11
```

### What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

### Release note

None

### 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:
apache/doris-website#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 -->
@yujun777
yujun777 force-pushed the ivm branch 3 times, most recently from 7beaf23 to 0d66088 Compare July 15, 2026 12:45
@seawinde
seawinde force-pushed the test-mtmv-row-binlog-yujun777-ivm branch from 7a62dd0 to ef3a1b4 Compare July 16, 2026 08:59
seawinde added 2 commits July 19, 2026 15:45
### What problem does this PR solve?

Issue Number: N/A

Related PR: apache#20

Problem Summary: IVM MTMVs use a hidden row-id key that is persisted in the row-binlog schema. The generic binlog table function rejected MTMV tables and could expose internal IVM columns unconditionally. Allow OlapTable subclasses such as MTMV, hide IVM internal columns by default, expose them when show_hidden_columns is enabled, and add focused BE and regression coverage. The latest yujun777/ivm base already contains the generic hidden-key writer support from upstream, so this commit reuses that implementation instead of replacing it.

### Release note

Support querying row binlog for incremental materialized views while keeping internal IVM columns hidden by default.

### Check List (For Author)

- Test: Not run yet (verification follows after applying the related BE test compatibility change)
- Behavior changed: Yes. binlog() accepts IVM MTMV tables and follows show_hidden_columns for internal IVM columns.
- Does this need documentation: No
### What problem does this PR solve?

Issue Number: N/A

Related PR: apache#65076, apache#65663

Problem Summary: The row-binlog writer BE unit test no longer compiles after allocate_binlog_lsn changed to accept a vector reference. After that compile error is fixed, the test aborts because its filtered row-binlog schema retains the metadata indexes from before two hidden columns were removed and its assertions still expect the previous LSN, operation, and timestamp layout. Initialize the LSN vector before passing it by reference, reset the TSO, LSN, and operation indexes after filtering, and verify values using the current metadata order and types.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - ./run-be-ut.sh --run '--filter=GroupRowsetWriterTest.*'
- Behavior changed: No
- Does this need documentation: No
@seawinde
seawinde force-pushed the test-mtmv-row-binlog-yujun777-ivm branch from ef3a1b4 to 0ef8b35 Compare July 19, 2026 07:46
@yujun777
yujun777 merged commit 5d3e987 into yujun777:ivm Jul 20, 2026
15 of 21 checks passed
yujun777 pushed a commit that referenced this pull request Jul 20, 2026
* [fix](row-binlog) Support IVM MTMV binlog access

### What problem does this PR solve?

Issue Number: N/A

Related PR: #20

Problem Summary: IVM MTMVs use a hidden row-id key that is persisted in the row-binlog schema. The generic binlog table function rejected MTMV tables and could expose internal IVM columns unconditionally. Allow OlapTable subclasses such as MTMV, hide IVM internal columns by default, expose them when show_hidden_columns is enabled, and add focused BE and regression coverage. The latest yujun777/ivm base already contains the generic hidden-key writer support from upstream, so this commit reuses that implementation instead of replacing it.

### Release note

Support querying row binlog for incremental materialized views while keeping internal IVM columns hidden by default.

### Check List (For Author)

- Test: Not run yet (verification follows after applying the related BE test compatibility change)
- Behavior changed: Yes. binlog() accepts IVM MTMV tables and follows show_hidden_columns for internal IVM columns.
- Does this need documentation: No

* [fix](be) Fix row binlog writer test metadata

### What problem does this PR solve?

Issue Number: N/A

Related PR: apache#65076, apache#65663

Problem Summary: The row-binlog writer BE unit test no longer compiles after allocate_binlog_lsn changed to accept a vector reference. After that compile error is fixed, the test aborts because its filtered row-binlog schema retains the metadata indexes from before two hidden columns were removed and its assertions still expect the previous LSN, operation, and timestamp layout. Initialize the LSN vector before passing it by reference, reset the TSO, LSN, and operation indexes after filtering, and verify values using the current metadata order and types.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - ./run-be-ut.sh --run '--filter=GroupRowsetWriterTest.*'
- Behavior changed: No
- Does this need documentation: No
yujun777 pushed a commit that referenced this pull request Jul 23, 2026
* [fix](row-binlog) Support IVM MTMV binlog access

### What problem does this PR solve?

Issue Number: N/A

Related PR: #20

Problem Summary: IVM MTMVs use a hidden row-id key that is persisted in the row-binlog schema. The generic binlog table function rejected MTMV tables and could expose internal IVM columns unconditionally. Allow OlapTable subclasses such as MTMV, hide IVM internal columns by default, expose them when show_hidden_columns is enabled, and add focused BE and regression coverage. The latest yujun777/ivm base already contains the generic hidden-key writer support from upstream, so this commit reuses that implementation instead of replacing it.

### Release note

Support querying row binlog for incremental materialized views while keeping internal IVM columns hidden by default.

### Check List (For Author)

- Test: Not run yet (verification follows after applying the related BE test compatibility change)
- Behavior changed: Yes. binlog() accepts IVM MTMV tables and follows show_hidden_columns for internal IVM columns.
- Does this need documentation: No

* [fix](be) Fix row binlog writer test metadata

### What problem does this PR solve?

Issue Number: N/A

Related PR: apache#65076, apache#65663

Problem Summary: The row-binlog writer BE unit test no longer compiles after allocate_binlog_lsn changed to accept a vector reference. After that compile error is fixed, the test aborts because its filtered row-binlog schema retains the metadata indexes from before two hidden columns were removed and its assertions still expect the previous LSN, operation, and timestamp layout. Initialize the LSN vector before passing it by reference, reset the TSO, LSN, and operation indexes after filtering, and verify values using the current metadata order and types.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - ./run-be-ut.sh --run '--filter=GroupRowsetWriterTest.*'
- Behavior changed: No
- Does this need documentation: No
yujun777 pushed a commit that referenced this pull request Jul 30, 2026
* [fix](row-binlog) Support IVM MTMV binlog access

### What problem does this PR solve?

Issue Number: N/A

Related PR: #20

Problem Summary: IVM MTMVs use a hidden row-id key that is persisted in the row-binlog schema. The generic binlog table function rejected MTMV tables and could expose internal IVM columns unconditionally. Allow OlapTable subclasses such as MTMV, hide IVM internal columns by default, expose them when show_hidden_columns is enabled, and add focused BE and regression coverage. The latest yujun777/ivm base already contains the generic hidden-key writer support from upstream, so this commit reuses that implementation instead of replacing it.

### Release note

Support querying row binlog for incremental materialized views while keeping internal IVM columns hidden by default.

### Check List (For Author)

- Test: Not run yet (verification follows after applying the related BE test compatibility change)
- Behavior changed: Yes. binlog() accepts IVM MTMV tables and follows show_hidden_columns for internal IVM columns.
- Does this need documentation: No

* [fix](be) Fix row binlog writer test metadata

### What problem does this PR solve?

Issue Number: N/A

Related PR: apache#65076, apache#65663

Problem Summary: The row-binlog writer BE unit test no longer compiles after allocate_binlog_lsn changed to accept a vector reference. After that compile error is fixed, the test aborts because its filtered row-binlog schema retains the metadata indexes from before two hidden columns were removed and its assertions still expect the previous LSN, operation, and timestamp layout. Initialize the LSN vector before passing it by reference, reset the TSO, LSN, and operation indexes after filtering, and verify values using the current metadata order and types.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - ./run-be-ut.sh --run '--filter=GroupRowsetWriterTest.*'
- Behavior changed: No
- Does this need documentation: No
yujun777 pushed a commit that referenced this pull request Jul 31, 2026
* [fix](row-binlog) Support IVM MTMV binlog access

### What problem does this PR solve?

Issue Number: N/A

Related PR: #20

Problem Summary: IVM MTMVs use a hidden row-id key that is persisted in the row-binlog schema. The generic binlog table function rejected MTMV tables and could expose internal IVM columns unconditionally. Allow OlapTable subclasses such as MTMV, hide IVM internal columns by default, expose them when show_hidden_columns is enabled, and add focused BE and regression coverage. The latest yujun777/ivm base already contains the generic hidden-key writer support from upstream, so this commit reuses that implementation instead of replacing it.

### Release note

Support querying row binlog for incremental materialized views while keeping internal IVM columns hidden by default.

### Check List (For Author)

- Test: Not run yet (verification follows after applying the related BE test compatibility change)
- Behavior changed: Yes. binlog() accepts IVM MTMV tables and follows show_hidden_columns for internal IVM columns.
- Does this need documentation: No

* [fix](be) Fix row binlog writer test metadata

### What problem does this PR solve?

Issue Number: N/A

Related PR: apache#65076, apache#65663

Problem Summary: The row-binlog writer BE unit test no longer compiles after allocate_binlog_lsn changed to accept a vector reference. After that compile error is fixed, the test aborts because its filtered row-binlog schema retains the metadata indexes from before two hidden columns were removed and its assertions still expect the previous LSN, operation, and timestamp layout. Initialize the LSN vector before passing it by reference, reset the TSO, LSN, and operation indexes after filtering, and verify values using the current metadata order and types.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - ./run-be-ut.sh --run '--filter=GroupRowsetWriterTest.*'
- Behavior changed: No
- Does this need documentation: No
yujun777 pushed a commit that referenced this pull request Jul 31, 2026
* [fix](row-binlog) Support IVM MTMV binlog access

### What problem does this PR solve?

Issue Number: N/A

Related PR: #20

Problem Summary: IVM MTMVs use a hidden row-id key that is persisted in the row-binlog schema. The generic binlog table function rejected MTMV tables and could expose internal IVM columns unconditionally. Allow OlapTable subclasses such as MTMV, hide IVM internal columns by default, expose them when show_hidden_columns is enabled, and add focused BE and regression coverage. The latest yujun777/ivm base already contains the generic hidden-key writer support from upstream, so this commit reuses that implementation instead of replacing it.

### Release note

Support querying row binlog for incremental materialized views while keeping internal IVM columns hidden by default.

### Check List (For Author)

- Test: Not run yet (verification follows after applying the related BE test compatibility change)
- Behavior changed: Yes. binlog() accepts IVM MTMV tables and follows show_hidden_columns for internal IVM columns.
- Does this need documentation: No

* [fix](be) Fix row binlog writer test metadata

### What problem does this PR solve?

Issue Number: N/A

Related PR: apache#65076, apache#65663

Problem Summary: The row-binlog writer BE unit test no longer compiles after allocate_binlog_lsn changed to accept a vector reference. After that compile error is fixed, the test aborts because its filtered row-binlog schema retains the metadata indexes from before two hidden columns were removed and its assertions still expect the previous LSN, operation, and timestamp layout. Initialize the LSN vector before passing it by reference, reset the TSO, LSN, and operation indexes after filtering, and verify values using the current metadata order and types.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - ./run-be-ut.sh --run '--filter=GroupRowsetWriterTest.*'
- Behavior changed: No
- Does this need documentation: No
yujun777 pushed a commit that referenced this pull request Aug 4, 2026
* [fix](row-binlog) Support IVM MTMV binlog access

### What problem does this PR solve?

Issue Number: N/A

Related PR: #20

Problem Summary: IVM MTMVs use a hidden row-id key that is persisted in the row-binlog schema. The generic binlog table function rejected MTMV tables and could expose internal IVM columns unconditionally. Allow OlapTable subclasses such as MTMV, hide IVM internal columns by default, expose them when show_hidden_columns is enabled, and add focused BE and regression coverage. The latest yujun777/ivm base already contains the generic hidden-key writer support from upstream, so this commit reuses that implementation instead of replacing it.

### Release note

Support querying row binlog for incremental materialized views while keeping internal IVM columns hidden by default.

### Check List (For Author)

- Test: Not run yet (verification follows after applying the related BE test compatibility change)
- Behavior changed: Yes. binlog() accepts IVM MTMV tables and follows show_hidden_columns for internal IVM columns.
- Does this need documentation: No

* [fix](be) Fix row binlog writer test metadata

### What problem does this PR solve?

Issue Number: N/A

Related PR: apache#65076, apache#65663

Problem Summary: The row-binlog writer BE unit test no longer compiles after allocate_binlog_lsn changed to accept a vector reference. After that compile error is fixed, the test aborts because its filtered row-binlog schema retains the metadata indexes from before two hidden columns were removed and its assertions still expect the previous LSN, operation, and timestamp layout. Initialize the LSN vector before passing it by reference, reset the TSO, LSN, and operation indexes after filtering, and verify values using the current metadata order and types.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - ./run-be-ut.sh --run '--filter=GroupRowsetWriterTest.*'
- Behavior changed: No
- Does this need documentation: No
yujun777 pushed a commit that referenced this pull request Aug 10, 2026
* [fix](row-binlog) Support IVM MTMV binlog access

### What problem does this PR solve?

Issue Number: N/A

Related PR: #20

Problem Summary: IVM MTMVs use a hidden row-id key that is persisted in the row-binlog schema. The generic binlog table function rejected MTMV tables and could expose internal IVM columns unconditionally. Allow OlapTable subclasses such as MTMV, hide IVM internal columns by default, expose them when show_hidden_columns is enabled, and add focused BE and regression coverage. The latest yujun777/ivm base already contains the generic hidden-key writer support from upstream, so this commit reuses that implementation instead of replacing it.

### Release note

Support querying row binlog for incremental materialized views while keeping internal IVM columns hidden by default.

### Check List (For Author)

- Test: Not run yet (verification follows after applying the related BE test compatibility change)
- Behavior changed: Yes. binlog() accepts IVM MTMV tables and follows show_hidden_columns for internal IVM columns.
- Does this need documentation: No

* [fix](be) Fix row binlog writer test metadata

### What problem does this PR solve?

Issue Number: N/A

Related PR: apache#65076, apache#65663

Problem Summary: The row-binlog writer BE unit test no longer compiles after allocate_binlog_lsn changed to accept a vector reference. After that compile error is fixed, the test aborts because its filtered row-binlog schema retains the metadata indexes from before two hidden columns were removed and its assertions still expect the previous LSN, operation, and timestamp layout. Initialize the LSN vector before passing it by reference, reset the TSO, LSN, and operation indexes after filtering, and verify values using the current metadata order and types.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - ./run-be-ut.sh --run '--filter=GroupRowsetWriterTest.*'
- Behavior changed: No
- Does this need documentation: No
yujun777 pushed a commit that referenced this pull request Aug 17, 2026
* [fix](row-binlog) Support IVM MTMV binlog access

### What problem does this PR solve?

Issue Number: N/A

Related PR: #20

Problem Summary: IVM MTMVs use a hidden row-id key that is persisted in the row-binlog schema. The generic binlog table function rejected MTMV tables and could expose internal IVM columns unconditionally. Allow OlapTable subclasses such as MTMV, hide IVM internal columns by default, expose them when show_hidden_columns is enabled, and add focused BE and regression coverage. The latest yujun777/ivm base already contains the generic hidden-key writer support from upstream, so this commit reuses that implementation instead of replacing it.

### Release note

Support querying row binlog for incremental materialized views while keeping internal IVM columns hidden by default.

### Check List (For Author)

- Test: Not run yet (verification follows after applying the related BE test compatibility change)
- Behavior changed: Yes. binlog() accepts IVM MTMV tables and follows show_hidden_columns for internal IVM columns.
- Does this need documentation: No

* [fix](be) Fix row binlog writer test metadata

### What problem does this PR solve?

Issue Number: N/A

Related PR: apache#65076, apache#65663

Problem Summary: The row-binlog writer BE unit test no longer compiles after allocate_binlog_lsn changed to accept a vector reference. After that compile error is fixed, the test aborts because its filtered row-binlog schema retains the metadata indexes from before two hidden columns were removed and its assertions still expect the previous LSN, operation, and timestamp layout. Initialize the LSN vector before passing it by reference, reset the TSO, LSN, and operation indexes after filtering, and verify values using the current metadata order and types.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - ./run-be-ut.sh --run '--filter=GroupRowsetWriterTest.*'
- Behavior changed: No
- Does this need documentation: No
yujun777 pushed a commit that referenced this pull request Aug 17, 2026
* [fix](row-binlog) Support IVM MTMV binlog access

### What problem does this PR solve?

Issue Number: N/A

Related PR: #20

Problem Summary: IVM MTMVs use a hidden row-id key that is persisted in the row-binlog schema. The generic binlog table function rejected MTMV tables and could expose internal IVM columns unconditionally. Allow OlapTable subclasses such as MTMV, hide IVM internal columns by default, expose them when show_hidden_columns is enabled, and add focused BE and regression coverage. The latest yujun777/ivm base already contains the generic hidden-key writer support from upstream, so this commit reuses that implementation instead of replacing it.

### Release note

Support querying row binlog for incremental materialized views while keeping internal IVM columns hidden by default.

### Check List (For Author)

- Test: Not run yet (verification follows after applying the related BE test compatibility change)
- Behavior changed: Yes. binlog() accepts IVM MTMV tables and follows show_hidden_columns for internal IVM columns.
- Does this need documentation: No

* [fix](be) Fix row binlog writer test metadata

### What problem does this PR solve?

Issue Number: N/A

Related PR: apache#65076, apache#65663

Problem Summary: The row-binlog writer BE unit test no longer compiles after allocate_binlog_lsn changed to accept a vector reference. After that compile error is fixed, the test aborts because its filtered row-binlog schema retains the metadata indexes from before two hidden columns were removed and its assertions still expect the previous LSN, operation, and timestamp layout. Initialize the LSN vector before passing it by reference, reset the TSO, LSN, and operation indexes after filtering, and verify values using the current metadata order and types.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - ./run-be-ut.sh --run '--filter=GroupRowsetWriterTest.*'
- Behavior changed: No
- Does this need documentation: No
yujun777 pushed a commit that referenced this pull request Aug 19, 2026
* [fix](row-binlog) Support IVM MTMV binlog access

### What problem does this PR solve?

Issue Number: N/A

Related PR: #20

Problem Summary: IVM MTMVs use a hidden row-id key that is persisted in the row-binlog schema. The generic binlog table function rejected MTMV tables and could expose internal IVM columns unconditionally. Allow OlapTable subclasses such as MTMV, hide IVM internal columns by default, expose them when show_hidden_columns is enabled, and add focused BE and regression coverage. The latest yujun777/ivm base already contains the generic hidden-key writer support from upstream, so this commit reuses that implementation instead of replacing it.

### Release note

Support querying row binlog for incremental materialized views while keeping internal IVM columns hidden by default.

### Check List (For Author)

- Test: Not run yet (verification follows after applying the related BE test compatibility change)
- Behavior changed: Yes. binlog() accepts IVM MTMV tables and follows show_hidden_columns for internal IVM columns.
- Does this need documentation: No

* [fix](be) Fix row binlog writer test metadata

### What problem does this PR solve?

Issue Number: N/A

Related PR: apache#65076, apache#65663

Problem Summary: The row-binlog writer BE unit test no longer compiles after allocate_binlog_lsn changed to accept a vector reference. After that compile error is fixed, the test aborts because its filtered row-binlog schema retains the metadata indexes from before two hidden columns were removed and its assertions still expect the previous LSN, operation, and timestamp layout. Initialize the LSN vector before passing it by reference, reset the TSO, LSN, and operation indexes after filtering, and verify values using the current metadata order and types.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - ./run-be-ut.sh --run '--filter=GroupRowsetWriterTest.*'
- Behavior changed: No
- Does this need documentation: No
yujun777 pushed a commit that referenced this pull request Aug 25, 2026
* [fix](row-binlog) Support IVM MTMV binlog access

### What problem does this PR solve?

Issue Number: N/A

Related PR: #20

Problem Summary: IVM MTMVs use a hidden row-id key that is persisted in the row-binlog schema. The generic binlog table function rejected MTMV tables and could expose internal IVM columns unconditionally. Allow OlapTable subclasses such as MTMV, hide IVM internal columns by default, expose them when show_hidden_columns is enabled, and add focused BE and regression coverage. The latest yujun777/ivm base already contains the generic hidden-key writer support from upstream, so this commit reuses that implementation instead of replacing it.

### Release note

Support querying row binlog for incremental materialized views while keeping internal IVM columns hidden by default.

### Check List (For Author)

- Test: Not run yet (verification follows after applying the related BE test compatibility change)
- Behavior changed: Yes. binlog() accepts IVM MTMV tables and follows show_hidden_columns for internal IVM columns.
- Does this need documentation: No

* [fix](be) Fix row binlog writer test metadata

### What problem does this PR solve?

Issue Number: N/A

Related PR: apache#65076, apache#65663

Problem Summary: The row-binlog writer BE unit test no longer compiles after allocate_binlog_lsn changed to accept a vector reference. After that compile error is fixed, the test aborts because its filtered row-binlog schema retains the metadata indexes from before two hidden columns were removed and its assertions still expect the previous LSN, operation, and timestamp layout. Initialize the LSN vector before passing it by reference, reset the TSO, LSN, and operation indexes after filtering, and verify values using the current metadata order and types.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - ./run-be-ut.sh --run '--filter=GroupRowsetWriterTest.*'
- Behavior changed: No
- Does this need documentation: No
yujun777 pushed a commit that referenced this pull request Aug 27, 2026
* [fix](row-binlog) Support IVM MTMV binlog access

### What problem does this PR solve?

Issue Number: N/A

Related PR: #20

Problem Summary: IVM MTMVs use a hidden row-id key that is persisted in the row-binlog schema. The generic binlog table function rejected MTMV tables and could expose internal IVM columns unconditionally. Allow OlapTable subclasses such as MTMV, hide IVM internal columns by default, expose them when show_hidden_columns is enabled, and add focused BE and regression coverage. The latest yujun777/ivm base already contains the generic hidden-key writer support from upstream, so this commit reuses that implementation instead of replacing it.

### Release note

Support querying row binlog for incremental materialized views while keeping internal IVM columns hidden by default.

### Check List (For Author)

- Test: Not run yet (verification follows after applying the related BE test compatibility change)
- Behavior changed: Yes. binlog() accepts IVM MTMV tables and follows show_hidden_columns for internal IVM columns.
- Does this need documentation: No

* [fix](be) Fix row binlog writer test metadata

### What problem does this PR solve?

Issue Number: N/A

Related PR: apache#65076, apache#65663

Problem Summary: The row-binlog writer BE unit test no longer compiles after allocate_binlog_lsn changed to accept a vector reference. After that compile error is fixed, the test aborts because its filtered row-binlog schema retains the metadata indexes from before two hidden columns were removed and its assertions still expect the previous LSN, operation, and timestamp layout. Initialize the LSN vector before passing it by reference, reset the TSO, LSN, and operation indexes after filtering, and verify values using the current metadata order and types.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - ./run-be-ut.sh --run '--filter=GroupRowsetWriterTest.*'
- Behavior changed: No
- Does this need documentation: No
yujun777 pushed a commit that referenced this pull request Sep 1, 2026
* [fix](row-binlog) Support IVM MTMV binlog access

### What problem does this PR solve?

Issue Number: N/A

Related PR: #20

Problem Summary: IVM MTMVs use a hidden row-id key that is persisted in the row-binlog schema. The generic binlog table function rejected MTMV tables and could expose internal IVM columns unconditionally. Allow OlapTable subclasses such as MTMV, hide IVM internal columns by default, expose them when show_hidden_columns is enabled, and add focused BE and regression coverage. The latest yujun777/ivm base already contains the generic hidden-key writer support from upstream, so this commit reuses that implementation instead of replacing it.

### Release note

Support querying row binlog for incremental materialized views while keeping internal IVM columns hidden by default.

### Check List (For Author)

- Test: Not run yet (verification follows after applying the related BE test compatibility change)
- Behavior changed: Yes. binlog() accepts IVM MTMV tables and follows show_hidden_columns for internal IVM columns.
- Does this need documentation: No

* [fix](be) Fix row binlog writer test metadata

### What problem does this PR solve?

Issue Number: N/A

Related PR: apache#65076, apache#65663

Problem Summary: The row-binlog writer BE unit test no longer compiles after allocate_binlog_lsn changed to accept a vector reference. After that compile error is fixed, the test aborts because its filtered row-binlog schema retains the metadata indexes from before two hidden columns were removed and its assertions still expect the previous LSN, operation, and timestamp layout. Initialize the LSN vector before passing it by reference, reset the TSO, LSN, and operation indexes after filtering, and verify values using the current metadata order and types.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - ./run-be-ut.sh --run '--filter=GroupRowsetWriterTest.*'
- Behavior changed: No
- Does this need documentation: No
yujun777 pushed a commit that referenced this pull request Sep 2, 2026
* [fix](row-binlog) Support IVM MTMV binlog access

### What problem does this PR solve?

Issue Number: N/A

Related PR: #20

Problem Summary: IVM MTMVs use a hidden row-id key that is persisted in the row-binlog schema. The generic binlog table function rejected MTMV tables and could expose internal IVM columns unconditionally. Allow OlapTable subclasses such as MTMV, hide IVM internal columns by default, expose them when show_hidden_columns is enabled, and add focused BE and regression coverage. The latest yujun777/ivm base already contains the generic hidden-key writer support from upstream, so this commit reuses that implementation instead of replacing it.

### Release note

Support querying row binlog for incremental materialized views while keeping internal IVM columns hidden by default.

### Check List (For Author)

- Test: Not run yet (verification follows after applying the related BE test compatibility change)
- Behavior changed: Yes. binlog() accepts IVM MTMV tables and follows show_hidden_columns for internal IVM columns.
- Does this need documentation: No

* [fix](be) Fix row binlog writer test metadata

### What problem does this PR solve?

Issue Number: N/A

Related PR: apache#65076, apache#65663

Problem Summary: The row-binlog writer BE unit test no longer compiles after allocate_binlog_lsn changed to accept a vector reference. After that compile error is fixed, the test aborts because its filtered row-binlog schema retains the metadata indexes from before two hidden columns were removed and its assertions still expect the previous LSN, operation, and timestamp layout. Initialize the LSN vector before passing it by reference, reset the TSO, LSN, and operation indexes after filtering, and verify values using the current metadata order and types.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - ./run-be-ut.sh --run '--filter=GroupRowsetWriterTest.*'
- Behavior changed: No
- Does this need documentation: No
yujun777 pushed a commit that referenced this pull request Sep 3, 2026
* [fix](row-binlog) Support IVM MTMV binlog access

### What problem does this PR solve?

Issue Number: N/A

Related PR: #20

Problem Summary: IVM MTMVs use a hidden row-id key that is persisted in the row-binlog schema. The generic binlog table function rejected MTMV tables and could expose internal IVM columns unconditionally. Allow OlapTable subclasses such as MTMV, hide IVM internal columns by default, expose them when show_hidden_columns is enabled, and add focused BE and regression coverage. The latest yujun777/ivm base already contains the generic hidden-key writer support from upstream, so this commit reuses that implementation instead of replacing it.

### Release note

Support querying row binlog for incremental materialized views while keeping internal IVM columns hidden by default.

### Check List (For Author)

- Test: Not run yet (verification follows after applying the related BE test compatibility change)
- Behavior changed: Yes. binlog() accepts IVM MTMV tables and follows show_hidden_columns for internal IVM columns.
- Does this need documentation: No

* [fix](be) Fix row binlog writer test metadata

### What problem does this PR solve?

Issue Number: N/A

Related PR: apache#65076, apache#65663

Problem Summary: The row-binlog writer BE unit test no longer compiles after allocate_binlog_lsn changed to accept a vector reference. After that compile error is fixed, the test aborts because its filtered row-binlog schema retains the metadata indexes from before two hidden columns were removed and its assertions still expect the previous LSN, operation, and timestamp layout. Initialize the LSN vector before passing it by reference, reset the TSO, LSN, and operation indexes after filtering, and verify values using the current metadata order and types.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - ./run-be-ut.sh --run '--filter=GroupRowsetWriterTest.*'
- Behavior changed: No
- Does this need documentation: No
yujun777 pushed a commit that referenced this pull request Sep 3, 2026
* [fix](row-binlog) Support IVM MTMV binlog access

### What problem does this PR solve?

Issue Number: N/A

Related PR: #20

Problem Summary: IVM MTMVs use a hidden row-id key that is persisted in the row-binlog schema. The generic binlog table function rejected MTMV tables and could expose internal IVM columns unconditionally. Allow OlapTable subclasses such as MTMV, hide IVM internal columns by default, expose them when show_hidden_columns is enabled, and add focused BE and regression coverage. The latest yujun777/ivm base already contains the generic hidden-key writer support from upstream, so this commit reuses that implementation instead of replacing it.

### Release note

Support querying row binlog for incremental materialized views while keeping internal IVM columns hidden by default.

### Check List (For Author)

- Test: Not run yet (verification follows after applying the related BE test compatibility change)
- Behavior changed: Yes. binlog() accepts IVM MTMV tables and follows show_hidden_columns for internal IVM columns.
- Does this need documentation: No

* [fix](be) Fix row binlog writer test metadata

### What problem does this PR solve?

Issue Number: N/A

Related PR: apache#65076, apache#65663

Problem Summary: The row-binlog writer BE unit test no longer compiles after allocate_binlog_lsn changed to accept a vector reference. After that compile error is fixed, the test aborts because its filtered row-binlog schema retains the metadata indexes from before two hidden columns were removed and its assertions still expect the previous LSN, operation, and timestamp layout. Initialize the LSN vector before passing it by reference, reset the TSO, LSN, and operation indexes after filtering, and verify values using the current metadata order and types.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - ./run-be-ut.sh --run '--filter=GroupRowsetWriterTest.*'
- Behavior changed: No
- Does this need documentation: No
yujun777 pushed a commit that referenced this pull request Sep 3, 2026
* [fix](row-binlog) Support IVM MTMV binlog access

### What problem does this PR solve?

Issue Number: N/A

Related PR: #20

Problem Summary: IVM MTMVs use a hidden row-id key that is persisted in the row-binlog schema. The generic binlog table function rejected MTMV tables and could expose internal IVM columns unconditionally. Allow OlapTable subclasses such as MTMV, hide IVM internal columns by default, expose them when show_hidden_columns is enabled, and add focused BE and regression coverage. The latest yujun777/ivm base already contains the generic hidden-key writer support from upstream, so this commit reuses that implementation instead of replacing it.

### Release note

Support querying row binlog for incremental materialized views while keeping internal IVM columns hidden by default.

### Check List (For Author)

- Test: Not run yet (verification follows after applying the related BE test compatibility change)
- Behavior changed: Yes. binlog() accepts IVM MTMV tables and follows show_hidden_columns for internal IVM columns.
- Does this need documentation: No

* [fix](be) Fix row binlog writer test metadata

### What problem does this PR solve?

Issue Number: N/A

Related PR: apache#65076, apache#65663

Problem Summary: The row-binlog writer BE unit test no longer compiles after allocate_binlog_lsn changed to accept a vector reference. After that compile error is fixed, the test aborts because its filtered row-binlog schema retains the metadata indexes from before two hidden columns were removed and its assertions still expect the previous LSN, operation, and timestamp layout. Initialize the LSN vector before passing it by reference, reset the TSO, LSN, and operation indexes after filtering, and verify values using the current metadata order and types.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - ./run-be-ut.sh --run '--filter=GroupRowsetWriterTest.*'
- Behavior changed: No
- Does this need documentation: No
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants