yooniversal opened a new issue, #73:
URL: https://github.com/apache/iotdb-client-go/issues/73

   I have implemented that edgeX project uses IoTDB working on docker,
   but there are some issues when use GET function in edgeX.
   IoTDB session is connected successfully with DB client of the project.
   
   ### Description
   I'm following `printDataSet0()` and `insertRecord()` implemented in 
[session_example.go](https://github.com/apache/iotdb-client-go/blob/main/example/session_example.go).
   
   Although `Session.InsertRecord()` works successfully that returns no error 
and I can check input data in IoTDB (referenced 
[here](https://iotdb.apache.org/UserGuide/Master/QuickStart/WayToGetIoTDB.html#have-a-try)
 for testing it work as typing SQL in IoTDB), cannot retrieve the data in edgeX 
when use `Session.ExecuteQueryStatement(sql)` perfectly. More details, 
`ExecuteQueryStatement()` returns `SessionDataSet` without error but when use 
`SessionDataSet.GetText()`, it returns `""` always but not input data saved in 
IoTDB.
   
   While I use `getText()`, make `isNull()` in the function not working because 
returns `false`:
   ```go
   // client/rpcdataset.go
   func (s *IoTDBRpcDataSet) getText(columnName string) string {
        if s.closed {
                return ""
        }
        if columnName == TimestampColumnName {
                return time.Unix(0, 
bytesToInt64(s.time)*1000000).Format(time.RFC3339)
        }
   
        columnIndex := s.getColumnIndex(columnName)
        if columnIndex < 0 || int(columnIndex) >= len(s.values) || { 
//s.isNull(int(columnIndex), s.rowsIndex-1) {
                s.lastReadWasNull = true
                return ""
        }
        s.lastReadWasNull = false
        return s.getString(int(columnIndex), 
s.columnTypeDeduplicatedList[columnIndex])
   }
   ```
   - `len(s.values)` is updated (equal with expected value) but it has no value
   - `SessionDataSet.GetColumnCount()` is updated too and equals with expected 
value
   - But if `isNull()` is activated, then error occured: `runtime error: 
negative shift amount`
   
   ### Question
   - I think some reasons that cannot retrieve input data well in `isNull()`. 
Can you explain when it returns `false`?
   - In IoTDB, whenever get data from database if encounters SQL query, it 
calls `ExecuteQueryStatement()`?
   (or `ExecuteStatement()` or `ExecuteRawDataQuery()` whatever)
   
   If you think reason is different, please share.
   
   ### Environment
   - IoTDB: 1.0.0-standalone (on docker)
   - OS: Ubuntu 22.04.1 LTS
   


-- 
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: notifications-unsubscr...@iotdb.apache.org.apache.org

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

Reply via email to