MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / cleanupTempFile

Function cleanupTempFile

src/Client/ClientBase.cpp:206–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204}
205
206void cleanupTempFile(const DB::ASTPtr & parsed_query, const String & tmp_file)
207{
208 if (const auto * query_with_output = dynamic_cast<const DB::ASTQueryWithOutput *>(parsed_query.get()))
209 {
210 if (query_with_output->isOutfileTruncate() && query_with_output->out_file)
211 {
212 if (fs::exists(tmp_file))
213 fs::remove(tmp_file);
214 }
215 }
216}
217
218void performAtomicRename(const DB::ASTPtr & parsed_query, const String & out_file)
219{

Callers 1

processOrdinaryQueryMethod · 0.85

Calls 4

isOutfileTruncateMethod · 0.80
existsFunction · 0.50
removeFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected