You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2021/01/21 07:18:54 UTC

[iotdb-client-go] branch ByteDataType created (now 7497507)

This is an automated email from the ASF dual-hosted git repository.

jackietien pushed a change to branch ByteDataType
in repository https://gitbox.apache.org/repos/asf/iotdb-client-go.git.


      at 7497507  change data type in rpc to byte

This branch includes the following new commits:

     new 7497507  change data type in rpc to byte

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[iotdb-client-go] 01/01: change data type in rpc to byte

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jackietien pushed a commit to branch ByteDataType
in repository https://gitbox.apache.org/repos/asf/iotdb-client-go.git

commit 74975075f903f29e5cbfb1634f1cacb66f65da8a
Author: JackieTien97 <Ja...@foxmail.com>
AuthorDate: Thu Jan 21 15:18:08 2021 +0800

    change data type in rpc to byte
---
 client/session.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/client/session.go b/client/session.go
index b78bc4e..339117a 100644
--- a/client/session.go
+++ b/client/session.go
@@ -486,7 +486,7 @@ func (s *Session) genInsertRecordsReq(deviceIds []string, measurements [][]strin
 func valuesToBytes(dataTypes []TSDataType, values []interface{}) ([]byte, error) {
 	buff := &bytes.Buffer{}
 	for i, t := range dataTypes {
-		binary.Write(buff, binary.BigEndian, int16(t))
+		binary.Write(buff, binary.BigEndian, byte(t))
 		v := values[i]
 		if v == nil {
 			return nil, fmt.Errorf("values[%d] can't be nil", i)