Skip to content

issue #7393 : Merge Rows option to automatically line up input fields#7540

Merged
hansva merged 4 commits into
apache:mainfrom
mattcasters:issue-7393-2
Jul 17, 2026
Merged

issue #7393 : Merge Rows option to automatically line up input fields#7540
hansva merged 4 commits into
apache:mainfrom
mattcasters:issue-7393-2

Conversation

@mattcasters

Copy link
Copy Markdown
Contributor

Summary

  • Adds an Align input layouts option to Merge Rows (diff), enabled by default (align_input_layouts with defaultBoolean = true), so reference and compare streams can use different field layouts for CDC-style diffs.
  • Builds a reference-authoritative field union before comparing: missing fields are null-filled; shared fields keep the reference type (with conversion for compare values); compare-only fields are appended.
  • Strict legacy mode remains available with align_input_layouts=N.
  • Integration tests cover existing behavior (base, diff JSON, passthrough), new alignment, and strict align-off compatibility.
  • Integration test runner improvement: run-tests-docker.sh / run-tests.sh accept optional TEST_FILTER to run only matching main*.hwf workflows (basename substring or shell glob, comma-separated). Speeds up Docker IT debugging, e.g.:
bash integration-tests/scripts/run-tests-docker.sh \
  PROJECT_NAME=transforms \
  TEST_FILTER=0077-merge-rows

Context

Addresses #7393. Ports the proven Merge Rows Plus layout-alignment approach from the neighbor hop-data-vault project into core Merge Rows.

Test plan

  • ./mvnw -pl plugins/transforms/mergerows -am test (17 unit tests)
  • Integration suite via Hop client: sh hop run -j "IT transforms" -f main-0077-merge-rows.hwf -r local — all five unit tests pass (base, diff, passthrough, align, align-off)
  • Docker IT with rebuilt client zip + TEST_FILTER=0077-merge-rows

…support

Bring over the pieces missed when re-creating the PR after the main merge:
align/align-off integration tests and golden data, mergerows docs, and
TEST_FILTER support for the IT runner scripts (applied on top of current
main without clobbering Spark client / CLIENT_UNZIP changes).
Force the classic per-workflow path when TEST_FILTER is set so filtered
Docker integration tests actually run only matching main*.hwf files, and
document the option for run-tests-docker.sh.
@hansva
hansva merged commit 7023f0e into apache:main Jul 17, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants