Skip to content

Fix bi-temporal union duplicate columns regression - #5009

Open
wendy-nweje-gs wants to merge 1 commit into
finos:masterfrom
wendy-nweje-gs:review-fix-duplicate-column-regression-4.96
Open

Fix bi-temporal union duplicate columns regression#5009
wendy-nweje-gs wants to merge 1 commit into
finos:masterfrom
wendy-nweje-gs:review-fix-duplicate-column-regression-4.96

Conversation

@wendy-nweje-gs

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • Bug Fix

What does this PR do / why is it needed ?

Problem

Bi-temporal union mappings with self-joins (e.g., Customer_Self_Join_Live) produce invalid SQL in two ways:

  1. Duplicate column aliases in UNION ALLbuildUnion adds milestoning columns (e.g., "lake_from_0", "lake_thru_0") and separately the FK logic adds the same columns unquoted (e.g., lake_from_0). H2 and other databases reject duplicate aliases.

  2. "Column not found" in ON clausesmodifyColumnNameInOperation computes unquoted column names (e.g., lake_thru_1) for join ON clause references, but the union defines them quoted (e.g., "lake_thru_1"). H2 uppercases unquoted identifiers, so LAKE_THRU_1"lake_thru_1".

Testing
  • New test: testBiTemporalUnionWithSelfJoin_duplicateColumnRegression — verifies no duplicate columns and correct SQL shape
  • New test: testBiTemporalUnionJoin_milestoningColumnInOnClause — verifies milestoning column refs are quoted in ON clauses

Which issue(s) this PR fixes:

Fixes #

Other notes for reviewers:

Does this PR introduce a user-facing change?

@wendy-nweje-gs
wendy-nweje-gs requested a review from a team as a code owner July 31, 2026 21:43
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

Test Results

  1 061 files   -        1    1 061 suites   - 1   3h 14m 11s ⏱️ - 28m 15s
19 783 tests +       6  19 604 ✔️ +       6  179 💤 ±0  0 ±0 
41 101 runs   - 1 197  40 922 ✔️  - 1 197  179 💤 ±0  0 ±0 

Results for commit 31be582. ± Comparison against base commit 96736c4.

♻️ This comment has been updated with latest results.

@wendy-nweje-gs
wendy-nweje-gs force-pushed the review-fix-duplicate-column-regression-4.96 branch from c52d6d1 to 31be582 Compare August 2, 2026 00:48
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