MCPcopy Create free account
hub / github.com/bytedance/bolt / serializeTimestampWithTimeZone

Function serializeTimestampWithTimeZone

bolt/serializers/PrestoSerializer.cpp:1805–1822  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1803}
1804
1805void serializeTimestampWithTimeZone(
1806 const RowVector* rowVector,
1807 const folly::Range<const IndexRange*>& ranges,
1808 VectorStream* stream) {
1809 auto timestamps = rowVector->childAt(0)->as<SimpleVector<int64_t>>();
1810 auto timezones = rowVector->childAt(1)->as<SimpleVector<int16_t>>();
1811 for (const auto& range : ranges) {
1812 for (auto i = range.begin; i < range.begin + range.size; ++i) {
1813 if (rowVector->isNullAt(i)) {
1814 stream->appendNull();
1815 } else {
1816 stream->appendNonNull();
1817 stream->appendOne(packTimestampWithTimeZone(
1818 timestamps->valueAt(i), timezones->valueAt(i)));
1819 }
1820 }
1821 }
1822}
1823
1824void serializeRowVector(
1825 const BaseVector* vector,

Callers 1

serializeRowVectorFunction · 0.85

Calls 7

childAtMethod · 0.80
isNullAtMethod · 0.45
appendNullMethod · 0.45
appendNonNullMethod · 0.45
appendOneMethod · 0.45
valueAtMethod · 0.45

Tested by

no test coverage detected