Skip to content

feat: add positional and lazy batch record matching strategies - #68

Merged
nil-malh merged 3 commits into
mainfrom
feat/batch-collect-strategy
Oct 15, 2026
Merged

nil-malh merged 3 commits into
mainfrom
feat/batch-collect-strategy

Conversation

@nil-malh

Copy link
Copy Markdown
Contributor

📝 Summary

FileRecordMatcher and AvroFileRecordMatcher previously only inspected records.getFirst() and matchFilePaths.getFirst() in batch mode, leaving records 1..N-1 unvalidated. This PR fixes both matchers to validate all consumed records against all expected files and introduces BatchMatchStrategy (POSITIONAL and LAZY / unordered 1-to-1 matching without replacement).

🔄 Type of change

  • 🐛 Bug fix (fix): non-breaking change that fixes an issue
  • ✨ Feature (feat): non-breaking change that adds functionality
  • 💥 Breaking change (!): changes existing behaviour, public API, Gherkin steps or config keys
  • ♻️ Refactor (refactor): no functional change
  • ⚡ Performance (perf)
  • 📖 Documentation (docs)
  • ⬆️ Dependencies (build(deps))
  • 🔧 CI / build (ci / build): workflows, pom.xml, tooling

✅ Checklist

Code

  • Formatting passes mvn spotless:check (run mvn spotless:apply to fix it and add the Apache 2.0 headers)
  • Public types and methods have up-to-date Javadoc

Tests

  • New / changed behaviour is covered by tests
  • mvn verify passes locally, and JaCoCo line coverage stays ≥ 70 %
  • Testcontainers-based tests are isolated and clean up after themselves

Compatibility & docs

  • New or changed HOCON keys have a default in reference.conf and a documented env-var override
  • New or changed Gherkin steps are documented, with an example scenario
  • New SPI implementations are registered in META-INF/services/
  • User-facing changes are documented

Introduces two batch matching strategies: POSITIONAL and LAZY. The
POSITIONAL strategy requires each consumed record at index `i` to match
the expected file at index `i`, while the LAZY strategy allows for
order-independent matching without replacement. This enhances the
flexibility of record comparisons in batch mode.

BREAKING CHANGE: The MatchContext now includes a batchMatchStrategy
parameter, defaulting to POSITIONAL. Update existing implementations
to specify the desired strategy if different behavior is required.
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

📋 Unreleased Changelog Preview

This is what the next release notes will look like based on commits in this PR.

Changelog

All notable changes to this project will be documented in this file.

[Unreleased]

Feat

  • ⚠️ BREAKING Add batch matching strategies for record comparison

  • ⚠️ BREAKING Add batch matching strategies for record comparison

  • ⚠️ BREAKING Add batch matching strategies for record comparison

  • ⚠️ BREAKING Add batch matching strategies for record comparison

  • ⚠️ BREAKING Add batch matching strategies for record comparison

  • ⚠️ BREAKING Add batch matching strategies for record comparison

  • ⚠️ BREAKING Add batch matching strategies for record comparison

  • ⚠️ BREAKING Add batch matching strategies for record comparison

✨ Features

  • Add batch matching strategies for record comparison

🔧 Miscellaneous

  • Remove outdated issue and feature request templates they are now org-managed

Generated by git-cliff


🔄 Run #186 · Thu, 15 Oct 2026 20:03:39 GMT

@nil-malh
nil-malh merged commit 5786eb6 into main Oct 15, 2026
9 checks passed
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