You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/03/14 14:48:27 UTC

[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #5567: minor: port some join tests to sqllogictests

alamb commented on code in PR #5567:
URL: https://github.com/apache/arrow-datafusion/pull/5567#discussion_r1135670602


##########
datafusion/core/tests/sqllogictests/test_files/join_disable_repartition_joins.slt:
##########
@@ -0,0 +1,30 @@
+# 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.
+
+##########
+## Join Tests
+##########
+
+# turn off repartition_joins
+statement ok
+set datafusion.optimizer.repartition_joins = false;
+
+include ./join.slt

Review Comment:
   TIL "`include` 👍 



##########
datafusion/core/tests/sqllogictests/test_files/join_disable_repartition_joins.slt:
##########
@@ -0,0 +1,30 @@
+# 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.
+
+##########
+## Join Tests
+##########
+
+# turn off repartition_joins
+statement ok
+set datafusion.optimizer.repartition_joins = false;
+
+include ./join.slt

Review Comment:
   
   I verified the queries run as expected
   
   ```
        Running tests/sqllogictests/src/main.rs (/Users/alamb/Software/target-df2/debug/deps/sqllogictests-18a04f4d360aa062)
   [join_disable_repartition_joins.slt] Running query: "set datafusion.optimizer.repartition_joins = false;"
   [join_disable_repartition_joins.slt] Running query: "CREATE TABLE IF NOT EXISTS students(name TEXT, mark INT) AS VALUES
   ('Stuart', 28),
   ('Amina', 89),
   ('Christen', 50),
   ('Salma', 77),
   ('Samantha', 21);"
   [join_disable_repartition_joins.slt] Running query: "CREATE TABLE IF NOT EXISTS grades(grade INT, min INT, max INT) AS VALUES
   (1, 0, 14),
   (2, 15, 35),
   (3, 36, 55),
   (4, 56, 79),
   (5, 80, 100);"
   [join_disable_repartition_joins.slt] Running query: "SELECT s.*, g.grade FROM students s join grades g on s.mark between g.min and g.max WHERE grade > 2 ORDER BY s.mark DESC"
   [join_disable_repartition_joins.slt] Running query: "drop table IF EXISTS students;"
   [join_disable_repartition_joins.slt] Running query: "drop table IF EXISTS grades;"
   [join_disable_repartition_joins.slt] Running query: "CREATE TABLE IF NOT EXISTS test1(a int, b int) as select 1 as a, 2 as b;"
   [join_disable_repartition_joins.slt] Running query: "CREATE TABLE IF NOT EXISTS test2(a int, b int) as select 1 as a, 2 as b;"
   [join_disable_repartition_joins.slt] Running query: "SELECT * FROM test2 FULL JOIN test1 ON true;"
   [join_disable_repartition_joins.slt] Running query: "drop table IF EXISTS test1;"
   [join_disable_repartition_joins.slt] Running query: "drop table IF EXISTS test2;"
   [join_disable_repartition_joins.slt] Running query: "CREATE TABLE IF NOT EXISTS t1(t1_id INT, t1_name TEXT, t1_int INT) AS VALUES
   (11, 'a', 1),
   (22, 'b', 2),
   (33, 'c', 3),
   (44, 'd', 4);"
   ...
   
   ```



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