igalshilman commented on a change in pull request #265:
URL: https://github.com/apache/flink-statefun/pull/265#discussion_r700754940



##########
File path: statefun-sdk-go/v3/pkg/statefun/egress.go
##########
@@ -78,7 +78,7 @@ func (k KafkaEgressBuilder) toEgressMessage() 
(*protocol.FromFunction_EgressMess
        } else {
                switch value := k.Value.(type) {
                case string:
-                       _ = StringType.Serialize(&buffer, value)
+                       buffer.WriteString(value)

Review comment:
       I think that there is an encoding issues here, as I understand strings 
in Go are not necessarily `utf-8` encoded.
   (constants are utf8, while at runtime they are not necessarily)
   Do you think that this is an issue worth addressing?
   
   Perhaps at least we need to add a comment in the method documentation? to 
use the correct string encoding to match the expected encoding in the Kafka 
topic. 
   This is a slight difference from the Python and Java SDKs as there we also 
auto deduce strings to be utf-8 strings.
   




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