niranjan-1408 opened a new pull request, #19762:
URL: https://github.com/apache/hudi/pull/19762

   Stacked on #19761, please review that one first. This PR shows both commits 
until it merges.
   
   ### Describe the issue this Pull Request addresses
   
   `updateTableSchema` issues the same `UpdateTable` request object twice. The 
second call sits outside the `if (cascade)` block, so it fires unconditionally, 
including on non-partitioned tables. Nothing between the two calls mutates the 
request and the cascade branch writes partitions rather than the table, so the 
second call is a no-op that Glue still counts as a new table version. Every 
schema change therefore consumes two table versions where one would do.
   
   ### Summary and Changelog
   
   Removes the second `awsGlue.updateTable(request).get()`. The first is kept 
rather than the second because the cascade re-reads the table to source the 
columns it propagates: with the update first it sees the new columns, whereas 
keeping only the second would have it propagate stale ones. Adds a test 
asserting exactly one `UpdateTable` per schema change.
   
   ### Impact
   
   Halves the Glue table-version churn from this method. No behaviour change 
beyond the removed redundant write.
   
   ### Risk Level
   
   low
   
   One deleted line. The added test fails against unfixed code with 
`TooManyActualInvocations: Wanted 1 time but was 2`.
   
   ### Documentation Update
   
   none
   
   ### Contributor's checklist
   
   - [x] Read through [contributor's 
guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [x] Enough context is provided in the sections above
   - [x] Adequate tests were added if applicable


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to