Skip to content
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
22 changes: 22 additions & 0 deletions datafusion/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ all-features = true
workspace = true

[features]
# Enables the `print_config_docs`, `print_runtime_config_docs` and
# `print_functions_docs` binaries, which regenerate the docs under
# `docs/source/user-guide`. Off by default: they are only run by
# `dev/update_config_docs.sh` and `dev/update_function_docs.sh`, and each one
# links a ~174MB binary that would otherwise be relinked on every build of this
# crate.
docs_generation = []
nested_expressions = ["datafusion-functions-nested"]
# This feature is deprecated. Use the `nested_expressions` feature instead.
array_expressions = ["nested_expressions"]
Expand Down Expand Up @@ -190,6 +197,21 @@ ignored = ["datafusion-doc", "datafusion-macros", "dashmap"]
[target.'cfg(not(target_os = "windows"))'.dev-dependencies]
nix = { version = "0.31.3", features = ["fs"] }

[[bin]]
name = "print_config_docs"
path = "src/bin/print_config_docs.rs"
required-features = ["docs_generation"]

[[bin]]
name = "print_runtime_config_docs"
path = "src/bin/print_runtime_config_docs.rs"
required-features = ["docs_generation"]

[[bin]]
name = "print_functions_docs"
path = "src/bin/print_functions_docs.rs"
required-features = ["docs_generation"]

[[bench]]
harness = false
name = "aggregate_query_sql"
Expand Down
4 changes: 2 additions & 2 deletions dev/update_config_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ cd "${ROOT_DIR}"
source "${ROOT_DIR}/ci/scripts/utils/tool_versions.sh"

TARGET_FILE="docs/source/user-guide/configs.md"
PRINT_CONFIG_DOCS_COMMAND="cargo run --manifest-path datafusion/core/Cargo.toml --bin print_config_docs"
PRINT_RUNTIME_CONFIG_DOCS_COMMAND="cargo run --manifest-path datafusion/core/Cargo.toml --bin print_runtime_config_docs"
PRINT_CONFIG_DOCS_COMMAND="cargo run --manifest-path datafusion/core/Cargo.toml --features docs_generation --bin print_config_docs"
PRINT_RUNTIME_CONFIG_DOCS_COMMAND="cargo run --manifest-path datafusion/core/Cargo.toml --features docs_generation --bin print_runtime_config_docs"

echo "Inserting header"
cat <<'EOF' > "$TARGET_FILE"
Expand Down
6 changes: 3 additions & 3 deletions dev/update_function_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ cd "${ROOT_DIR}"
source "${ROOT_DIR}/ci/scripts/utils/tool_versions.sh"

TARGET_FILE="docs/source/user-guide/sql/aggregate_functions.md"
PRINT_AGGREGATE_FUNCTION_DOCS_COMMAND="cargo run --manifest-path datafusion/core/Cargo.toml --bin print_functions_docs -- aggregate"
PRINT_AGGREGATE_FUNCTION_DOCS_COMMAND="cargo run --manifest-path datafusion/core/Cargo.toml --features docs_generation --bin print_functions_docs -- aggregate"

echo "Inserting header"
cat <<'EOF' > "$TARGET_FILE"
Expand Down Expand Up @@ -121,7 +121,7 @@ npx "prettier@${PRETTIER_VERSION}" --write "$TARGET_FILE"
echo "'$TARGET_FILE' successfully updated!"

TARGET_FILE="docs/source/user-guide/sql/scalar_functions.md"
PRINT_SCALAR_FUNCTION_DOCS_COMMAND="cargo run --manifest-path datafusion/core/Cargo.toml --bin print_functions_docs -- scalar"
PRINT_SCALAR_FUNCTION_DOCS_COMMAND="cargo run --manifest-path datafusion/core/Cargo.toml --features docs_generation --bin print_functions_docs -- scalar"

echo "Inserting header"
cat <<'EOF' > "$TARGET_FILE"
Expand Down Expand Up @@ -165,7 +165,7 @@ npx "prettier@${PRETTIER_VERSION}" --write "$TARGET_FILE"
echo "'$TARGET_FILE' successfully updated!"

TARGET_FILE="docs/source/user-guide/sql/window_functions.md"
PRINT_WINDOW_FUNCTION_DOCS_COMMAND="cargo run --manifest-path datafusion/core/Cargo.toml --bin print_functions_docs -- window"
PRINT_WINDOW_FUNCTION_DOCS_COMMAND="cargo run --manifest-path datafusion/core/Cargo.toml --features docs_generation --bin print_functions_docs -- window"

echo "Inserting header"
cat <<'EOF' > "$TARGET_FILE"
Expand Down
Loading