Skip to content

Commit

Permalink
chore: Update vendored sources to duckdb/duckdb@a05e81d (#344)
Browse files Browse the repository at this point in the history
Merge pull request duckdb/duckdb#13711 from pdet/current_boundary_wrap

Co-authored-by: krlmlr <krlmlr@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and krlmlr authored Sep 9, 2024
1 parent 36c26f7 commit 07630bc
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ CSVGlobalState::CSVGlobalState(ClientContext &context_p, const shared_ptr<CSVBuf
make_shared_ptr<CSVBufferUsage>(*file_scans.back()->buffer_manager, current_boundary.GetBufferIdx());
}

bool CSVGlobalState::IsDone() const {
lock_guard<mutex> parallel_lock(main_mutex);
return current_boundary.done;
}

double CSVGlobalState::GetProgress(const ReadCSVData &bind_data_p) const {
lock_guard<mutex> parallel_lock(main_mutex);
idx_t total_files = bind_data.files.size();
Expand Down
2 changes: 1 addition & 1 deletion src/duckdb/src/function/table/read_csv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ unique_ptr<LocalTableFunctionState> ReadCSVInitLocal(ExecutionContext &context,
return nullptr;
}
auto &global_state = global_state_p->Cast<CSVGlobalState>();
if (global_state.current_boundary.done) {
if (global_state.IsDone()) {
// nothing to do
return nullptr;
}
Expand Down
6 changes: 3 additions & 3 deletions src/duckdb/src/function/table/version/pragma_version.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef DUCKDB_PATCH_VERSION
#define DUCKDB_PATCH_VERSION "1-dev5133"
#define DUCKDB_PATCH_VERSION "1-dev5136"
#endif
#ifndef DUCKDB_MINOR_VERSION
#define DUCKDB_MINOR_VERSION 0
Expand All @@ -8,10 +8,10 @@
#define DUCKDB_MAJOR_VERSION 1
#endif
#ifndef DUCKDB_VERSION
#define DUCKDB_VERSION "v1.0.1-dev5133"
#define DUCKDB_VERSION "v1.0.1-dev5136"
#endif
#ifndef DUCKDB_SOURCE_ID
#define DUCKDB_SOURCE_ID "74c9f4df1f"
#define DUCKDB_SOURCE_ID "a05e81d31b"
#endif
#include "duckdb/function/table/system_functions.hpp"
#include "duckdb/main/database.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ struct CSVGlobalState : public GlobalTableFunctionState {

//! Calculates the Max Threads that will be used by this CSV Reader
idx_t MaxThreads() const override;
//! We hold information on the current scanner boundary
CSVIterator current_boundary;

bool IsDone() const;

private:
//! Reference to the client context that created this scan
Expand Down Expand Up @@ -76,6 +76,8 @@ struct CSVGlobalState : public GlobalTableFunctionState {
shared_ptr<CSVBufferUsage> current_buffer_in_use;

unordered_map<idx_t, idx_t> threads_per_file;
//! We hold information on the current scanner boundary
CSVIterator current_boundary;
};

} // namespace duckdb

0 comments on commit 07630bc

Please sign in to comment.