zhangshenghang opened a new issue, #12522:
URL: https://github.com/apache/seatunnel/issues/12522

   ### Description
   
   `new SeaTunnelRowType(fieldNames, fieldTypes)` stores the caller's arrays by 
reference (`this.fieldNames = fieldNames`). `SeaTunnelRowType` is treated as an 
immutable type definition, but any later mutation of the caller's arrays 
silently changes the row type (field names, types, and every `indexOf` lookup) 
for everything that already holds the type.
   
   Expected: the constructor should copy the arrays so the type definition 
cannot be changed externally after construction.
   
   ### Impact
   
   Latent correctness bug: callers that reuse/mutate the arrays they passed in 
(common in builders and loops that build many row types) corrupt 
already-created types.


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