| 204 | } |
| 205 | |
| 206 | void 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 | |
| 218 | void performAtomicRename(const DB::ASTPtr & parsed_query, const String & out_file) |
| 219 | { |
no test coverage detected