Skip to content

Fix iceberg $changelog read failing on single snapshot #24966

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

npsparrow
Copy link

Description

Introduced a condition when reading an iceberg $changelog table so that if only one snapshot exists, it returns an empty table.

Motivation and Context

Previously, attempting to read from an iceberg changelog would fail.
This fixes this issue.

Impact

Allows connector to query Iceberg changelog without failure when a single snapshot exists.

Test Plan

Introduced a unit test testGetChangelogWithSingleSnapshot in TestIcebergSplitManager.java.

Contributor checklist

  • Please make sure your submission complies with our contributing guide, in particular code style and commit standards.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.

Release Notes

== NO RELEASE NOTE ==

@npsparrow npsparrow requested review from hantangwangd, ZacBlanco and a team as code owners April 24, 2025 00:50
@npsparrow npsparrow requested a review from jaystarshot April 24, 2025 00:50
Copy link

linux-foundation-easycla bot commented Apr 24, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: npsparrow / name: Nikhil Panickssery (e6ffbcc)

@npsparrow npsparrow force-pushed the fix/iceberg-1-spst-chglog branch from afc14cb to 41c98f8 Compare April 24, 2025 03:40
- instead of failing, returns an empty table
- added applicable unit test
@npsparrow npsparrow force-pushed the fix/iceberg-1-spst-chglog branch from 41c98f8 to e6ffbcc Compare April 24, 2025 03:44
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.

Iceberg $changelog read fails on table with only one snapshot version.
1 participant