This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new b7e618f088 GH-43738: [GLib] Add `GArrowAzureFileSytem` (#43739)
b7e618f088 is described below
commit b7e618f088540a45e2ddab39696ce3d543821763
Author: Sutou Kouhei <[email protected]>
AuthorDate: Sun Aug 18 10:42:53 2024 +0900
GH-43738: [GLib] Add `GArrowAzureFileSytem` (#43739)
### Rationale for this change
The bindings for `arrow::fs::AzureFileSytem` is missing.
### What changes are included in this PR?
Add the bindings for `arrow::fs::AzureFileSytem`.
### Are these changes tested?
Yes.
### Are there any user-facing changes?
Yes.
* GitHub Issue: #43738
Authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
---
c_glib/arrow-glib/file-system.cpp | 16 ++++++++++++++++
c_glib/arrow-glib/file-system.h | 12 ++++++++++++
2 files changed, 28 insertions(+)
diff --git a/c_glib/arrow-glib/file-system.cpp
b/c_glib/arrow-glib/file-system.cpp
index b6efa2b872..9ba494e405 100644
--- a/c_glib/arrow-glib/file-system.cpp
+++ b/c_glib/arrow-glib/file-system.cpp
@@ -56,6 +56,8 @@ G_BEGIN_DECLS
* #GArrowS3FileSystem is a class for S3-backed file system.
*
* #GArrowGCSFileSystem is a class for GCS-backed file system.
+ *
+ * #GArrowAzureFileSystem is a class for Azure-backed file system.
*/
/* arrow::fs::FileInfo */
@@ -1561,6 +1563,18 @@
garrow_gcs_file_system_class_init(GArrowGCSFileSystemClass *klass)
{
}
+G_DEFINE_TYPE(GArrowAzureFileSystem, garrow_azure_file_system,
GARROW_TYPE_FILE_SYSTEM)
+
+static void
+garrow_azure_file_system_init(GArrowAzureFileSystem *file_system)
+{
+}
+
+static void
+garrow_azure_file_system_class_init(GArrowAzureFileSystemClass *klass)
+{
+}
+
G_END_DECLS
GArrowFileInfo *
@@ -1592,6 +1606,8 @@
garrow_file_system_new_raw(std::shared_ptr<arrow::fs::FileSystem> *arrow_file_sy
file_system_type = GARROW_TYPE_S3_FILE_SYSTEM;
} else if (type_name == "gcs") {
file_system_type = GARROW_TYPE_GCS_FILE_SYSTEM;
+ } else if (type_name == "abfs") {
+ file_system_type = GARROW_TYPE_AZURE_FILE_SYSTEM;
} else if (type_name == "mock") {
file_system_type = GARROW_TYPE_MOCK_FILE_SYSTEM;
}
diff --git a/c_glib/arrow-glib/file-system.h b/c_glib/arrow-glib/file-system.h
index 2e500672e1..9a903c6af6 100644
--- a/c_glib/arrow-glib/file-system.h
+++ b/c_glib/arrow-glib/file-system.h
@@ -337,4 +337,16 @@ struct _GArrowGCSFileSystemClass
GArrowFileSystemClass parent_class;
};
+#define GARROW_TYPE_AZURE_FILE_SYSTEM (garrow_azure_file_system_get_type())
+GARROW_AVAILABLE_IN_18_0
+G_DECLARE_DERIVABLE_TYPE(GArrowAzureFileSystem,
+ garrow_azure_file_system,
+ GARROW,
+ AZURE_FILE_SYSTEM,
+ GArrowFileSystem)
+struct _GArrowAzureFileSystemClass
+{
+ GArrowFileSystemClass parent_class;
+};
+
G_END_DECLS