MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / sinkFunc

Function sinkFunc

src/function/export/export_csv_function.cpp:242–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

240}
241
242static void sinkFunc(ExportFuncSharedState& sharedState, ExportFuncLocalState& localState,
243 const ExportFuncBindData& bindData, std::vector<std::shared_ptr<ValueVector>> inputVectors) {
244 auto& exportCSVLocalState = localState.cast<ExportCSVLocalState>();
245 auto& exportCSVBindData = bindData.constCast<ExportCSVBindData>();
246 auto& exportCSVSharedState = sharedState.cast<ExportCSVSharedState>();
247 writeRows(exportCSVBindData, exportCSVLocalState, exportCSVSharedState,
248 std::move(inputVectors));
249 auto& serializer = exportCSVLocalState.serializer;
250 if (serializer->getSize() > ExportCSVConstants::DEFAULT_CSV_FLUSH_SIZE) {
251 exportCSVSharedState.writeRows(serializer->getBlobData(), serializer->getSize());
252 serializer->clear();
253 }
254}
255
256static void combineFunc(ExportFuncSharedState& sharedState, ExportFuncLocalState& localState) {
257 auto& serializer = localState.cast<ExportCSVLocalState>().serializer;

Callers

nothing calls this directly

Calls 4

writeRowsFunction · 0.85
writeRowsMethod · 0.80
getSizeMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected