Repository navigation
Reject input file segment name templates that reference no match group - #19755
Merged
Jackie-Jiang merged 1 commit intoOct 5, 2026
Merged
Jackie-Jiang merged 1 commit into
Jackie-Jiang merged 1 commit into
Conversation
`InputFileSegmentNameGenerator` now rejects a `segment.name.template` that does not contain `${filePathPattern:\N}`
for any match group `N` of `file.path.pattern`. Such a template gives every input file the same segment name. In a
table config this happens silently when the template is entirely `${filePathPattern:\N}`: table config values of the
form `${NAME:default}` are resolved from environment variables and system properties, which turns it into `\N`. The
error message points to the `$${filePathPattern:\N}` escape.
Also drops the unused `@SuppressWarnings("serial")` from the segment name generators and logs the unmatched input file
path with parameterized logging.
Jackie-Jiang
force-pushed
the
input-file-segment-name-template-validation
branch
from
October 5, 2026 18:54
4bf4475 to
ae8500e
Compare
xiangfu0
approved these changes
Oct 5, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #19755 +/- ##
=============================================
+ Coverage 40.03% 68.32% +28.29%
- Complexity 1463 1470 +7
=============================================
Files 3520 3520
Lines 228951 228956 +5
Branches 36306 36308 +2
=============================================
+ Hits 91658 156445 +64787
+ Misses 129004 60241 -68763
- Partials 8289 12270 +3981
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
xiangfu0
added a commit
to pinot-contrib/pinot-docs
that referenced
this pull request
Oct 5, 2026
Documents the template/capture-group validation added by apache/pinot#19755 in the existing job specification reference. Co-authored-by: Xiang Fu <xiangfu@Xiang-mac-mtv-2.local>
Contributor
|
Documentation follow-up merged: pinot-contrib/pinot-docs#1083 |
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.
PR flow
InputFileSegmentNameGenerator now validates that segment.name.template references a match group of filePathPattern, throwing an exception if not, as verified by a new test.
AI-generated · Green: added · Yellow: modified · Red: removed · Gray: existing
Diff evidence
Summary
InputFileSegmentNameGeneratornow rejects asegment.name.templatethat does not contain${filePathPattern:\N}for any match groupNoffile.path.pattern. Such a template ignores the input file, so every input file gets the same segment name: the pushed segments replace each other, or the push fails when the deep store rejects the name (#19696).The common way to hit this is a table config (
batchIngestionConfig.batchConfigMaps, read bySegmentGenerationAndPushTask). Table config values that are entirely of the form${NAME:default}are resolved from environment variables and system properties when the config is read, so"segmentNameGenerator.configs.segment.name.template": "${filePathPattern:\\1}"reaches the generator as\1. The error message points to the$${filePathPattern:\N}escape added in #19202.Also drops the unused
@SuppressWarnings("serial")from the segment name generators and logs the unmatched input file path with parameterized logging.Backward incompatibility
A template that references no match group is now rejected instead of producing a constant segment name. This includes a constant template combined with
append.uuid.to.segment.name=true, which produced unique names. Use thefixedgenerator for a constant name, orsimplewithappend.uuid.to.segment.namefor unique names.Related to #19696
🤖 Generated with Claude Code