| 277 | }; |
| 278 | |
| 279 | TimestampColumnReader::TimestampColumnReader(const Type& type, StripeStreams& stripe, |
| 280 | bool isInstantType) |
| 281 | : ColumnReader(type, stripe), |
| 282 | writerTimezone_(isInstantType ? &getTimezoneByName("GMT") : &stripe.getWriterTimezone()), |
| 283 | readerTimezone_(isInstantType ? &getTimezoneByName("GMT") : &stripe.getReaderTimezone()), |
| 284 | epochOffset_(writerTimezone_->getEpoch()), |
| 285 | sameTimezone_(writerTimezone_ == readerTimezone_) { |
| 286 | RleVersion vers = convertRleVersion(stripe.getEncoding(columnId).kind()); |
| 287 | std::unique_ptr<SeekableInputStream> stream = |
| 288 | stripe.getStream(columnId, proto::Stream_Kind_DATA, true); |
| 289 | if (stream == nullptr) throw ParseError("DATA stream not found in Timestamp column"); |
| 290 | secondsRle_ = createRleDecoder(std::move(stream), true, vers, memoryPool, metrics); |
| 291 | stream = stripe.getStream(columnId, proto::Stream_Kind_SECONDARY, true); |
| 292 | if (stream == nullptr) throw ParseError("SECONDARY stream not found in Timestamp column"); |
| 293 | nanoRle_ = createRleDecoder(std::move(stream), false, vers, memoryPool, metrics); |
| 294 | } |
| 295 | |
| 296 | TimestampColumnReader::~TimestampColumnReader() { |
| 297 | // PASS |
nothing calls this directly
no test coverage detected