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/05/18 13:45:23 UTC

[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #2568: Remove `scan_empty` method from `LogicalPlanBuilder`

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


##########
datafusion/core/src/test_util.rs:
##########
@@ -232,6 +235,17 @@ fn get_data_dir(udf_env: &str, submodule_data: &str) -> Result<PathBuf, Box<dyn
     }
 }
 
+/// Scan an empty data source, mainly used in tests
+pub fn scan_empty(
+    name: Option<&str>,
+    table_schema: &Schema,
+    projection: Option<Vec<usize>>,
+) -> Result<LogicalPlanBuilder, DataFusionError> {
+    let table_schema = Arc::new(table_schema.clone());
+    let provider = Arc::new(EmptyTable::new(table_schema));

Review Comment:
   TIL: `EmptyTable`



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