2010YOUY01 commented on code in PR #7058:
URL: https://github.com/apache/arrow-datafusion/pull/7058#discussion_r1273862018


##########
datafusion/core/src/datasource/listing/url.rs:
##########
@@ -87,6 +88,34 @@ impl ListingTableUrl {
         }
     }
 
+    /// Perform shell-like path expansions
+    /// * Home directory expansion: "~/test.csv" expands to 
"/Users/user1/test.csv"
+    /// * Environment variable expansion: "$HOME/$DATA/test.csv" expands to
+    /// "/Users/user1/data/test.csv"
+    fn expand_path_prefix(prefix: &str) -> Result<String, DataFusionError> {
+        let error_msg = format!("Failed to perform shell expansion in path: 
{prefix}");
+
+        let expanded_dir_output = Command::new("sh")
+            .arg("-c")
+            .arg(&format!("echo {prefix}"))

Review Comment:
   Thank you! Totally agreed.
   Updated the implementation with "2."



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

Reply via email to