Skip to content

Commit 838e1de

Browse files
authored
Update links in documentation to point at new example locations (#18931)
## Which issue does this PR close? - part of #18142 ## Rationale for this change @cj-zhukov has been consolidating the examples, but that also means that the links to the examples are now out of date ## What changes are included in this PR? Update links (I used openai codex, with the prompt below) and reviewed the results <details><summary>Prompt</summary> <p> ``` We have moved the examples around in datafusion-examples/ There are some links in doc comments such as in `datafusion/src/lib.rs`: [`expr_api`.rs]: https://github.com/apache/datafusion/blob/main/datafusion-examples/ examples/expr_api.rs This example has been moved to ./datafusion-examples/examples/query_planning/ expr_api.rs Please look for all other links to datafusion-examples and update them if necessary to point at the new path. ``` </p> </details> ## Are these changes tested? By CI ## Are there any user-facing changes? Fixed docs
1 parent 48cc4c8 commit 838e1de

File tree

30 files changed

+71
-71
lines changed

30 files changed

+71
-71
lines changed

datafusion/core/src/execution/context/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ impl SessionContext {
785785
/// * [`SessionState::create_physical_expr`] for a lower level API
786786
///
787787
/// [simplified]: datafusion_optimizer::simplify_expressions
788-
/// [expr_api]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/expr_api.rs
788+
/// [expr_api]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/query_planning/expr_api.rs
789789
pub fn create_physical_expr(
790790
&self,
791791
expr: Expr,
@@ -1903,7 +1903,7 @@ pub trait QueryPlanner: Debug {
19031903
/// because the implementation and requirements vary widely. Please see
19041904
/// [function_factory example] for a reference implementation.
19051905
///
1906-
/// [function_factory example]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/function_factory.rs
1906+
/// [function_factory example]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/builtin_functions/function_factory.rs
19071907
///
19081908
/// # Examples of syntax that can be supported
19091909
///

datafusion/core/src/execution/session_state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ impl SessionState {
707707
/// * [`create_physical_expr`] for a lower-level API
708708
///
709709
/// [simplified]: datafusion_optimizer::simplify_expressions
710-
/// [expr_api]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/expr_api.rs
710+
/// [expr_api]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/query_planning/expr_api.rs
711711
/// [`SessionContext::create_physical_expr`]: crate::execution::context::SessionContext::create_physical_expr
712712
pub fn create_physical_expr(
713713
&self,

datafusion/core/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@
360360
//! [`TreeNode`]: datafusion_common::tree_node::TreeNode
361361
//! [`tree_node module`]: datafusion_expr::logical_plan::tree_node
362362
//! [`ExprSimplifier`]: crate::optimizer::simplify_expressions::ExprSimplifier
363-
//! [`expr_api`.rs]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/expr_api.rs
363+
//! [`expr_api`.rs]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/query_planning/expr_api.rs
364364
//!
365365
//! ### Physical Plans
366366
//!
@@ -649,7 +649,7 @@
649649
//!
650650
//! [Tokio]: https://tokio.rs
651651
//! [`Runtime`]: tokio::runtime::Runtime
652-
//! [thread_pools example]: https://github.com/apache/datafusion/tree/main/datafusion-examples/examples/thread_pools.rs
652+
//! [thread_pools example]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/query_planning/thread_pools.rs
653653
//! [`task`]: tokio::task
654654
//! [Using Rustlang’s Async Tokio Runtime for CPU-Bound Tasks]: https://thenewstack.io/using-rustlangs-async-tokio-runtime-for-cpu-bound-tasks/
655655
//! [`RepartitionExec`]: physical_plan::repartition::RepartitionExec

datafusion/datasource-parquet/src/source.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ use parquet::encryption::decrypt::FileDecryptionProperties;
240240
///
241241
/// For a complete example, see the [`advanced_parquet_index` example]).
242242
///
243-
/// [`parquet_index_advanced` example]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/advanced_parquet_index.rs
243+
/// [`parquet_index_advanced` example]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/data_io/parquet_advanced_index.rs
244244
///
245245
/// # Execution Overview
246246
///

datafusion/execution/src/memory_pool/pool.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,8 @@ impl TrackedConsumer {
319319
///
320320
/// For more examples of using `TrackConsumersPool`, see the [memory_pool_tracking.rs] example
321321
///
322-
/// [memory_pool_tracking.rs]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/memory_pool_tracking.rs
323-
/// [memory_pool_execution_plan.rs]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/memory_pool_execution_plan.rs
322+
/// [memory_pool_tracking.rs]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/execution_monitoring/memory_pool_tracking.rs
323+
/// [memory_pool_execution_plan.rs]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/execution_monitoring/memory_pool_execution_plan.rs
324324
#[derive(Debug)]
325325
pub struct TrackConsumersPool<I> {
326326
/// The wrapped memory pool that actually handles reservation logic

datafusion/execution/src/parquet_encryption.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ use std::sync::Arc;
3232
/// integrate with a user's key management service (KMS).
3333
/// For example usage, see the [`parquet_encrypted_with_kms` example].
3434
///
35-
/// [`parquet_encrypted_with_kms` example]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/parquet_encrypted_with_kms.rs
35+
/// [`parquet_encrypted_with_kms` example]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/data_io/parquet_encrypted_with_kms.rs
3636
#[async_trait]
3737
pub trait EncryptionFactory: Send + Sync + std::fmt::Debug + 'static {
3838
/// Generate file encryption properties to use when writing a Parquet file.

datafusion/expr/src/expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ impl<'a> TreeNodeContainer<'a, Self> for Expr {
479479
/// that may be missing in the physical data but present in the logical schema.
480480
/// See the [default_column_values.rs] example implementation.
481481
///
482-
/// [default_column_values.rs]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/default_column_values.rs
482+
/// [default_column_values.rs]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/custom_data_source/default_column_values.rs
483483
pub type SchemaFieldMetadata = std::collections::HashMap<String, String>;
484484

485485
/// Intersects multiple metadata instances for UNION operations.

datafusion/expr/src/simplify.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pub trait SimplifyInfo {
4848
/// # Example
4949
/// See the `simplify_demo` in the [`expr_api` example]
5050
///
51-
/// [`expr_api` example]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/expr_api.rs
51+
/// [`expr_api` example]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/query_planning/expr_api.rs
5252
#[derive(Debug, Clone)]
5353
pub struct SimplifyContext<'a> {
5454
schema: Option<DFSchemaRef>,

datafusion/expr/src/udaf.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ use crate::{Documentation, Signature};
7474
/// [aggregate function]: https://en.wikipedia.org/wiki/Aggregate_function
7575
/// [`Accumulator`]: Accumulator
7676
/// [`create_udaf`]: crate::expr_fn::create_udaf
77-
/// [`simple_udaf.rs`]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/simple_udaf.rs
78-
/// [`advanced_udaf.rs`]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/advanced_udaf.rs
77+
/// [`simple_udaf.rs`]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/udf/simple_udaf.rs
78+
/// [`advanced_udaf.rs`]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/udf/advanced_udaf.rs
7979
#[derive(Debug, Clone, PartialOrd)]
8080
pub struct AggregateUDF {
8181
inner: Arc<dyn AggregateUDFImpl>,
@@ -360,7 +360,7 @@ where
360360
/// See [`advanced_udaf.rs`] for a full example with complete implementation and
361361
/// [`AggregateUDF`] for other available options.
362362
///
363-
/// [`advanced_udaf.rs`]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/advanced_udaf.rs
363+
/// [`advanced_udaf.rs`]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/udf/advanced_udaf.rs
364364
///
365365
/// # Basic Example
366366
/// ```

datafusion/expr/src/udf.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ use std::sync::Arc;
5757
/// compatibility with the older API.
5858
///
5959
/// [`create_udf`]: crate::expr_fn::create_udf
60-
/// [`simple_udf.rs`]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/simple_udf.rs
61-
/// [`advanced_udf.rs`]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/advanced_udf.rs
60+
/// [`simple_udf.rs`]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/udf/simple_udf.rs
61+
/// [`advanced_udf.rs`]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/udf/advanced_udf.rs
6262
#[derive(Debug, Clone)]
6363
pub struct ScalarUDF {
6464
inner: Arc<dyn ScalarUDFImpl>,
@@ -413,7 +413,7 @@ pub struct ReturnFieldArgs<'a> {
413413
/// See [`advanced_udf.rs`] for a full example with complete implementation and
414414
/// [`ScalarUDF`] for other available options.
415415
///
416-
/// [`advanced_udf.rs`]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/advanced_udf.rs
416+
/// [`advanced_udf.rs`]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/udf/advanced_udf.rs
417417
///
418418
/// # Basic Example
419419
/// ```

0 commit comments

Comments
 (0)