Flink: Fix watermark extractor error message showing field id instead of file#17124
Open
anxkhn wants to merge 1 commit into
Open
Flink: Fix watermark extractor error message showing field id instead of file#17124anxkhn wants to merge 1 commit into
anxkhn wants to merge 1 commit into
Conversation
… of file
ColumnStatsWatermarkExtractor.extractWatermark passed three arguments to a
Preconditions.checkArgument format string that has only two %s placeholders
("Missing statistics for column name = %s in file = %s"). The extra
eventTimeFieldId argument shifted the file into an overflow position, so
Guava's lenientFormat rendered the field id in the "file =" slot and appended
the actual file in trailing brackets, e.g. "... in file = 5 [<file>]".
Remove the redundant eventTimeFieldId argument so the two remaining arguments
(column name and file) line up with the two placeholders. Applied identically
to the v1.20, v2.0, and v2.1 Flink modules, and strengthen the existing
testEmptyStatistics assertion to pin the rendered message to the file.
Generated-by: opencode
Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com>
pvary
reviewed
Jul 7, 2026
| @@ -99,7 +99,6 @@ public long extractWatermark(IcebergSourceSplit split) { | |||
| && scanTask.file().lowerBounds().get(eventTimeFieldId) != null, | |||
| "Missing statistics for column name = %s in file = %s", | |||
Contributor
There was a problem hiding this comment.
Could we instead add the id to the message too?
Suggested change
| "Missing statistics for column name = %s in file = %s", | |
| "Missing statistics for column name = %s with fieldId = %d in file = %s", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
"Missing statistics for column name = %s in file = %s"
Missing statistics for column name = ts in file = 5 [GenericDataFile{...}]
Files changed (6 files, +15/-9)
flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/source/reader/ColumnStatsWatermarkExtractor.java(-1)flink/v1.20/flink/src/test/java/org/apache/iceberg/flink/source/reader/TestColumnStatsWatermarkExtractor.java(+5/-2)flink/v2.0/flink/src/main/java/org/apache/iceberg/flink/source/reader/ColumnStatsWatermarkExtractor.java(-1)flink/v2.0/flink/src/test/java/org/apache/iceberg/flink/source/reader/TestColumnStatsWatermarkExtractor.java(+5/-2)flink/v2.1/flink/src/main/java/org/apache/iceberg/flink/source/reader/ColumnStatsWatermarkExtractor.java(-1)flink/v2.1/flink/src/test/java/org/apache/iceberg/flink/source/reader/TestColumnStatsWatermarkExtractor.java(+5/-2)