You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/07/07 05:01:37 UTC

[GitHub] [arrow-datafusion] comphead commented on a diff in pull request #2846: Adding dataframe with_column function

comphead commented on code in PR #2846:
URL: https://github.com/apache/arrow-datafusion/pull/2846#discussion_r915460191


##########
datafusion/core/src/dataframe.rs:
##########
@@ -1007,4 +1047,37 @@ 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)))?

Review Comment:
   @andygrove I didn't find the way how to chain filters(AND/OR), not sure if its implemented, or has to be implemented 



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org