duckdb 0.3.3-dev977.0 → 0.3.3-dev993.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/duckdb.cpp +13 -9
- package/src/duckdb.hpp +4 -3
- package/src/parquet-amalgamation.cpp +33013 -33011
package/package.json
CHANGED
package/src/duckdb.cpp
CHANGED
|
@@ -13670,7 +13670,7 @@ struct LengthFun {
|
|
|
13670
13670
|
|
|
13671
13671
|
struct LikeFun {
|
|
13672
13672
|
static void RegisterFunction(BuiltinFunctions &set);
|
|
13673
|
-
static bool Glob(const char *s, idx_t slen, const char *pattern, idx_t plen);
|
|
13673
|
+
DUCKDB_API static bool Glob(const char *s, idx_t slen, const char *pattern, idx_t plen);
|
|
13674
13674
|
};
|
|
13675
13675
|
|
|
13676
13676
|
struct LikeEscapeFun {
|
|
@@ -13994,10 +13994,14 @@ void FileSystem::FileSync(FileHandle &handle) {
|
|
|
13994
13994
|
throw NotImplementedException("%s: FileSync is not implemented!", GetName());
|
|
13995
13995
|
}
|
|
13996
13996
|
|
|
13997
|
-
vector<string> FileSystem::Glob(const string &path) {
|
|
13997
|
+
vector<string> FileSystem::Glob(const string &path, FileOpener *opener) {
|
|
13998
13998
|
throw NotImplementedException("%s: Glob is not implemented!", GetName());
|
|
13999
13999
|
}
|
|
14000
14000
|
|
|
14001
|
+
vector<string> FileSystem::Glob(const string &path, ClientContext &context) {
|
|
14002
|
+
return Glob(path, GetFileOpener(context));
|
|
14003
|
+
}
|
|
14004
|
+
|
|
14001
14005
|
void FileSystem::RegisterSubSystem(unique_ptr<FileSystem> sub_fs) {
|
|
14002
14006
|
throw NotImplementedException("%s: Can't register a sub system on a non-virtual file system", GetName());
|
|
14003
14007
|
}
|
|
@@ -16110,7 +16114,7 @@ public:
|
|
|
16110
16114
|
void FileSync(FileHandle &handle) override;
|
|
16111
16115
|
|
|
16112
16116
|
//! Runs a glob on the file system, returning a list of matching files
|
|
16113
|
-
vector<string> Glob(const string &path) override;
|
|
16117
|
+
vector<string> Glob(const string &path, FileOpener *opener = nullptr) override;
|
|
16114
16118
|
|
|
16115
16119
|
bool CanHandleFile(const string &fpath) override {
|
|
16116
16120
|
//! Whether or not a sub-system can handle a specific file path
|
|
@@ -17034,7 +17038,7 @@ static void GlobFiles(FileSystem &fs, const string &path, const string &glob, bo
|
|
|
17034
17038
|
});
|
|
17035
17039
|
}
|
|
17036
17040
|
|
|
17037
|
-
vector<string> LocalFileSystem::Glob(const string &path) {
|
|
17041
|
+
vector<string> LocalFileSystem::Glob(const string &path, FileOpener *opener) {
|
|
17038
17042
|
if (path.empty()) {
|
|
17039
17043
|
return vector<string>();
|
|
17040
17044
|
}
|
|
@@ -46050,8 +46054,8 @@ public:
|
|
|
46050
46054
|
FindFileSystem(filename)->RemoveFile(filename);
|
|
46051
46055
|
}
|
|
46052
46056
|
|
|
46053
|
-
vector<string> Glob(const string &path) override {
|
|
46054
|
-
return FindFileSystem(path)->Glob(path);
|
|
46057
|
+
virtual vector<string> Glob(const string &path, FileOpener *opener = nullptr) override {
|
|
46058
|
+
return FindFileSystem(path)->Glob(path, opener);
|
|
46055
46059
|
}
|
|
46056
46060
|
|
|
46057
46061
|
void RegisterSubSystem(unique_ptr<FileSystem> fs) override {
|
|
@@ -96081,7 +96085,7 @@ static unique_ptr<FunctionData> ReadCSVBind(ClientContext &context, CopyInfo &in
|
|
|
96081
96085
|
string file_pattern = info.file_path;
|
|
96082
96086
|
|
|
96083
96087
|
auto &fs = FileSystem::GetFileSystem(context);
|
|
96084
|
-
bind_data->files = fs.Glob(file_pattern);
|
|
96088
|
+
bind_data->files = fs.Glob(file_pattern, context);
|
|
96085
96089
|
if (bind_data->files.empty()) {
|
|
96086
96090
|
throw IOException("No files found that match the pattern \"%s\"", file_pattern);
|
|
96087
96091
|
}
|
|
@@ -96462,7 +96466,7 @@ static unique_ptr<FunctionData> GlobFunctionBind(ClientContext &context, vector<
|
|
|
96462
96466
|
}
|
|
96463
96467
|
auto result = make_unique<GlobFunctionBindData>();
|
|
96464
96468
|
auto &fs = FileSystem::GetFileSystem(context);
|
|
96465
|
-
result->files = fs.Glob(StringValue::Get(inputs[0]));
|
|
96469
|
+
result->files = fs.Glob(StringValue::Get(inputs[0]), context);
|
|
96466
96470
|
return_types.emplace_back(LogicalType::VARCHAR);
|
|
96467
96471
|
names.emplace_back("file");
|
|
96468
96472
|
return move(result);
|
|
@@ -97185,7 +97189,7 @@ static unique_ptr<FunctionData> ReadCSVBind(ClientContext &context, vector<Value
|
|
|
97185
97189
|
auto &file_pattern = StringValue::Get(inputs[0]);
|
|
97186
97190
|
|
|
97187
97191
|
auto &fs = FileSystem::GetFileSystem(context);
|
|
97188
|
-
result->files = fs.Glob(file_pattern);
|
|
97192
|
+
result->files = fs.Glob(file_pattern, context);
|
|
97189
97193
|
if (result->files.empty()) {
|
|
97190
97194
|
throw IOException("No files found that match the pattern \"%s\"", file_pattern);
|
|
97191
97195
|
}
|
package/src/duckdb.hpp
CHANGED
|
@@ -11,8 +11,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
11
11
|
#pragma once
|
|
12
12
|
#define DUCKDB_AMALGAMATION 1
|
|
13
13
|
#define DUCKDB_AMALGAMATION_EXTENDED 1
|
|
14
|
-
#define DUCKDB_SOURCE_ID "
|
|
15
|
-
#define DUCKDB_VERSION "v0.3.3-
|
|
14
|
+
#define DUCKDB_SOURCE_ID "ae38c6025"
|
|
15
|
+
#define DUCKDB_VERSION "v0.3.3-dev993"
|
|
16
16
|
//===----------------------------------------------------------------------===//
|
|
17
17
|
// DuckDB
|
|
18
18
|
//
|
|
@@ -1970,7 +1970,8 @@ public:
|
|
|
1970
1970
|
DUCKDB_API static string ExtractBaseName(const string &path);
|
|
1971
1971
|
|
|
1972
1972
|
//! Runs a glob on the file system, returning a list of matching files
|
|
1973
|
-
DUCKDB_API virtual vector<string> Glob(const string &path);
|
|
1973
|
+
DUCKDB_API virtual vector<string> Glob(const string &path, FileOpener *opener = nullptr);
|
|
1974
|
+
DUCKDB_API virtual vector<string> Glob(const string &path, ClientContext &context);
|
|
1974
1975
|
|
|
1975
1976
|
//! registers a sub-file system to handle certain file name prefixes, e.g. http:// etc.
|
|
1976
1977
|
DUCKDB_API virtual void RegisterSubSystem(unique_ptr<FileSystem> sub_fs);
|