goutamadwant commented on PR #11660:
URL: https://github.com/apache/seatunnel/pull/11660#issuecomment-5302373475

   @loustler The production change looks correct and the round-trip coverage 
verifies that a reused writer keeps the logical type behavior.
   
   One test gap remains though. testLogicalTypesRoundTripAcrossReusedWriter 
also passes on the old implementation because the discarded per-row GenericData 
objects never affected the written values. So the test does not detect a 
regression of the optimization itself.
   
   Could we extract the data-model construction into a package-private factory 
method and count calls from a test subclass? Writing three rows to one file 
should create the model once, and writing to two files should create it twice. 
That would make the test fail before this change and directly protect the 
per-file lifecycle being introduced here.
   
   Could you please re-check whether the current test catches moving the 
construction back outside the writer == null branch?


-- 
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