Skip to content

Commit

Permalink
Minor: Update with_column_rename method doc (#8858)
Browse files Browse the repository at this point in the history
* Minor: Update `with_column_rename` method doc
  • Loading branch information
comphead authored Jan 14, 2024
1 parent af3d190 commit a461c33
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions datafusion/core/src/dataframe/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1156,6 +1156,11 @@ impl DataFrame {
/// Rename one column by applying a new projection. This is a no-op if the column to be
/// renamed does not exist.
///
/// The method supports case sensitive rename with wrapping column name into one of following symbols ( " or ' or ` )
///
/// Alternatively setting Datafusion param `datafusion.sql_parser.enable_ident_normalization` to `false` will enable
/// case sensitive rename without need to wrap column name into special symbols
///
/// ```
/// # use datafusion::prelude::*;
/// # use datafusion::error::Result;
Expand All @@ -1164,6 +1169,7 @@ impl DataFrame {
/// let ctx = SessionContext::new();
/// let df = ctx.read_csv("tests/data/example.csv", CsvReadOptions::new()).await?;
/// let df = df.with_column_renamed("ab_sum", "total")?;
///
/// # Ok(())
/// # }
/// ```
Expand Down

0 comments on commit a461c33

Please sign in to comment.