comphead commented on issue #6845:
URL:
https://github.com/apache/arrow-datafusion/issues/6845#issuecomment-1632741386
```
#[tokio::test]
async fn with_column_renamed_case_sensitive() -> Result<()> {
let df = test_table()
.await?
.filter(col("c2").eq(lit(3)).and(col("c1").eq(lit("a"))))?
.limit(0, Some(1))?
.sort(vec![
// make the test deterministic
col("c1").sort(true, true),
col("c2").sort(true, true),
col("c3").sort(true, true),
])?
.select_columns(&["c1"])?;
let df_renamed = df
.clone()
.with_column_renamed("c1", "CoLuMn1")?
.collect()
.await?;
assert_batches_sorted_eq!(
vec![
"+---------+",
"| CoLuMn1 |",
"+---------+",
"| a |",
"+---------+",
],
&df_renamed
);
let df_renamed = df
.with_column_renamed("CoLuMn1", "c1")?
.collect()
.await?;
assert_batches_sorted_eq!(
vec![
"+----+",
"| c1 |",
"+----+",
"| a |",
"+----+",
],
&df_renamed
);
Ok(())
}
```
Looks like it works on latest DF. Please verify @edandresvan
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]