[[bench]]
harness = false
name = "flight_benchmarks"

[[bench]]
harness = false
name = "arrow_vs_json_serialization"

[dependencies]
# Arrow ecosystem (with CSV and Parquet support)
arrow = {version = "57", features = ["csv", "json"]}
arrow-flight = "57"
arrow-schema = "57"
# Async utilities
async-stream = "0.3"
async-trait = "0.1"
# Date/time parsing
chrono = {workspace = true}
# ClickHouse client (optional)
clickhouse = {version = "0.14", features = ["inserter"], optional = true}
# Concurrent data structures
dashmap = {workspace = true}
# FraiseQL core (for Executor and query execution)
fraiseql-core = {workspace = true}
futures = "0.3"
# HTTP client (for SSRF-safe URL parsing)
reqwest = {workspace = true}
# JWT handling (for session token creation and validation)
jsonwebtoken = "10"
parquet = {version = "57", optional = true}
prost = "0.14"
# Serialization
serde = {version = "1", features = ["derive"]}
serde_json = "1"
# Error handling
thiserror = "2"
# Async runtime
tokio = {workspace = true}
tokio-stream = "0.1"
# gRPC framework
tonic = "0.14"
# Logging
tracing = "0.1"
# UUID generation (used in handshake for session tokens)
uuid = {workspace = true}

[dev-dependencies]
criterion = {version = "0.5", features = ["async_tokio"]}
# Integration test dependencies
fraiseql-core = {workspace = true, features = ["postgres"]}
sqlx = {version = "0.8", features = ["postgres", "runtime-tokio", "chrono", "uuid"]}
temp-env = {workspace = true}
tempfile = "3"
tokio-stream = "0.1"
tokio-test = "0.4"
tracing-subscriber = {version = "0.3", features = ["env-filter"]}
uuid = {workspace = true}

[features]
clickhouse = ["dep:clickhouse"]
default = []
# Reason: parquet pulls thrift 0.17 (CVE-2026-43868 — unmaintained upstream
# since 2022). Off by default; opt in if you need Parquet export.
parquet = ["dep:parquet"]
testing = []

[lib]
name = "fraiseql_arrow"
path = "src/lib.rs"

[lints]
workspace = true

[package]
description = "Apache Arrow Flight integration for FraiseQL"
name = "fraiseql-arrow"
readme = "README.md"
authors.workspace = true
categories.workspace = true
documentation.workspace = true
edition.workspace = true
homepage.workspace = true
keywords.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
version.workspace = true
