(tsBlockColumnIndex int32)
| 403 | } |
| 404 | |
| 405 | func (s *IoTDBRpcDataSet) getIntByTsBlockColumnIndex(tsBlockColumnIndex int32) (int32, error) { |
| 406 | if err := s.checkRecord(); err != nil { |
| 407 | return 0, err |
| 408 | } |
| 409 | if !s.isNull(tsBlockColumnIndex, s.tsBlockIndex) { |
| 410 | s.lastReadWasNull = false |
| 411 | dataType := s.curTsBlock.GetColumn(tsBlockColumnIndex).GetDataType() |
| 412 | if dataType == INT64 { |
| 413 | if v, err := s.curTsBlock.GetColumn(tsBlockColumnIndex).GetLong(s.tsBlockIndex); err != nil { |
| 414 | return 0, err |
| 415 | } else { |
| 416 | return int32(v), nil |
| 417 | } |
| 418 | } |
| 419 | return s.curTsBlock.GetColumn(tsBlockColumnIndex).GetInt(s.tsBlockIndex) |
| 420 | } else { |
| 421 | s.lastReadWasNull = true |
| 422 | return 0, nil |
| 423 | } |
| 424 | } |
| 425 | |
| 426 | func (s *IoTDBRpcDataSet) getLongByIndex(columnIndex int32) (int64, error) { |
| 427 | if index, err := s.getTsBlockColumnIndexForColumnIndex(columnIndex); err != nil { |
no test coverage detected