Skip to content

Commit

Permalink
trying to please CI
Browse files Browse the repository at this point in the history
  • Loading branch information
lnkuiper committed May 23, 2024
1 parent 447e5d8 commit 0967795
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/execution/operator/persistent/physical_copy_to_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,14 +306,14 @@ unique_ptr<GlobalSinkState> PhysicalCopyToFile::GetGlobalSinkState(ClientContext
return std::move(state);
}

auto result =
auto state =
make_uniq<CopyToFunctionGlobalState>(function.copy_to_initialize_global(context, *bind_data, file_path));
if (use_tmp_file) {
result->file_names.emplace_back(GetNonTmpFile(context, file_path));
state->file_names.emplace_back(GetNonTmpFile(context, file_path));
} else {
result->file_names.emplace_back(file_path);
state->file_names.emplace_back(file_path);
}
return result;
return std::move(state);
}

//===--------------------------------------------------------------------===//
Expand Down
7 changes: 2 additions & 5 deletions tools/pythonpkg/tests/fast/test_return_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ def test_per_thread_output(self, duckdb_cursor):

res = con.execute(f"COPY integers TO '{filedir}' (RETURN_FILES TRUE, PER_THREAD_OUTPUT TRUE);").fetchall()[0]
assert res[0] == 200000
assert res[1] == [
os.path.join(filedir, 'data_0.csv'),
os.path.join(filedir, 'data_1.csv')
]
assert res[1] == [os.path.join(filedir, 'data_0.csv'), os.path.join(filedir, 'data_1.csv')]

def test_partition_by(self, duckdb_cursor):
con = duckdb.connect()
Expand All @@ -50,5 +47,5 @@ def test_partition_by(self, duckdb_cursor):
os.path.join(filedir, 'j=0/data_0.csv'),
os.path.join(filedir, 'j=1/data_0.csv'),
os.path.join(filedir, 'j=2/data_0.csv'),
os.path.join(filedir, 'j=3/data_0.csv')
os.path.join(filedir, 'j=3/data_0.csv'),
]

0 comments on commit 0967795

Please sign in to comment.