Skip to content

Commit cb694c8

Browse files
committed
wip
1 parent f0f42ed commit cb694c8

File tree

4 files changed

+44
-61
lines changed

4 files changed

+44
-61
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@ crate-type = ["cdylib"]
1111
[dependencies]
1212
clap = "4.5.30"
1313
geojson = "0.24.1"
14-
pyo3 = { version = "0.23.4", features = ["abi3-py310", "extension-module"] }
14+
pyo3 = { version = "0.23.4", features = ["extension-module"] }
1515
pyo3-async-runtimes = { version = "0.23.0", features = [
1616
"tokio",
1717
"tokio-runtime",
1818
] }
1919
pyo3-arrow = "0.7.2"
20-
pyo3-log = "0.12.1"
2120
pythonize = "0.23.0"
2221
serde = "1.0.217"
2322
serde_json = "1.0.138"

src/duckdb.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use pyo3::{
33
exceptions::PyException,
44
prelude::*,
55
types::{PyDict, PyList},
6+
IntoPyObjectExt,
67
};
78
use pyo3_arrow::PyTable;
89
use stac_api::python::{StringOrDict, StringOrList};
@@ -108,17 +109,18 @@ impl DuckdbClient {
108109
.lock()
109110
.map_err(|err| PyException::new_err(err.to_string()))?;
110111
let convert_wkb = client.config.convert_wkb;
112+
client.config.convert_wkb = false;
111113
let result = client.search_to_arrow(&href, search);
112114
client.config.convert_wkb = convert_wkb;
113115
result?
114116
};
115117
if record_batches.is_empty() {
116-
Ok(py.None())
118+
todo!()
117119
} else {
118120
let schema = record_batches[0].schema();
119121
let table = PyTable::try_new(record_batches, schema)?;
120122
let table = table.to_arro3(py)?;
121-
Ok(table)
123+
Ok(table.into_py_any(py)?)
122124
}
123125
}
124126

0 commit comments

Comments
 (0)