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

Function flushStreams

bolt/serializers/PrestoSerializer.cpp:3455–3472  ·  view source on GitHub ↗

Writes the contents to 'out' in wire format

Source from the content-addressed store, hash-verified

3453
3454// Writes the contents to 'out' in wire format
3455void flushStreams(
3456 const std::vector<std::unique_ptr<VectorStream>>& streams,
3457 int32_t numRows,
3458 const StreamArena& arena,
3459 folly::io::Codec& codec,
3460 OutputStream* out) {
3461 auto listener = dynamic_cast<PrestoOutputStreamListener*>(out->listener());
3462 // Reset CRC computation
3463 if (listener) {
3464 listener->reset();
3465 }
3466
3467 if (!needCompression(codec)) {
3468 flushUncompressed(streams, numRows, out, listener);
3469 } else {
3470 flushCompressed(streams, arena, codec, numRows, out, listener);
3471 }
3472}
3473
3474class PrestoBatchVectorSerializer : public BatchVectorSerializer {
3475 public:

Callers 3

serializeMethod · 0.85
flushMethod · 0.85
flushEncodedMethod · 0.85

Calls 5

needCompressionFunction · 0.85
flushUncompressedFunction · 0.85
flushCompressedFunction · 0.85
listenerMethod · 0.80
resetMethod · 0.45

Tested by

no test coverage detected