alamb commented on code in PR #13063:
URL: https://github.com/apache/datafusion/pull/13063#discussion_r1810938685


##########
datafusion/common/src/test_util.rs:
##########
@@ -347,7 +347,7 @@ macro_rules! record_batch {
             let batch = arrow_array::RecordBatch::try_new(
                 schema,
                 vec![$(
-                    create_array!($type, $values),
+                    $crate::create_array!($type, $values),

Review Comment:
   Without this the macro errors if `create_array` is not also `use`d



##########
datafusion/core/tests/macro_hygiene/mod.rs:
##########
@@ -37,3 +37,13 @@ mod plan_datafusion_err {
         plan_datafusion_err!("foo");
     }
 }
+
+mod record_batch {
+    // NO other imports!
+    use datafusion_common::record_batch;
+
+    #[test]
+    fn test_macro() {
+        record_batch!(("column_name", Int32, vec![1, 2, 3])).unwrap();

Review Comment:
   test that we can use `record_batch` without any other imports
   
   fyi @timsaucer 



-- 
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-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to