Skip to content

feat(core): support input and lookup changelog producers - #248

Open
lszskye wants to merge 9 commits into
apache:mainfrom
lszskye:changelog_producer
Open

feat(core): support input and lookup changelog producers#248
lszskye wants to merge 9 commits into
apache:mainfrom
lszskye:changelog_producer

Conversation

@lszskye

@lszskye lszskye commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Purpose

Linked issue: #174

Support input and lookup changelog producers for primary-key tables.

This change:

  • Writes raw input changelog records into changelog files while write process.
  • Rolls input changelog files by target file size, consistently with Java Paimon.
  • Produces lookup changelogs during compaction by comparing level-0 records with existing records.
  • Supports lookup changelog with:
    • several merge engines;
    • deletion vectors enabled;
    • ignore_previous_files;
    • row deduplication and ignored comparison fields;
    • schema evolution and external data paths.
  • Persists keys in first-row lookup SST files so excluded higher-level records can be detected.
  • Supports shared shredding when writing input and compaction changelog files.
  • Supports configurable changelog file prefix, format, and compression.
  • Reads changelog manifests during streaming scans.
  • Excludes level-0 files from the initial full scan for lookup changelog tables to avoid duplicate emission.
  • Adds order-independent equality comparison for MAP values.
  • Keeps full-compaction changelog producer unsupported.

Tests

Added and updated unit and integration coverage for:

  • input and lookup changelog stream reads;
  • insert, update, and delete changelogs;
  • first-row and deletion-vector lookup;
  • row deduplication and ignored fields;
  • schema evolution and external paths;
  • configurable changelog format, compression, and prefix;
  • shared-shredding changelog files;
  • nested row and order-independent MAP equality;
  • changelog manifest scanning.

API and Format

This change adds public option constants for:

  • changelog-producer.row-deduplicate
  • changelog-producer.row-deduplicate-ignore-fields
  • changelog-file.prefix
  • changelog-file.format
  • changelog-file.compression

@lszskye
lszskye requested a review from lxy-9602 August 26, 2026 09:29
@lszskye
lszskye force-pushed the changelog_producer branch from 1564aed to 335fa2e Compare August 26, 2026 09:48
Comment thread include/paimon/defs.h
Comment thread src/paimon/core/table/source/snapshot/changelog_follow_up_scanner.h Outdated
Comment thread src/paimon/core/operation/key_value_file_store_scan.cpp
Comment thread src/paimon/core/io/async_key_value_producer_and_consumer.h
Comment thread src/paimon/core/io/async_key_value_producer_and_consumer.cpp
Comment thread src/paimon/core/mergetree/compact/changelog_merge_tree_rewriter.cpp Outdated
Comment thread src/paimon/core/mergetree/compact/internal_row_equalizer.h Outdated
Comment thread src/paimon/core/mergetree/compact/merge_tree_compact_manager_factory_test.cpp Outdated
Comment thread src/paimon/core/mergetree/compact/merge_tree_compact_manager_factory.cpp Outdated
Comment thread src/paimon/core/mergetree/compact/merge_tree_compact_rewriter.cpp
Comment thread src/paimon/core/mergetree/merge_tree_writer.cpp
Comment thread src/paimon/core/mergetree/merge_tree_writer_test.cpp
Comment thread test/inte/write_and_read_inte_test.cpp Outdated
Comment thread test/inte/write_and_read_inte_test.cpp
@lszskye
lszskye force-pushed the changelog_producer branch from 008225d to fdbaca2 Compare August 28, 2026 09:15

@lxy-9602 lxy-9602 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1

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