wForget commented on code in PR #1359:
URL: https://github.com/apache/datafusion-comet/pull/1359#discussion_r1945908388


##########
native/core/src/parquet/parquet_support.rs:
##########
@@ -1861,6 +1863,42 @@ fn trim_end(s: &str) -> &str {
     }
 }
 
+// Default object store which is local filesystem
+#[cfg(not(feature = "hdfs"))]
+pub(crate) fn register_object_store(
+    session_context: Arc<SessionContext>,
+) -> Result<ObjectStoreUrl, ExecutionError> {
+    let object_store = object_store::local::LocalFileSystem::new();
+    let url = ObjectStoreUrl::parse("file://")?;
+    session_context
+        .runtime_env()
+        .register_object_store(url.as_ref(), Arc::new(object_store));
+    Ok(url)
+}
+
+// HDFS object store
+#[cfg(feature = "hdfs")]
+pub(crate) fn register_object_store(
+    session_context: Arc<SessionContext>,
+) -> Result<ObjectStoreUrl, ExecutionError> {
+    // TODO: read the namenode configuration from file schema or from 
spark.defaultFS

Review Comment:
   > for HDFS/S3 the default fs can be taken from spark.hadoop.fs.defaultFS 
parameter. 
   
   Sometimes I also access other hdfs ns like:
   
   ```
   select * from `parquet`.`hdfs://other-ns:8020/warehouse/db/table`
   ```



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