comphead commented on code in PR #2849:
URL: https://github.com/apache/arrow-datafusion/pull/2849#discussion_r916327342
##########
datafusion/core/src/dataframe.rs:
##########
@@ -1007,4 +1047,36 @@ mod tests {
.await?;
Ok(())
}
+
+ #[tokio::test]
+ async fn with_column() -> Result<()> {
+ let df = test_table().await?.select_columns(&["c1", "c2", "c3"])?;
+ let ctx = SessionContext::new();
+ let df_impl = Arc::new(DataFrame::new(ctx.state.clone(),
&df.plan.clone()));
+
+ // check that we correctly read from the table
+ let df_results = &df_impl
+ .filter(col("c2").eq(lit(3)).and(col("c1").eq(lit("a"))))?
+ .with_column("sum", col("c2") + col("c3"))?
Review Comment:
@loic-sharma @andygrove
Added `overwrite` and `overwrite referencing to self` tests
--
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]