Skip to content

Commit 7e4c3f1

Browse files
authored
Merge branch 'apache:main' into main
2 parents d6abbad + a65d652 commit 7e4c3f1

7 files changed

Lines changed: 49 additions & 14 deletions

File tree

Cargo.lock

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

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
# SedonaDB
2121

2222
[![PyPI Version](https://img.shields.io/pypi/v/sedonadb)](https://pypi.org/project/sedonadb/) [![PyPI - Downloads](https://img.shields.io/pypi/dm/sedonadb)](https://pepy.tech/project/sedonadb) [![Downloads](https://static.pepy.tech/personalized-badge/sedonadb?period=total&units=international_system&left_color=black&right_color=brightgreen&left_text=total%20downloads)](https://pepy.tech/project/sedonadb)
23+
[![Anaconda Version](
24+
https://anaconda.org/conda-forge/sedonadb/badges/version.svg)](https://anaconda.org/conda-forge/sedonadb) [![Conda Downloads](https://anaconda.org/conda-forge/sedonadb/badges/downloads.svg)](https://anaconda.org/channels/conda-forge/packages/sedonadb/overview)
2325

2426
SedonaDB is an open-source single-node analytical database engine with **geospatial as a first-class citizen**. It aims to deliver the fastest spatial analytics query speed and the most comprehensive function coverage available.
2527

@@ -70,12 +72,18 @@ This is a performance benchmark comparing SedonaDB 0.1.0, DuckDB 1.4.0, and GeoP
7072

7173
## Install
7274

73-
You can install Python SedonaDB with PyPI:
75+
You can install Python SedonaDB with [PyPI](https://packaging.python.org/en/latest/tutorials/installing-packages/):
7476

7577
```sh
7678
pip install "apache-sedona[db]"
7779
```
7880

81+
Or with [conda](https://www.anaconda.com/docs/getting-started/main):
82+
83+
```sh
84+
conda install sedonadb
85+
```
86+
7987
## Quick Start
8088

8189
Get started with SedonaDB in just a few lines:

docs/quickstart-python.ipynb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,16 @@
4040
"```"
4141
]
4242
},
43+
{
44+
"metadata": {},
45+
"cell_type": "markdown",
46+
"source": [
47+
"```sh\n",
48+
"conda install sedonadb\n",
49+
"```"
50+
],
51+
"id": "bd40492cc22ae6ed"
52+
},
4353
{
4454
"cell_type": "markdown",
4555
"id": "293d4bc4",

docs/quickstart-python.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ First, install SedonaDB:
2727
pip install "apache-sedona[db]"
2828
```
2929

30+
```sh
31+
conda install sedonadb
32+
```
33+
3034
If the import and connection are successful, your installation is complete.
3135

3236

python/sedonadb/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ SedonaDB for Python can be installed from [PyPI](https://pypi.org):
2929
pip install "apache-sedona[db]"
3030
```
3131

32+
Or with [conda](https://www.anaconda.com/docs/getting-started/main):
33+
34+
```sh
35+
conda install sedonadb
36+
```
37+
3238
## Example
3339

3440
```python

rust/sedona-adbc/src/connection.rs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ use adbc_core::{
2323
options::{InfoCode, ObjectDepth},
2424
Connection,
2525
};
26-
use sedona::{context::SedonaContext, reader::SedonaStreamReader};
26+
use arrow_array::RecordBatchReader;
27+
use sedona::context::SedonaContext;
2728
use std::sync::Arc;
2829
use tokio::runtime::Runtime;
2930

@@ -129,7 +130,7 @@ impl Connection for SedonaConnection {
129130
fn get_info(
130131
&self,
131132
_codes: Option<std::collections::HashSet<InfoCode>>,
132-
) -> Result<SedonaStreamReader> {
133+
) -> Result<Box<dyn RecordBatchReader + Send + 'static>> {
133134
err_not_implemented!()
134135
}
135136

@@ -141,7 +142,7 @@ impl Connection for SedonaConnection {
141142
_table_name: Option<&str>,
142143
_table_type: Option<Vec<&str>>,
143144
_column_name: Option<&str>,
144-
) -> Result<SedonaStreamReader> {
145+
) -> Result<Box<dyn RecordBatchReader + Send + 'static>> {
145146
err_not_implemented!()
146147
}
147148

@@ -154,11 +155,11 @@ impl Connection for SedonaConnection {
154155
err_not_implemented!()
155156
}
156157

157-
fn get_table_types(&self) -> Result<SedonaStreamReader> {
158+
fn get_table_types(&self) -> Result<Box<dyn RecordBatchReader + Send + 'static>> {
158159
err_not_implemented!()
159160
}
160161

161-
fn get_statistic_names(&self) -> Result<SedonaStreamReader> {
162+
fn get_statistic_names(&self) -> Result<Box<dyn RecordBatchReader + Send + 'static>> {
162163
err_not_implemented!()
163164
}
164165

@@ -168,7 +169,7 @@ impl Connection for SedonaConnection {
168169
_db_schema: Option<&str>,
169170
_table_name: Option<&str>,
170171
_approximate: bool,
171-
) -> Result<SedonaStreamReader> {
172+
) -> Result<Box<dyn RecordBatchReader + Send + 'static>> {
172173
err_not_implemented!()
173174
}
174175

@@ -180,7 +181,10 @@ impl Connection for SedonaConnection {
180181
err_not_implemented!()
181182
}
182183

183-
fn read_partition(&self, _partition: impl AsRef<[u8]>) -> Result<SedonaStreamReader> {
184+
fn read_partition(
185+
&self,
186+
_partition: impl AsRef<[u8]>,
187+
) -> Result<Box<dyn RecordBatchReader + Send + 'static>> {
184188
err_not_implemented!()
185189
}
186190
}

rust/sedona-adbc/src/statement.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,15 @@ impl Statement for SedonaStatement {
9393
}
9494
}
9595

96-
fn execute(&mut self) -> Result<impl RecordBatchReader + Send> {
96+
fn execute(&mut self) -> Result<Box<dyn RecordBatchReader + Send + 'static>> {
9797
if let Some(query) = self.sql_query.clone() {
9898
self.runtime.block_on(async {
9999
let df = self.ctx.sql(&query).await.map_err(from_datafusion_error)?;
100100
let stream = df.execute_stream().await.map_err(from_datafusion_error)?;
101-
Ok(SedonaStreamReader::new(self.runtime.clone(), stream))
101+
Ok(
102+
Box::new(SedonaStreamReader::new(self.runtime.clone(), stream))
103+
as Box<dyn RecordBatchReader + Send + 'static>,
104+
)
102105
})
103106
} else {
104107
Err(Error::with_message_and_status(

0 commit comments

Comments
 (0)