If we do an EXPLAIN ANALYZE for an INSERT query with direct insert on, the new files will be created in the table directory, and they won't be cleaned-up when the EXPLAIN query is finished.
An EXPLAIN ANALYZE query will execute the actual query and the files will be created within the staging directory, but the MoveTask won't move them to the final location. So when the EXPLAIN ANALYZE query is finished, the staging directory will be deleted, and the table directory will be the same as before the EXPLAIN query. But with direct insert on the files will be written into the table directory, so an additional cleanup would be necessary in order to restore the files within the table directory to the state before the EXPLAIN ANALYZE query. This could be avoided by turning off the direct insert for an EXPLAIN ANALYZE query. Since the direct insert improves the performance by eliminating the file movements within the MoveTask, but it has no affect on the query execution plan it can be safely turned off for explain queries.