You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by dh...@apache.org on 2021/05/29 17:35:45 UTC

[arrow-datafusion] branch tokomak_optimizer updated: Remove csv tests

This is an automated email from the ASF dual-hosted git repository.

dheres pushed a commit to branch tokomak_optimizer
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git


The following commit(s) were added to refs/heads/tokomak_optimizer by this push:
     new d0f441b  Remove csv tests
d0f441b is described below

commit d0f441b5864670b0716006f4a056109b4150e5c1
Author: Daniel Heres <da...@gmail.com>
AuthorDate: Sat May 29 19:35:34 2021 +0200

    Remove csv tests
---
 datafusion/src/optimizer/simplification.rs | 49 +-----------------------------
 1 file changed, 1 insertion(+), 48 deletions(-)

diff --git a/datafusion/src/optimizer/simplification.rs b/datafusion/src/optimizer/simplification.rs
index 569784f..8ffe3a0 100644
--- a/datafusion/src/optimizer/simplification.rs
+++ b/datafusion/src/optimizer/simplification.rs
@@ -16,7 +16,7 @@
 // under the License.
 
 //! Expression simplification optimizer.
-//! Rewrites expressions using equivalence rules and the egg optimization library
+//! Rewrites expressions using equivalence rules and the egg optimization library   
 use std::vec;
 
 use crate::{
@@ -436,51 +436,4 @@ mod tests {
             "(and (= 1 2) (or boo (or foo bar)))"
         )
     }
-
-    #[tokio::test]
-    async fn custom_optimizer() {
-        // register custom tokomak optimizer, verify that optimization took place
-
-        let mut ctx = ExecutionContext::with_config(
-            ExecutionConfig::new().add_optimizer_rule(Arc::new(Tokomak::new())),
-        );
-
-        ctx.register_csv("example", "tests/example.csv", CsvReadOptions::new())
-            .unwrap();
-
-        // create a plan to run a SQL query
-        let lp = ctx
-            .sql("SELECT price*0-price from example")
-            .unwrap()
-            .to_logical_plan();
-
-        assert_eq!(
-            format!("{}", lp.display_indent()),
-            "Projection: (- #price)\
-            \n  TableScan: example projection=Some([0])"
-        )
-    }
-
-    #[tokio::test]
-    async fn custom_optimizer_filter() {
-        // register custom tokomak optimizer, verify that optimization took place
-
-        let mut ctx = ExecutionContext::with_config(
-            ExecutionConfig::new().add_optimizer_rule(Arc::new(Tokomak::new())),
-        );
-        ctx.register_csv("example", "tests/example.csv", CsvReadOptions::new())
-            .unwrap();
-
-        // create a plan to run a SQL query
-        let lp = ctx
-            .sql("SELECT price from example WHERE (price=1 AND price=2) OR (price=1 AND price=3)")
-            .unwrap()
-            .to_logical_plan();
-
-        assert_eq!(
-            format!("{}", lp.display_indent()),
-            "Filter: #price Eq Int64(1) And #price Eq Int64(2) Or #price Eq Int64(3)\
-            \n  TableScan: example projection=Some([0])"
-        )
-    }
 }