martin-g commented on code in PR #19319:
URL: https://github.com/apache/datafusion/pull/19319#discussion_r2619585909


##########
datafusion-examples/examples/builtin_functions/regexp.rs:
##########


Review Comment:
   ```suggestion
   ```



##########
datafusion-examples/examples/data_io/parquet_exec_visitor.rs:
##########
@@ -45,7 +49,7 @@ pub async fn parquet_exec_visitor() -> 
datafusion::common::Result<()> {
     let _ = ctx
         .register_listing_table(
             "my_table",
-            &format!("file://{test_data}/alltypes_plain.parquet"),
+            path.to_str().unwrap(),

Review Comment:
   ListingTableUrl::parse() requires a URI. You have to preserve ""file://" here



##########
datafusion-examples/examples/sql_ops/query.rs:
##########
@@ -113,20 +113,20 @@ async fn query_parquet() -> Result<()> {
     // create local execution context
     let ctx = SessionContext::new();
 
-    let test_data = datafusion::test_util::parquet_test_data();
+    let path = PathBuf::from(env!("CARGO_MANIFEST_DIR"))
+        .join("data")
+        .join("parquet")
+        .join("alltypes_plain.parquet");
 
     // Configure listing options
     let file_format = ParquetFormat::default().with_enable_pruning(true);
-    let listing_options = ListingOptions::new(Arc::new(file_format))
-        // This is a workaround for this example since `test_data` contains
-        // many different parquet different files,
-        // in practice use FileType::PARQUET.get_ext().
-        .with_file_extension("alltypes_plain.parquet");
+    let listing_options =
+        
ListingOptions::new(Arc::new(file_format)).with_file_extension(".parquet");
 
     // First example were we use an absolute path, which requires no 
additional setup.
     ctx.register_listing_table(
         "my_table",
-        &format!("file://{test_data}/"),
+        path.to_str().unwrap(),

Review Comment:
   Preserve "file://"



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to