HTHou commented on PR #169:
URL: https://github.com/apache/iotdb-client-go/pull/169#issuecomment-5056050128

   Could we preserve the existing `SetTimestamp(timestamp int64, rowIndex int)` 
signature and introduce a checked API such as `SetTimestampAt(timestamp int64, 
rowIndex int) error` instead?
   
   Adding an `error` result to the existing exported method is not fully 
source-compatible. Statement-form calls still compile, but consumers using an 
interface or method value will break, for example:
   
   ```go
   type TimestampSetter interface {
       SetTimestamp(int64, int)
   }
   
   var _ TimestampSetter = (*client.Tablet)(nil)
   var setter func(int64, int) = tablet.SetTimestamp
   ```
   
   Since this module already has v2 releases, keeping `SetTimestamp` unchanged 
would preserve compatibility, while `SetTimestampAt` can perform the new bounds 
validation and return `illegal argument rowIndex` errors. The existing method 
could be deprecated in documentation later if callers should migrate to the 
checked API.


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