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/02/03 22:10:40 UTC

[GitHub] [arrow-datafusion] alamb opened a new pull request #1743: Move more tests out of context.rs

alamb opened a new pull request #1743:
URL: https://github.com/apache/arrow-datafusion/pull/1743


   Built on https://github.com/apache/arrow-datafusion/pull/1742 so draft until that is merged
   
   # Which issue does this PR close?
   
   re  https://github.com/apache/arrow-datafusion/issues/743
   re https://github.com/apache/arrow-datafusion/issues/348
   
   # Rationale for this change
   See description on https://github.com/apache/arrow-datafusion/pull/1742
   
   # What changes are included in this PR?
   Move a test
   
   # Are there any user-facing changes?
   No


-- 
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



[GitHub] [arrow-datafusion] alamb merged pull request #1743: Move more tests out of context.rs

Posted by GitBox <gi...@apache.org>.
alamb merged pull request #1743:
URL: https://github.com/apache/arrow-datafusion/pull/1743


   


-- 
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



[GitHub] [arrow-datafusion] alamb commented on a change in pull request #1743: Move more tests out of context.rs

Posted by GitBox <gi...@apache.org>.
alamb commented on a change in pull request #1743:
URL: https://github.com/apache/arrow-datafusion/pull/1743#discussion_r799012291



##########
File path: datafusion/tests/sql/partitioned_csv.rs
##########
@@ -0,0 +1,95 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+//! Utility functions for running with a partitioned csv dataset:

Review comment:
       This is a copy/paste of code in context.rs. 
   
   When I am finished removing the unrelated tests from context.rs I will remove the old copy as well




-- 
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



[GitHub] [arrow-datafusion] alamb commented on a change in pull request #1743: Move more tests out of context.rs

Posted by GitBox <gi...@apache.org>.
alamb commented on a change in pull request #1743:
URL: https://github.com/apache/arrow-datafusion/pull/1743#discussion_r799012598



##########
File path: datafusion/src/execution/context.rs
##########
@@ -1347,100 +1347,6 @@ mod tests {
         ));
     }
 
-    #[test]
-    fn optimize_explain() {
-        let schema = Schema::new(vec![Field::new("id", DataType::Int32, false)]);
-
-        let plan = LogicalPlanBuilder::scan_empty(Some("employee"), &schema, None)
-            .unwrap()
-            .explain(true, false)
-            .unwrap()
-            .build()
-            .unwrap();
-
-        if let LogicalPlan::Explain(e) = &plan {
-            assert_eq!(e.stringified_plans.len(), 1);
-        } else {
-            panic!("plan was not an explain: {:?}", plan);
-        }
-
-        // now optimize the plan and expect to see more plans
-        let optimized_plan = ExecutionContext::new().optimize(&plan).unwrap();
-        if let LogicalPlan::Explain(e) = &optimized_plan {
-            // should have more than one plan
-            assert!(
-                e.stringified_plans.len() > 1,
-                "plans: {:#?}",
-                e.stringified_plans
-            );
-            // should have at least one optimized plan
-            let opt = e
-                .stringified_plans
-                .iter()
-                .any(|p| matches!(p.plan_type, PlanType::OptimizedLogicalPlan { .. }));
-
-            assert!(opt, "plans: {:#?}", e.stringified_plans);
-        } else {
-            panic!("plan was not an explain: {:?}", plan);
-        }
-    }
-
-    #[tokio::test]
-    async fn parallel_projection() -> Result<()> {

Review comment:
       this test and those below are just moved into sql_integration test

##########
File path: datafusion/tests/sql/projection.rs
##########
@@ -73,3 +76,192 @@ async fn csv_query_group_by_avg_with_projection() -> Result<()> {
     assert_batches_sorted_eq!(expected, &actual);
     Ok(())
 }
+
+#[tokio::test]

Review comment:
       These tests were just moved




-- 
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