You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "zhangshenghang (via GitHub)" <gi...@apache.org> on 2026/09/28 14:03:32 UTC

[I] [Bug][API] SeaTunnelRowType keeps references to the arrays passed to its constructor [seatunnel]

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: commits-unsubscribe@seatunnel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][API] SeaTunnelRowType keeps references to the arrays passed to its constructor [seatunnel]

Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo closed issue #12522: [Bug][API] SeaTunnelRowType keeps references to the arrays passed to its constructor
URL: https://github.com/apache/seatunnel/issues/12522


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org