Skip to content

chore: reorganize workspace meta #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@
resolver = "2"
members = ["datafusion-postgres", "datafusion-postgres-cli"]

[workspace.package]
version = "0.4.0"
edition = "2021"
license = "Apache-2.0"
rust-version = "1.82.0"
authors = ["Ning Sun <n@sunng.info>"]
keywords = ["database", "postgresql", "datafusion"]
homepage = "https://github.com/sunng87/datafusion-postgres/"
repository = "https://github.com/sunng87/datafusion-postgres/"
documentation = "https://docs.rs/crate/datafusion-postgres/"
readme = "README.md"

[workspace.dependencies]
pgwire = "0.30.2"
datafusion = { version = "47", default-features = false }
Expand Down
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,34 @@ picking up unfinished items.

- [x] datafusion-postgres as a CLI tool
- [x] datafusion-postgres as a library
- [x] datafusion information schema: a postgres compatible `information_schema`
- [ ] datafusion information schema: a postgres compatible `information_schema`
- [ ] datafusion pg catalog: a postgres compatible `pg_catalog`
- [ ] data type mapping between arrow and postgres: in progress
- [ ] additional postgres functions for datafusion

## Usage

### The Library `datafusion-postgres`

The high-level entrypoint of `datafusion-postgres` library is the `serve`
function which takes a datafusion `SessionContext` and some server configuration
options.

```rust
use datafusion::prelude::SessionContext;
use datafusion_postgres::{serve, ServerOptions};

// Create datafusion SessionContext
let session_context = SessionContext::new();
// Configure your `session_context`
// ...

// Start the Postgres compatible server
serve(session_context, &ServerOptions::new()).await
```

### The CLI `datafusion-postgres-cli`

As a command-line application, this tool serves any JSON/CSV/Arrow/Parquet/Avro
files as table, and expose them via Postgres compatible protocol, with which you
can connect using psql or language drivers to execute `SELECT` queries against
Expand Down
17 changes: 11 additions & 6 deletions datafusion-postgres-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
[package]
name = "datafusion-postgres-cli"
version = "0.1.0"
edition = "2021"
rust-version = "1.82.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
description = "Command-line tool for DataFusion's Postgres Protocol frontend"
version.workspace = true
edition.workspace = true
license.workspace = true
authors.workspace = true
keywords.workspace = true
homepage.workspace = true
repository.workspace = true
documentation.workspace = true
readme.workspace = true

[dependencies]
pgwire = { workspace = true }
datafusion = { workspace = true, default-features = true, features = ["avro"] }
tokio = { workspace = true, features = ["full"] }
datafusion-postgres = { path = "../datafusion-postgres" }
datafusion-postgres = { path = "../datafusion-postgres", version = "0.4.0" }
structopt = { version = "0.3", default-features = false }
22 changes: 9 additions & 13 deletions datafusion-postgres/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
[package]
name = "datafusion-postgres"
version = "0.4.0"
edition = "2021"
rust-version = "1.82.0"
description = "Exporting datafusion query engine with postgres wire protocol"
authors = ["Ning Sun <sunng@pm.me>"]
license = "Apache-2.0"
keywords = ["database", "postgresql"]
homepage = "https://github.com/sunng87/datafusion-postgres/"
repository = "https://github.com/sunng87/datafusion-postgres/"
documentation = "https://docs.rs/crate/datafusion-postgres/"
readme = "../README.md"


# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
version.workspace = true
edition.workspace = true
license.workspace = true
authors.workspace = true
keywords.workspace = true
homepage.workspace = true
repository.workspace = true
documentation.workspace = true
readme.workspace = true

[dependencies]
async-trait = "0.1"
Expand Down
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"rust-analyzer"
])
cargo-nextest
cargo-release
curl
gnuplot ## for cargo bench
pythonEnv
Expand Down
Loading