(tsBlockColumnIndex int32)
| 440 | } |
| 441 | |
| 442 | func (s *IoTDBRpcDataSet) getLongByTsBlockColumnIndex(tsBlockColumnIndex int32) (int64, error) { |
| 443 | if err := s.checkRecord(); err != nil { |
| 444 | return 0, err |
| 445 | } |
| 446 | if tsBlockColumnIndex < 0 { |
| 447 | s.lastReadWasNull = false |
| 448 | return s.curTsBlock.GetTimeByIndex(s.tsBlockIndex) |
| 449 | } |
| 450 | if !s.isNull(tsBlockColumnIndex, s.tsBlockIndex) { |
| 451 | s.lastReadWasNull = false |
| 452 | dataType := s.curTsBlock.GetColumn(tsBlockColumnIndex).GetDataType() |
| 453 | if dataType == INT32 { |
| 454 | if v, err := s.curTsBlock.GetColumn(tsBlockColumnIndex).GetInt(s.tsBlockIndex); err != nil { |
| 455 | return 0, err |
| 456 | } else { |
| 457 | return int64(v), nil |
| 458 | } |
| 459 | } |
| 460 | return s.curTsBlock.GetColumn(tsBlockColumnIndex).GetLong(s.tsBlockIndex) |
| 461 | } else { |
| 462 | s.lastReadWasNull = true |
| 463 | return 0, nil |
| 464 | } |
| 465 | } |
| 466 | |
| 467 | func (s *IoTDBRpcDataSet) getBinaryByIndex(columnIndex int32) (*Binary, error) { |
| 468 | if index, err := s.getTsBlockColumnIndexForColumnIndex(columnIndex); err != nil { |
no test coverage detected