comphead commented on issue #6845:
URL:
https://github.com/apache/arrow-datafusion/issues/6845#issuecomment-1633227931
@Jefffrey ouch, you are right. I'm adding valid test case
```
#[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")?;
let res = &df_renamed.clone().collect().await?;
assert_batches_sorted_eq!(
vec![
"+---------+",
"| CoLuMn1 |",
"+---------+",
"| a |",
"+---------+",
],
res
);
let df_renamed = df_renamed
.with_column_renamed("CoLuMn1", "c1")?
.collect()
.await?;
assert_batches_sorted_eq!(
vec![
"+----+",
"| c1 |",
"+----+",
"| a |",
"+----+",
],
&df_renamed
);
Ok(())
}
```
So as I confused everyone I will try to fix the issue then :)
--
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]