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/10/31 18:13:26 UTC

[GitHub] [arrow-datafusion] andygrove opened a new pull request, #4047: Add CI checks that we can serde all benchmark queries

andygrove opened a new pull request, #4047:
URL: https://github.com/apache/arrow-datafusion/pull/4047

   # Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   N/A
   
   # Rationale for this change
   
   <!--
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.  
   -->
   
   # What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   # Are there any user-facing changes?
   
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please add the `api change` label.
   -->


-- 
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] andygrove commented on a diff in pull request #4047: Add CI checks that we can serde all benchmark queries

Posted by GitBox <gi...@apache.org>.
andygrove commented on code in PR #4047:
URL: https://github.com/apache/arrow-datafusion/pull/4047#discussion_r1010644040


##########
benchmarks/src/bin/tpch.rs:
##########
@@ -618,291 +630,412 @@ mod tests {
         Ok(str)
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q1() -> Result<()> {
-        verify_query(1).await
+    async fn run_q1() -> Result<()> {
+        run_query(1).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q2() -> Result<()> {
-        verify_query(2).await
+    async fn run_q2() -> Result<()> {
+        run_query(2).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q3() -> Result<()> {
-        verify_query(3).await
+    async fn run_q3() -> Result<()> {
+        run_query(3).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q4() -> Result<()> {
-        verify_query(4).await
+    async fn run_q4() -> Result<()> {
+        run_query(4).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q5() -> Result<()> {
-        verify_query(5).await
+    async fn run_q5() -> Result<()> {
+        run_query(5).await
     }
 
-    #[cfg(feature = "ci")]
-    #[ignore] // https://github.com/apache/arrow-datafusion/issues/4024
     #[tokio::test]
-    async fn verify_q6() -> Result<()> {
-        verify_query(6).await
+    async fn run_q6() -> Result<()> {
+        run_query(6).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q7() -> Result<()> {
-        verify_query(7).await
+    async fn run_q7() -> Result<()> {
+        run_query(7).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q8() -> Result<()> {
-        verify_query(8).await
+    async fn run_q8() -> Result<()> {
+        run_query(8).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q9() -> Result<()> {
-        verify_query(9).await
+    async fn run_q9() -> Result<()> {
+        run_query(9).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q10() -> Result<()> {
-        verify_query(10).await
+    async fn run_q10() -> Result<()> {
+        run_query(10).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q11() -> Result<()> {
-        verify_query(11).await
+    async fn run_q11() -> Result<()> {
+        run_query(11).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q12() -> Result<()> {
-        verify_query(12).await
+    async fn run_q12() -> Result<()> {
+        run_query(12).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q13() -> Result<()> {
-        verify_query(13).await
+    async fn run_q13() -> Result<()> {
+        run_query(13).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q14() -> Result<()> {
-        verify_query(14).await
+    async fn run_q14() -> Result<()> {
+        run_query(14).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q15() -> Result<()> {
-        verify_query(15).await
+    async fn run_q15() -> Result<()> {
+        run_query(15).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q16() -> Result<()> {
-        verify_query(16).await
+    async fn run_q16() -> Result<()> {
+        run_query(16).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q17() -> Result<()> {
-        verify_query(17).await
+    async fn run_q17() -> Result<()> {
+        run_query(17).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q18() -> Result<()> {
-        verify_query(18).await
+    async fn run_q18() -> Result<()> {
+        run_query(18).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q19() -> Result<()> {
-        verify_query(19).await
+    async fn run_q19() -> Result<()> {
+        run_query(19).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q20() -> Result<()> {
-        verify_query(20).await
+    async fn run_q20() -> Result<()> {
+        run_query(20).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q21() -> Result<()> {
-        verify_query(21).await
+    async fn run_q21() -> Result<()> {
+        run_query(21).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q22() -> Result<()> {
-        verify_query(22).await
+    async fn run_q22() -> Result<()> {
+        run_query(22).await
+    }
+
+    async fn run_query(n: usize) -> Result<()> {
+        // Tests running query with empty tables, to see whether they run successfully.
+
+        let config = SessionConfig::new()
+            .with_target_partitions(1)
+            .with_batch_size(10);
+        let ctx = SessionContext::with_config(config);
+
+        for &table in TPCH_TABLES {
+            let schema = get_tpch_table_schema(table);
+            let batch = RecordBatch::new_empty(Arc::new(schema.to_owned()));
+
+            ctx.register_batch(table, batch)?;
+        }
+
+        let sql = &get_query_sql(n)?;
+        for query in sql {
+            execute_query(&ctx, query, false).await?;
+        }
+
+        Ok(())
+    }
+}
+
+/// CI checks
+#[cfg(test)]
+#[cfg(feature = "ci")]

Review Comment:
   I did look into using MemTable but we don't support serde with MemTable



-- 
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] andygrove commented on pull request #4047: Add CI checks that we can serde all benchmark queries

Posted by GitBox <gi...@apache.org>.
andygrove commented on PR #4047:
URL: https://github.com/apache/arrow-datafusion/pull/4047#issuecomment-1298803931

   > I couldn't find evidence that this test actually ran thinking
   
   Thanks for catching that! I pushed a commit to add these tests to the workflow


-- 
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] andygrove merged pull request #4047: Add CI checks that we can serde all benchmark queries

Posted by GitBox <gi...@apache.org>.
andygrove merged PR #4047:
URL: https://github.com/apache/arrow-datafusion/pull/4047


-- 
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] andygrove commented on pull request #4047: Add CI checks that we can serde all benchmark queries

Posted by GitBox <gi...@apache.org>.
andygrove commented on PR #4047:
URL: https://github.com/apache/arrow-datafusion/pull/4047#issuecomment-1298905745

   Verified that tests ran this time:
   
   ```
    test ci::serde_q1 ... ok
   test ci::serde_q10 ... ok
   test ci::serde_q11 ... ok
   test ci::serde_q12 ... ok
   test ci::serde_q13 ... ok
   test ci::serde_q14 ... ok
   test ci::serde_q15 ... ok
   test ci::serde_q16 ... ignored
   test ci::serde_q17 ... ok
   test ci::serde_q18 ... ok
   test ci::serde_q19 ... ok
   test ci::serde_q2 ... ok
   test ci::serde_q20 ... ok
   test ci::serde_q21 ... ok
   test ci::serde_q22 ... ok
   test ci::serde_q3 ... ok
   test ci::serde_q4 ... ok
   test ci::serde_q5 ... ok
   test ci::serde_q6 ... ok
   test ci::serde_q7 ... ok
   test ci::serde_q8 ... ok
   test ci::serde_q9 ... ok
   ```


-- 
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 diff in pull request #4047: Add CI checks that we can serde all benchmark queries

Posted by GitBox <gi...@apache.org>.
alamb commented on code in PR #4047:
URL: https://github.com/apache/arrow-datafusion/pull/4047#discussion_r1010626592


##########
benchmarks/src/bin/tpch.rs:
##########
@@ -618,291 +630,412 @@ mod tests {
         Ok(str)
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q1() -> Result<()> {
-        verify_query(1).await
+    async fn run_q1() -> Result<()> {
+        run_query(1).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q2() -> Result<()> {
-        verify_query(2).await
+    async fn run_q2() -> Result<()> {
+        run_query(2).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q3() -> Result<()> {
-        verify_query(3).await
+    async fn run_q3() -> Result<()> {
+        run_query(3).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q4() -> Result<()> {
-        verify_query(4).await
+    async fn run_q4() -> Result<()> {
+        run_query(4).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q5() -> Result<()> {
-        verify_query(5).await
+    async fn run_q5() -> Result<()> {
+        run_query(5).await
     }
 
-    #[cfg(feature = "ci")]
-    #[ignore] // https://github.com/apache/arrow-datafusion/issues/4024
     #[tokio::test]
-    async fn verify_q6() -> Result<()> {
-        verify_query(6).await
+    async fn run_q6() -> Result<()> {
+        run_query(6).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q7() -> Result<()> {
-        verify_query(7).await
+    async fn run_q7() -> Result<()> {
+        run_query(7).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q8() -> Result<()> {
-        verify_query(8).await
+    async fn run_q8() -> Result<()> {
+        run_query(8).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q9() -> Result<()> {
-        verify_query(9).await
+    async fn run_q9() -> Result<()> {
+        run_query(9).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q10() -> Result<()> {
-        verify_query(10).await
+    async fn run_q10() -> Result<()> {
+        run_query(10).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q11() -> Result<()> {
-        verify_query(11).await
+    async fn run_q11() -> Result<()> {
+        run_query(11).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q12() -> Result<()> {
-        verify_query(12).await
+    async fn run_q12() -> Result<()> {
+        run_query(12).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q13() -> Result<()> {
-        verify_query(13).await
+    async fn run_q13() -> Result<()> {
+        run_query(13).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q14() -> Result<()> {
-        verify_query(14).await
+    async fn run_q14() -> Result<()> {
+        run_query(14).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q15() -> Result<()> {
-        verify_query(15).await
+    async fn run_q15() -> Result<()> {
+        run_query(15).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q16() -> Result<()> {
-        verify_query(16).await
+    async fn run_q16() -> Result<()> {
+        run_query(16).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q17() -> Result<()> {
-        verify_query(17).await
+    async fn run_q17() -> Result<()> {
+        run_query(17).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q18() -> Result<()> {
-        verify_query(18).await
+    async fn run_q18() -> Result<()> {
+        run_query(18).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q19() -> Result<()> {
-        verify_query(19).await
+    async fn run_q19() -> Result<()> {
+        run_query(19).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q20() -> Result<()> {
-        verify_query(20).await
+    async fn run_q20() -> Result<()> {
+        run_query(20).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q21() -> Result<()> {
-        verify_query(21).await
+    async fn run_q21() -> Result<()> {
+        run_query(21).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q22() -> Result<()> {
-        verify_query(22).await
+    async fn run_q22() -> Result<()> {
+        run_query(22).await
+    }
+
+    async fn run_query(n: usize) -> Result<()> {
+        // Tests running query with empty tables, to see whether they run successfully.
+
+        let config = SessionConfig::new()
+            .with_target_partitions(1)
+            .with_batch_size(10);
+        let ctx = SessionContext::with_config(config);
+
+        for &table in TPCH_TABLES {
+            let schema = get_tpch_table_schema(table);
+            let batch = RecordBatch::new_empty(Arc::new(schema.to_owned()));
+
+            ctx.register_batch(table, batch)?;
+        }
+
+        let sql = &get_query_sql(n)?;
+        for query in sql {
+            execute_query(&ctx, query, false).await?;
+        }
+
+        Ok(())
+    }
+}
+
+/// CI checks
+#[cfg(test)]
+#[cfg(feature = "ci")]

Review Comment:
   Why feature gate this with `ci`? I would have thought
   
   ```rust
   #[cfg(test)]
   ```
   
   was sufficient. 
    
   Additionally, I couldn't find evidence that these new tests were actually run:
   
   
   ```shell
   -*- mode: grep; default-directory: "~/Downloads/logs_52324/" -*-
   Grep started at Tue Nov  1 12:19:52
   
   rg -n -H --no-heading -e 'serde_q7' 
   
   Grep finished with no matches found at Tue Nov  1 12:19:52
   ```
   
   🤔 



-- 
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] andygrove commented on pull request #4047: Add CI checks that we can serde all benchmark queries

Posted by GitBox <gi...@apache.org>.
andygrove commented on PR #4047:
URL: https://github.com/apache/arrow-datafusion/pull/4047#issuecomment-1297492565

   @avantgardnerio fyi


-- 
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] ursabot commented on pull request #4047: Add CI checks that we can serde all benchmark queries

Posted by GitBox <gi...@apache.org>.
ursabot commented on PR #4047:
URL: https://github.com/apache/arrow-datafusion/pull/4047#issuecomment-1298911025

   Benchmark runs are scheduled for baseline = 525ac4567ad8d86ad085d8439d890b1f9e9e6bb9 and contender = 8c2653057d96a73570a608282266e856d5869da3. 8c2653057d96a73570a608282266e856d5869da3 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
   Conbench compare runs links:
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ec2-t3-xlarge-us-east-2] [ec2-t3-xlarge-us-east-2](https://conbench.ursa.dev/compare/runs/7d5e5e9e32da44eaabac396b4669ee3b...040e22214a154b22ab77de8370f2bfb9/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] [test-mac-arm](https://conbench.ursa.dev/compare/runs/cf442403f4a44efb9fb8b8a70f709191...484564b2b1fc4b0991c0e2a34e877121/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/788b3420c2c349e5a2dece5263f3fa6b...6aa0915a4b8c4381b3fdd140800ae007/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/945775c2a1634d44a735c02a05e2933b...3235e53aef1f4ac7a81587d72e1e9e28/)
   Buildkite builds:
   Supported benchmarks:
   ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
   test-mac-arm: Supported benchmark langs: C++, Python, R
   ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
   ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java
   


-- 
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] andygrove commented on a diff in pull request #4047: Add CI checks that we can serde all benchmark queries

Posted by GitBox <gi...@apache.org>.
andygrove commented on code in PR #4047:
URL: https://github.com/apache/arrow-datafusion/pull/4047#discussion_r1010640172


##########
benchmarks/src/bin/tpch.rs:
##########
@@ -618,291 +630,412 @@ mod tests {
         Ok(str)
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q1() -> Result<()> {
-        verify_query(1).await
+    async fn run_q1() -> Result<()> {
+        run_query(1).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q2() -> Result<()> {
-        verify_query(2).await
+    async fn run_q2() -> Result<()> {
+        run_query(2).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q3() -> Result<()> {
-        verify_query(3).await
+    async fn run_q3() -> Result<()> {
+        run_query(3).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q4() -> Result<()> {
-        verify_query(4).await
+    async fn run_q4() -> Result<()> {
+        run_query(4).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q5() -> Result<()> {
-        verify_query(5).await
+    async fn run_q5() -> Result<()> {
+        run_query(5).await
     }
 
-    #[cfg(feature = "ci")]
-    #[ignore] // https://github.com/apache/arrow-datafusion/issues/4024
     #[tokio::test]
-    async fn verify_q6() -> Result<()> {
-        verify_query(6).await
+    async fn run_q6() -> Result<()> {
+        run_query(6).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q7() -> Result<()> {
-        verify_query(7).await
+    async fn run_q7() -> Result<()> {
+        run_query(7).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q8() -> Result<()> {
-        verify_query(8).await
+    async fn run_q8() -> Result<()> {
+        run_query(8).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q9() -> Result<()> {
-        verify_query(9).await
+    async fn run_q9() -> Result<()> {
+        run_query(9).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q10() -> Result<()> {
-        verify_query(10).await
+    async fn run_q10() -> Result<()> {
+        run_query(10).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q11() -> Result<()> {
-        verify_query(11).await
+    async fn run_q11() -> Result<()> {
+        run_query(11).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q12() -> Result<()> {
-        verify_query(12).await
+    async fn run_q12() -> Result<()> {
+        run_query(12).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q13() -> Result<()> {
-        verify_query(13).await
+    async fn run_q13() -> Result<()> {
+        run_query(13).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q14() -> Result<()> {
-        verify_query(14).await
+    async fn run_q14() -> Result<()> {
+        run_query(14).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q15() -> Result<()> {
-        verify_query(15).await
+    async fn run_q15() -> Result<()> {
+        run_query(15).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q16() -> Result<()> {
-        verify_query(16).await
+    async fn run_q16() -> Result<()> {
+        run_query(16).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q17() -> Result<()> {
-        verify_query(17).await
+    async fn run_q17() -> Result<()> {
+        run_query(17).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q18() -> Result<()> {
-        verify_query(18).await
+    async fn run_q18() -> Result<()> {
+        run_query(18).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q19() -> Result<()> {
-        verify_query(19).await
+    async fn run_q19() -> Result<()> {
+        run_query(19).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q20() -> Result<()> {
-        verify_query(20).await
+    async fn run_q20() -> Result<()> {
+        run_query(20).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q21() -> Result<()> {
-        verify_query(21).await
+    async fn run_q21() -> Result<()> {
+        run_query(21).await
     }
 
-    #[cfg(feature = "ci")]
     #[tokio::test]
-    async fn verify_q22() -> Result<()> {
-        verify_query(22).await
+    async fn run_q22() -> Result<()> {
+        run_query(22).await
+    }
+
+    async fn run_query(n: usize) -> Result<()> {
+        // Tests running query with empty tables, to see whether they run successfully.
+
+        let config = SessionConfig::new()
+            .with_target_partitions(1)
+            .with_batch_size(10);
+        let ctx = SessionContext::with_config(config);
+
+        for &table in TPCH_TABLES {
+            let schema = get_tpch_table_schema(table);
+            let batch = RecordBatch::new_empty(Arc::new(schema.to_owned()));
+
+            ctx.register_batch(table, batch)?;
+        }
+
+        let sql = &get_query_sql(n)?;
+        for query in sql {
+            execute_query(&ctx, query, false).await?;
+        }
+
+        Ok(())
+    }
+}
+
+/// CI checks
+#[cfg(test)]
+#[cfg(feature = "ci")]

Review Comment:
   These tests rely on the data files existing in a path from `TPCH_DATA` env var, which is set in CI



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