(tsBlockColumnIndex int32)
| 574 | } |
| 575 | |
| 576 | func (s *IoTDBRpcDataSet) getStringByTsBlockColumnIndex(tsBlockColumnIndex int32) (string, error) { |
| 577 | if err := s.checkRecord(); err != nil { |
| 578 | return "", err |
| 579 | } |
| 580 | // to keep compatibility, tree model should return a long value for time column |
| 581 | if tsBlockColumnIndex == -1 { |
| 582 | timestamp, err := s.curTsBlock.GetTimeByIndex(s.tsBlockIndex) |
| 583 | if err != nil { |
| 584 | return "", err |
| 585 | } |
| 586 | return int64ToString(timestamp), nil |
| 587 | } |
| 588 | if s.isNull(tsBlockColumnIndex, s.tsBlockIndex) { |
| 589 | s.lastReadWasNull = true |
| 590 | return "", nil |
| 591 | } |
| 592 | s.lastReadWasNull = false |
| 593 | return s.getStringByTsBlockColumnIndexAndDataType(tsBlockColumnIndex, s.getDataTypeByTsBlockColumnIndex(tsBlockColumnIndex)) |
| 594 | } |
| 595 | |
| 596 | func (s *IoTDBRpcDataSet) getStringByTsBlockColumnIndexAndDataType(index int32, tsDataType TSDataType) (string, error) { |
| 597 | switch tsDataType { |
no test coverage detected