Skip to content

Commit 655c097

Browse files
committed
WIP
1 parent a7b3e98 commit 655c097

4 files changed

Lines changed: 12 additions & 34 deletions

File tree

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
<h2>Gaggle</h2>
88

99
[![Tests](https://img.shields.io/github/actions/workflow/status/CogitatorTech/gaggle/tests.yml?label=tests&style=flat&labelColor=282c34&logo=github)](https://github.com/CogitatorTech/gaggle/actions/workflows/tests.yml)
10-
[![Code Quality](https://img.shields.io/codefactor/grade/github/CogitatorTech/gaggle?label=quality&style=flat&labelColor=282c34&logo=codefactor)](https://www.codefactor.io/repository/github/CogitatorTech/gaggle)
1110
[![Examples](https://img.shields.io/badge/examples-view-green?style=flat&labelColor=282c34&logo=github)](https://github.com/CogitatorTech/gaggle/tree/main/docs/examples)
1211
[![Docs](https://img.shields.io/badge/docs-read-blue?style=flat&labelColor=282c34&logo=read-the-docs)](https://github.com/CogitatorTech/gaggle/tree/main/docs)
1312
[![License](https://img.shields.io/badge/license-MIT%2FApache--2.0-007ec6?style=flat&labelColor=282c34&logo=open-source-initiative)](https://github.com/CogitatorTech/gaggle)
@@ -98,7 +97,7 @@ make release
9897
select gaggle_version();
9998

10099
-- List files in the dataset (recursively)
101-
-- (Note that if the datasets is not downloaded, it will be downloaded and cached)
100+
-- (Note that if the dataset is not downloaded, it will be downloaded and cached)
102101
select *
103102
from gaggle_ls('habedi/flickr-8k-dataset-clean', true) limit 5;
104103

gaggle/Cargo.lock

Lines changed: 2 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gaggle/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ thiserror = "2.0"
1919
serde = { version = "1.0", features = ["derive"] }
2020
serde_json = "1.0"
2121
reqwest = { version = "=0.12", features = ["blocking", "rustls-tls", "json", "multipart"], default-features = false }
22-
zip = { version = "7.2", default-features = false, features = ["deflate"] }
22+
zip = { version = "8.5.1", default-features = false, features = ["deflate"] }
2323
dirs = "6.0"
2424
urlencoding = "2.1"
2525
tracing = "0.1"
@@ -28,7 +28,6 @@ tracing-subscriber = { version = "0.3", features = ["fmt", "env-filter"] }
2828
[dev-dependencies]
2929
tempfile = "3.10"
3030
mockito = "1.7.0"
31-
tiny_http = "0.12.0"
3231
serial_test = "3.0"
3332
proptest = "1.5"
3433

gaggle/bindings/gaggle_extension.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ namespace duckdb {
4040
using namespace gaggle;
4141
namespace fs = std::filesystem;
4242

43+
template <typename T>
44+
static T *GetFlatVectorDataWritable(Vector &vector) {
45+
return const_cast<T *>(FlatVector::GetData<T>(vector));
46+
}
47+
4348
/**
4449
* @brief Retrieves the last error message from the Gaggle Rust core.
4550
* @return A string containing the error message, or "unknown error" if not set.
@@ -862,9 +867,9 @@ static void GaggleLsFunction(ClientContext &context, TableFunctionInput &data_p,
862867
idx_t remaining = bind.names.size() - state.pos;
863868
idx_t count = MinValue<idx_t>(STANDARD_VECTOR_SIZE, remaining);
864869
output.SetCardinality(count);
865-
auto name_out = FlatVector::GetDataMutable<string_t>(output.data[0]);
866-
auto size_out = FlatVector::GetDataMutable<int64_t>(output.data[1]);
867-
auto path_out = FlatVector::GetDataMutable<string_t>(output.data[2]);
870+
auto name_out = GetFlatVectorDataWritable<string_t>(output.data[0]);
871+
auto size_out = GetFlatVectorDataWritable<int64_t>(output.data[1]);
872+
auto path_out = GetFlatVectorDataWritable<string_t>(output.data[2]);
868873
for (idx_t i = 0; i < count; i++) {
869874
auto idx = state.pos + i;
870875
name_out[i] = StringVector::AddString(output.data[0], bind.names[idx]);

0 commit comments

Comments
 (0)