[package]
name = "script"
edition.workspace = true
version.workspace = true
license.workspace = true

[features]
default = ["python"]
pyo3_backend = ["dep:pyo3", "arrow/pyarrow"]
python = [
    "dep:datafusion",
    "dep:datafusion-common",
    "dep:datafusion-expr",
    "dep:datafusion-physical-expr",
    "dep:rustpython-vm",
    "dep:rustpython-parser",
    "dep:rustpython-compiler",
    "dep:rustpython-compiler-core",
    "dep:rustpython-codegen",
    "dep:rustpython-ast",
    "dep:rustpython-pylib",
    "dep:rustpython-stdlib",
    "dep:paste",
]

[dependencies]
api.workspace = true
arc-swap = "1.0"
arrow.workspace = true
async-trait.workspace = true
catalog.workspace = true
common-catalog.workspace = true
common-error.workspace = true
common-function.workspace = true
common-macro.workspace = true
common-query.workspace = true
common-recordbatch.workspace = true
common-runtime.workspace = true
common-telemetry.workspace = true
common-time.workspace = true
console = "0.15"
crossbeam-utils = "0.8.14"
datafusion = { workspace = true, optional = true }
datafusion-common = { workspace = true, optional = true }
datafusion-expr = { workspace = true, optional = true }
datafusion-physical-expr = { workspace = true, optional = true }
datatypes.workspace = true
futures-util.workspace = true
futures.workspace = true
lazy_static.workspace = true
once_cell.workspace = true
paste = { workspace = true, optional = true }
prometheus.workspace = true
query.workspace = true
# TODO(discord9): This is a forked and tweaked version of RustPython, please update it to newest original RustPython After RustPython support GC
pyo3 = { version = "0.19", optional = true, features = ["abi3", "abi3-py37"] }
rustpython-ast = { git = "https://github.com/discord9/RustPython", optional = true, rev = "9ed5137412" }
rustpython-codegen = { git = "https://github.com/discord9/RustPython", optional = true, rev = "9ed5137412" }
rustpython-compiler = { git = "https://github.com/discord9/RustPython", optional = true, rev = "9ed5137412" }
rustpython-compiler-core = { git = "https://github.com/discord9/RustPython", optional = true, rev = "9ed5137412" }
rustpython-parser = { git = "https://github.com/discord9/RustPython", optional = true, rev = "9ed5137412" }
rustpython-pylib = { git = "https://github.com/discord9/RustPython", optional = true, rev = "9ed5137412", features = [
    "freeze-stdlib",
] }
rustpython-stdlib = { git = "https://github.com/discord9/RustPython", optional = true, rev = "9ed5137412" }
rustpython-vm = { git = "https://github.com/discord9/RustPython", optional = true, rev = "9ed5137412", features = [
    "default",
    "codegen",
] }
servers.workspace = true
session.workspace = true
snafu.workspace = true
sql.workspace = true
store-api.workspace = true
table.workspace = true
tokio.workspace = true

[dev-dependencies]
catalog = { workspace = true, features = ["testing"] }
common-test-util.workspace = true
criterion = { version = "0.4", features = ["html_reports", "async_tokio"] }
log-store.workspace = true
operator.workspace = true
rayon = "1.0"
ron = "0.7"
serde = { version = "1.0", features = ["derive"] }
session = { workspace = true, features = ["testing"] }
tokio-test = "0.4"

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