Skip to content

feat(inspect): expand MetadataTable framework for all 16 metadata table types#801

Open
WZhuo wants to merge 1 commit into
apache:mainfrom
WZhuo:inspect
Open

feat(inspect): expand MetadataTable framework for all 16 metadata table types#801
WZhuo wants to merge 1 commit into
apache:mainfrom
WZhuo:inspect

Conversation

@WZhuo

@WZhuo WZhuo commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Expand the MetadataTable base class framework to support all 16 Iceberg metadata table types, laying the foundation for subsequent PRs to implement Scan() for each.

Changes

metadata_table.h

  • Expand Kind enum from 2 to 16 values: kEntries, kFiles, kDataFiles, kDeleteFiles, kHistory, kMetadataLogEntries, kSnapshots, kRefs, kManifests, kPartitions, kAllDataFiles, kAllDeleteFiles, kAllFiles, kAllManifests, kAllEntries, kPositionDeletes
  • Add SnapshotSelection struct with snapshot_id, as_of_timestamp, ref_name optional fields for time-travel queries
  • Add supports_time_travel() virtual method (default: false)
  • Add Scan() virtual method returning Result<ArrowArray> (default: NotSupported)

metadata_table.cc

  • Default supports_time_travel() returns false
  • Default Scan() returns NotSupported
  • Factory Make() covers all 16 Kinds — existing kSnapshots/kHistory dispatch normally; all 14 new Kinds return NotSupported

metadata_table_test.cc

  • AllKindEnumValues — verifies all 16 enum values
  • UnimplementedKindsReturnNotSupported — verifies factory returns error for all new Kinds
  • DefaultSupportsTimeTravelReturnsFalse — verifies base default
  • DefaultScanReturnsNotSupported — verifies base default Scan()

Design Principles

  • All new Kinds return NotSupported from the factory, ready for subsequent Steps to fill in
  • Scan() signature accepts std::optional<SnapshotSelection> for time-travel support

…le types

- Expand Kind enum from 2 to 16 values covering all Iceberg metadata tables
- Add SnapshotSelection struct for time-travel snapshot resolution
- Add supports_time_travel() and Scan() virtual methods to base class
- Update factory switch to cover all 16 Kinds (new types return NotSupported)
- Add tests for enum values, factory behavior, and default virtual methods
@WZhuo WZhuo marked this pull request as ready for review July 2, 2026 08:46
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.

1 participant