| 1518 | }; |
| 1519 | |
| 1520 | TimestampColumnWriter::TimestampColumnWriter(const Type& type, const StreamsFactory& factory, |
| 1521 | const WriterOptions& options, bool isInstantType) |
| 1522 | : ColumnWriter(type, factory, options), |
| 1523 | rleVersion_(options.getRleVersion()), |
| 1524 | timezone_(isInstantType ? &getTimezoneByName("GMT") : &options.getTimezone()), |
| 1525 | isUTC_(isInstantType || options.getTimezoneName() == "GMT") { |
| 1526 | std::unique_ptr<BufferedOutputStream> dataStream = |
| 1527 | factory.createStream(proto::Stream_Kind_DATA); |
| 1528 | std::unique_ptr<BufferedOutputStream> secondaryStream = |
| 1529 | factory.createStream(proto::Stream_Kind_SECONDARY); |
| 1530 | secRleEncoder = createRleEncoder(std::move(dataStream), true, rleVersion_, memPool, |
| 1531 | options.getAlignedBitpacking()); |
| 1532 | nanoRleEncoder = createRleEncoder(std::move(secondaryStream), false, rleVersion_, memPool, |
| 1533 | options.getAlignedBitpacking()); |
| 1534 | |
| 1535 | if (enableIndex) { |
| 1536 | recordPosition(); |
| 1537 | } |
| 1538 | } |
| 1539 | |
| 1540 | // Because the number of nanoseconds often has a large number of trailing zeros, |
| 1541 | // the number has trailing decimal zero digits removed and the last three bits |
nothing calls this directly
no test coverage detected