diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml
index 11e3c93ed0806..04f944f56c665 100644
--- a/.github/workflows/ruby.yml
+++ b/.github/workflows/ruby.yml
@@ -186,7 +186,7 @@ jobs:
shell: bash
run: ci/scripts/ruby_test.sh $(pwd) $(pwd)/build
- windows:
+ windows-mingw:
name: AMD64 Windows MinGW ${{ matrix.mingw-n-bits }} GLib & Ruby
runs-on: windows-2019
if: ${{ !contains(github.event.pull_request.title, 'WIP') }}
@@ -267,7 +267,6 @@ jobs:
ridk exec bash ci\scripts\cpp_build.sh "${source_dir}" "${build_dir}"
- name: Build GLib
run: |
- $Env:CMAKE_BUILD_PARALLEL_LEVEL = $Env:NUMBER_OF_PROCESSORS
$source_dir = "$(ridk exec cygpath --unix "$(Get-Location)")"
$build_dir = "$(ridk exec cygpath --unix "$(Get-Location)\build")"
$ErrorActionPreference = "Continue"
@@ -305,3 +304,96 @@ jobs:
$Env:MAKE = "ridk exec make"
$ErrorActionPreference = "Continue"
rake -f ruby\Rakefile
+
+ windows-msvc:
+ name: AMD64 Windows MSVC GLib
+ runs-on: windows-2019
+ if: ${{ !contains(github.event.pull_request.title, 'WIP') }}
+ timeout-minutes: 90
+ strategy:
+ fail-fast: false
+ env:
+ ARROW_BOOST_USE_SHARED: OFF
+ ARROW_BUILD_BENCHMARKS: OFF
+ ARROW_BUILD_SHARED: ON
+ ARROW_BUILD_STATIC: OFF
+ ARROW_BUILD_TESTS: OFF
+ ARROW_ACERO: ON
+ ARROW_DATASET: ON
+ ARROW_FLIGHT: OFF
+ ARROW_FLIGHT_SQL: OFF
+ ARROW_GANDIVA: OFF
+ ARROW_HDFS: OFF
+ ARROW_HOME: "${{ github.workspace }}/dist"
+ ARROW_JEMALLOC: OFF
+ ARROW_MIMALLOC: ON
+ ARROW_ORC: OFF
+ ARROW_PARQUET: ON
+ ARROW_SUBSTRAIT: OFF
+ ARROW_USE_GLOG: OFF
+ ARROW_VERBOSE_THIRDPARTY_BUILD: OFF
+ ARROW_WITH_BROTLI: OFF
+ ARROW_WITH_BZ2: OFF
+ ARROW_WITH_LZ4: OFF
+ ARROW_WITH_OPENTELEMETRY: OFF
+ ARROW_WITH_SNAPPY: ON
+ ARROW_WITH_ZLIB: OFF
+ ARROW_WITH_ZSTD: ON
+ BOOST_SOURCE: BUNDLED
+ CMAKE_CXX_STANDARD: "17"
+ CMAKE_GENERATOR: Ninja
+ CMAKE_INSTALL_PREFIX: "${{ github.workspace }}/dist"
+ CMAKE_UNITY_BUILD: ON
+ steps:
+ - name: Disable Crash Dialogs
+ run: |
+ reg add `
+ "HKCU\SOFTWARE\Microsoft\Windows\Windows Error Reporting" `
+ /v DontShowUI `
+ /t REG_DWORD `
+ /d 1 `
+ /f
+ - name: Checkout Arrow
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ submodules: recursive
+ - name: Install vcpkg
+ shell: bash
+ run: |
+ ci/scripts/install_vcpkg.sh ./vcpkg
+ - name: Install meson
+ run: |
+ python -m pip install meson
+ - name: Install ccache
+ shell: bash
+ run: |
+ ci/scripts/install_ccache.sh 4.6.3 /usr
+ - name: Setup ccache
+ shell: bash
+ run: |
+ ci/scripts/ccache_setup.sh
+ - name: ccache info
+ id: ccache-info
+ shell: bash
+ run: |
+ echo "cache-dir=$(ccache --get-config cache_dir)" >> $GITHUB_OUTPUT
+ - name: Cache ccache
+ uses: actions/cache@v4
+ with:
+ path: ${{ steps.ccache-info.outputs.cache-dir }}
+ key: glib-ccache-msvc-${{ env.CACHE_VERSION }}-${{ hashFiles('cpp/**') }}
+ restore-keys: glib-ccache-msvc-${{ env.CACHE_VERSION }}-
+ env:
+ # We can invalidate the current cache by updating this.
+ CACHE_VERSION: "2024-05-09"
+ - name: Build C++
+ shell: cmd
+ run: |
+ call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
+ bash -c "ci/scripts/cpp_build.sh $(pwd) $(pwd)/build"
+ - name: Build GLib
+ shell: cmd
+ run: |
+ call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
+ bash -c "VCPKG_ROOT=\"$(pwd)/vcpkg\" ci/scripts/c_glib_build.sh $(pwd) $(pwd)/build"
diff --git a/.gitignore b/.gitignore
index c7f5aa90e18e6..e2e84fee57e3c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -102,4 +102,4 @@ __debug_bin
.envrc
# Develocity
-.mvn/.gradle-enterprise/
+.mvn/.develocity.xml
diff --git a/.mvn/gradle-enterprise.xml b/.mvn/develocity.xml
similarity index 78%
rename from .mvn/gradle-enterprise.xml
rename to .mvn/develocity.xml
index bae5a3f147e68..df3cbccd2b6cb 100644
--- a/.mvn/gradle-enterprise.xml
+++ b/.mvn/develocity.xml
@@ -1,4 +1,4 @@
-
+
-
+
https://ge.apache.org
false
- true
+ true
true
true
#{isFalse(env['CI'])}
- ALWAYS
+ true
true
#{{'0.0.0.0'}}
@@ -42,4 +42,4 @@
false
-
+
diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml
index b446c647e47e6..b56ab0fd7772a 100644
--- a/.mvn/extensions.xml
+++ b/.mvn/extensions.xml
@@ -22,12 +22,12 @@
com.gradle
- gradle-enterprise-maven-extension
- 1.20
+ develocity-maven-extension
+ 1.21.4
com.gradle
common-custom-user-data-maven-extension
- 1.12.5
+ 2.0
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index bf5ca08d53c32..e0b8009b03184 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -40,7 +40,7 @@ repos:
hooks:
- id: flake8
name: Python Format
- files: ^(python|dev|integration)/
+ files: ^(python|dev|c_glib|integration)/
types:
- file
- python
@@ -116,25 +116,28 @@ repos:
name: CMake Format
files: >-
(
+ ?.*CMakeLists\.txt$|
?^ci/.*/.*\.cmake$|
?^cpp/.*/.*\.cmake\.in$|
?^cpp/.*/.*\.cmake$|
- ?^cpp/.*/CMakeLists\.txt$|
- ?^go/.*/CMakeLists\.txt$|
- ?^java/.*/CMakeLists\.txt$|
- ?^matlab/.*/CMakeLists\.txt$|
- ?^python/.*/CMakeLists\.txt$|
)
exclude: >-
(
+ ?^ci/conan/all/.*CMakeLists\.txt$|
?^cpp/cmake_modules/FindNumPy\.cmake$|
?^cpp/cmake_modules/FindPythonLibsNew\.cmake$|
?^cpp/cmake_modules/UseCython\.cmake$|
- ?^cpp/src/arrow/util/config\.h\.cmake$|
+ ?^cpp/src/arrow/util/.*\.h\.cmake$|
)
- repo: https://github.com/sphinx-contrib/sphinx-lint
rev: v0.9.1
hooks:
- id: sphinx-lint
- files: ^docs/
- args: ['--disable', 'all', '--enable', 'trailing-whitespace,missing-final-newline', 'docs']
+ files: ^docs/source
+ exclude: ^docs/source/python/generated
+ args: [
+ '--enable',
+ 'all',
+ '--disable',
+ 'dangling-hyphen,line-too-long',
+ ]
diff --git a/c_glib/arrow-cuda-glib/arrow-cuda-glib.h b/c_glib/arrow-cuda-glib/arrow-cuda-glib.h
index b3c7f21087669..572ff92ed9b43 100644
--- a/c_glib/arrow-cuda-glib/arrow-cuda-glib.h
+++ b/c_glib/arrow-cuda-glib/arrow-cuda-glib.h
@@ -21,4 +21,6 @@
#include
+#include
+
#include
diff --git a/c_glib/arrow-cuda-glib/cuda.h b/c_glib/arrow-cuda-glib/cuda.h
index 863743a620bf8..f04a3381259bb 100644
--- a/c_glib/arrow-cuda-glib/cuda.h
+++ b/c_glib/arrow-cuda-glib/cuda.h
@@ -21,9 +21,12 @@
#include
+#include
+
G_BEGIN_DECLS
#define GARROW_CUDA_TYPE_DEVICE_MANAGER (garrow_cuda_device_manager_get_type())
+GARROW_CUDA_AVAILABLE_IN_0_12
G_DECLARE_DERIVABLE_TYPE(GArrowCUDADeviceManager,
garrow_cuda_device_manager,
GARROW_CUDA,
@@ -35,6 +38,7 @@ struct _GArrowCUDADeviceManagerClass
};
#define GARROW_CUDA_TYPE_CONTEXT (garrow_cuda_context_get_type())
+GARROW_CUDA_AVAILABLE_IN_0_12
G_DECLARE_DERIVABLE_TYPE(
GArrowCUDAContext, garrow_cuda_context, GARROW_CUDA, CONTEXT, GObject)
struct _GArrowCUDAContextClass
@@ -43,6 +47,7 @@ struct _GArrowCUDAContextClass
};
#define GARROW_CUDA_TYPE_BUFFER (garrow_cuda_buffer_get_type())
+GARROW_CUDA_AVAILABLE_IN_0_12
G_DECLARE_DERIVABLE_TYPE(
GArrowCUDABuffer, garrow_cuda_buffer, GARROW_CUDA, BUFFER, GArrowBuffer)
struct _GArrowCUDABufferClass
@@ -51,6 +56,7 @@ struct _GArrowCUDABufferClass
};
#define GARROW_CUDA_TYPE_HOST_BUFFER (garrow_cuda_host_buffer_get_type())
+GARROW_CUDA_AVAILABLE_IN_0_12
G_DECLARE_DERIVABLE_TYPE(GArrowCUDAHostBuffer,
garrow_cuda_host_buffer,
GARROW_CUDA,
@@ -62,6 +68,7 @@ struct _GArrowCUDAHostBufferClass
};
#define GARROW_CUDA_TYPE_IPC_MEMORY_HANDLE (garrow_cuda_ipc_memory_handle_get_type())
+GARROW_CUDA_AVAILABLE_IN_0_12
G_DECLARE_DERIVABLE_TYPE(GArrowCUDAIPCMemoryHandle,
garrow_cuda_ipc_memory_handle,
GARROW_CUDA,
@@ -73,6 +80,7 @@ struct _GArrowCUDAIPCMemoryHandleClass
};
#define GARROW_CUDA_TYPE_BUFFER_INPUT_STREAM (garrow_cuda_buffer_input_stream_get_type())
+GARROW_CUDA_AVAILABLE_IN_0_12
G_DECLARE_DERIVABLE_TYPE(GArrowCUDABufferInputStream,
garrow_cuda_buffer_input_stream,
GARROW_CUDA,
@@ -85,6 +93,7 @@ struct _GArrowCUDABufferInputStreamClass
#define GARROW_CUDA_TYPE_BUFFER_OUTPUT_STREAM \
(garrow_cuda_buffer_output_stream_get_type())
+GARROW_CUDA_AVAILABLE_IN_0_12
G_DECLARE_DERIVABLE_TYPE(GArrowCUDABufferOutputStream,
garrow_cuda_buffer_output_stream,
GARROW_CUDA,
@@ -95,71 +104,100 @@ struct _GArrowCUDABufferOutputStreamClass
GArrowOutputStreamClass parent_class;
};
+GARROW_CUDA_AVAILABLE_IN_0_12
GArrowCUDADeviceManager *
garrow_cuda_device_manager_new(GError **error);
+GARROW_CUDA_AVAILABLE_IN_0_12
GArrowCUDAContext *
garrow_cuda_device_manager_get_context(GArrowCUDADeviceManager *manager,
gint gpu_number,
GError **error);
+
+GARROW_CUDA_AVAILABLE_IN_0_12
gsize
garrow_cuda_device_manager_get_n_devices(GArrowCUDADeviceManager *manager);
+GARROW_CUDA_AVAILABLE_IN_0_12
gint64
garrow_cuda_context_get_allocated_size(GArrowCUDAContext *context);
+GARROW_CUDA_AVAILABLE_IN_0_12
GArrowCUDABuffer *
garrow_cuda_buffer_new(GArrowCUDAContext *context, gint64 size, GError **error);
+
+GARROW_CUDA_AVAILABLE_IN_0_12
GArrowCUDABuffer *
garrow_cuda_buffer_new_ipc(GArrowCUDAContext *context,
GArrowCUDAIPCMemoryHandle *handle,
GError **error);
+
+GARROW_CUDA_AVAILABLE_IN_0_12
GArrowCUDABuffer *
garrow_cuda_buffer_new_record_batch(GArrowCUDAContext *context,
GArrowRecordBatch *record_batch,
GError **error);
+
+GARROW_CUDA_AVAILABLE_IN_0_12
GBytes *
garrow_cuda_buffer_copy_to_host(GArrowCUDABuffer *buffer,
gint64 position,
gint64 size,
GError **error);
+
+GARROW_CUDA_AVAILABLE_IN_0_12
gboolean
garrow_cuda_buffer_copy_from_host(GArrowCUDABuffer *buffer,
const guint8 *data,
gint64 size,
GError **error);
+
+GARROW_CUDA_AVAILABLE_IN_0_12
GArrowCUDAIPCMemoryHandle *
garrow_cuda_buffer_export(GArrowCUDABuffer *buffer, GError **error);
+
+GARROW_CUDA_AVAILABLE_IN_0_12
GArrowCUDAContext *
garrow_cuda_buffer_get_context(GArrowCUDABuffer *buffer);
+
+GARROW_CUDA_AVAILABLE_IN_0_12
GArrowRecordBatch *
garrow_cuda_buffer_read_record_batch(GArrowCUDABuffer *buffer,
GArrowSchema *schema,
GArrowReadOptions *options,
GError **error);
+GARROW_CUDA_AVAILABLE_IN_0_12
GArrowCUDAHostBuffer *
garrow_cuda_host_buffer_new(gint gpu_number, gint64 size, GError **error);
+GARROW_CUDA_AVAILABLE_IN_0_12
GArrowCUDAIPCMemoryHandle *
garrow_cuda_ipc_memory_handle_new(const guint8 *data, gsize size, GError **error);
+GARROW_CUDA_AVAILABLE_IN_0_12
GArrowBuffer *
garrow_cuda_ipc_memory_handle_serialize(GArrowCUDAIPCMemoryHandle *handle,
GError **error);
+GARROW_CUDA_AVAILABLE_IN_0_12
GArrowCUDABufferInputStream *
garrow_cuda_buffer_input_stream_new(GArrowCUDABuffer *buffer);
+GARROW_CUDA_AVAILABLE_IN_0_12
GArrowCUDABufferOutputStream *
garrow_cuda_buffer_output_stream_new(GArrowCUDABuffer *buffer);
+GARROW_CUDA_AVAILABLE_IN_0_12
gboolean
garrow_cuda_buffer_output_stream_set_buffer_size(GArrowCUDABufferOutputStream *stream,
gint64 size,
GError **error);
+GARROW_CUDA_AVAILABLE_IN_0_12
gint64
garrow_cuda_buffer_output_stream_get_buffer_size(GArrowCUDABufferOutputStream *stream);
+
+GARROW_CUDA_AVAILABLE_IN_0_12
gint64
garrow_cuda_buffer_output_stream_get_buffered_size(GArrowCUDABufferOutputStream *stream);
diff --git a/c_glib/arrow-cuda-glib/meson.build b/c_glib/arrow-cuda-glib/meson.build
index 88029e6dc2073..47bed70f03b60 100644
--- a/c_glib/arrow-cuda-glib/meson.build
+++ b/c_glib/arrow-cuda-glib/meson.build
@@ -31,10 +31,17 @@ cpp_headers = files(
'cuda.hpp',
)
+version_h = configure_file(
+ input: 'version.h.in',
+ output: 'version.h',
+ command: [python3, generate_version_header_py, '--library', 'GARROW_CUDA', '--version', version, '--input', '@INPUT@', '--output', '@OUTPUT@'],
+)
+
+c_headers += version_h
+
headers = c_headers + cpp_headers
install_headers(headers, subdir: 'arrow-cuda-glib')
-
dependencies = [
arrow_cuda,
arrow_glib,
@@ -45,6 +52,7 @@ libarrow_cuda_glib = library('arrow-cuda-glib',
dependencies: dependencies,
implicit_include_directories: false,
include_directories: base_include_directories,
+ cpp_args: ['-DGARROW_CUDA_COMPILATION'],
soversion: so_version,
version: library_version)
arrow_cuda_glib = declare_dependency(link_with: libarrow_cuda_glib,
diff --git a/c_glib/arrow-cuda-glib/version.h.in b/c_glib/arrow-cuda-glib/version.h.in
new file mode 100644
index 0000000000000..0ab5bfd562b41
--- /dev/null
+++ b/c_glib/arrow-cuda-glib/version.h.in
@@ -0,0 +1,159 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#pragma once
+
+#include
+
+/**
+ * SECTION: version
+ * @section_id: version-macros
+ * @title: Version related macros
+ * @include: arrow-cuda-glib/arrow-cuda-glib.h
+ *
+ * Apache Arrow CUDA GLib provides macros that can be used by C pre-processor.
+ * They are useful to check version related things at compile time.
+ */
+
+/**
+ * GARROW_CUDA_VERSION_MAJOR:
+ *
+ * The major version.
+ *
+ * Since: 17.0.0
+ */
+#define GARROW_CUDA_VERSION_MAJOR (@VERSION_MAJOR@)
+
+/**
+ * GARROW_CUDA_VERSION_MINOR:
+ *
+ * The minor version.
+ *
+ * Since: 17.0.0
+ */
+#define GARROW_CUDA_VERSION_MINOR (@VERSION_MINOR@)
+
+/**
+ * GARROW_CUDA_VERSION_MICRO:
+ *
+ * The micro version.
+ *
+ * Since: 17.0.0
+ */
+#define GARROW_CUDA_VERSION_MICRO (@VERSION_MICRO@)
+
+/**
+ * GARROW_CUDA_VERSION_TAG:
+ *
+ * The version tag. Normally, it's an empty string. It's "SNAPSHOT"
+ * for snapshot version.
+ *
+ * Since: 17.0.0
+ */
+#define GARROW_CUDA_VERSION_TAG "@VERSION_TAG@"
+
+/**
+ * GARROW_CUDA_VERSION_CHECK:
+ * @major: A major version to check for.
+ * @minor: A minor version to check for.
+ * @micro: A micro version to check for.
+ *
+ * You can use this macro in C pre-processor.
+ *
+ * Returns: %TRUE if the compile time Apache Arrow GLib version is the
+ * same as or newer than the passed version, %FALSE otherwise.
+ *
+ * Since: 17.0.0
+ */
+#define GARROW_CUDA_VERSION_CHECK(major, minor, micro) \
+ (GARROW_CUDA_VERSION_MAJOR > (major) || \
+ (GARROW_CUDA_VERSION_MAJOR == (major) && \
+ GARROW_CUDA_VERSION_MINOR > (minor)) || \
+ (GARROW_CUDA_VERSION_MAJOR == (major) && \
+ GARROW_CUDA_VERSION_MINOR == (minor) && \
+ GARROW_CUDA_VERSION_MICRO >= (micro)))
+
+/**
+ * GARROW_CUDA_DISABLE_DEPRECATION_WARNINGS:
+ *
+ * If this macro is defined, no deprecated warnings are produced.
+ *
+ * You must define this macro before including the
+ * arrow-glib/arrow-glib.h header.
+ *
+ * Since: 17.0.0
+ */
+
+#ifdef GARROW_CUDA_DISABLE_DEPRECATION_WARNINGS
+# define GARROW_CUDA_DEPRECATED
+# define GARROW_CUDA_DEPRECATED_FOR(function)
+# define GARROW_CUDA_UNAVAILABLE(major, minor)
+#else
+# define GARROW_CUDA_DEPRECATED G_DEPRECATED
+# define GARROW_CUDA_DEPRECATED_FOR(function) G_DEPRECATED_FOR(function)
+# define GARROW_CUDA_UNAVAILABLE(major, minor) G_UNAVAILABLE(major, minor)
+#endif
+
+@ENCODED_VERSIONS@
+
+/**
+ * GARROW_CUDA_VERSION_MIN_REQUIRED:
+ *
+ * You can use this macro for compile time API version check.
+ *
+ * This macro value must be one of the predefined version macros such
+ * as %GARROW_CUDA_VERSION_0_10.
+ *
+ * If you use any functions that is defined by newer version than
+ * %GARROW_CUDA_VERSION_MIN_REQUIRED, deprecated warnings are produced at
+ * compile time.
+ *
+ * You must define this macro before including the
+ * arrow-cuda-glib/arrow-cuda-glib.h header.
+ *
+ * Since: 17.0.0
+ */
+#ifndef GARROW_CUDA_VERSION_MIN_REQUIRED
+# define GARROW_CUDA_VERSION_MIN_REQUIRED GARROW_VERSION_MIN_REQUIRED
+#endif
+
+/**
+ * GARROW_CUDA_VERSION_MAX_ALLOWED:
+ *
+ * You can use this macro for compile time API version check.
+ *
+ * This macro value must be one of the predefined version macros such
+ * as %GARROW_CUDA_VERSION_0_10.
+ *
+ * If you use any functions that is defined by newer version than
+ * %GARROW_CUDA_VERSION_MAX_ALLOWED, deprecated warnings are produced at
+ * compile time.
+ *
+ * You must define this macro before including the
+ * arrow-cuda-glib/arrow-cuda-glib.h header.
+ *
+ * Since: 17.0.0
+ */
+#ifndef GARROW_CUDA_VERSION_MAX_ALLOWED
+# define GARROW_CUDA_VERSION_MAX_ALLOWED GARROW_VERSION_MAX_ALLOWED
+#endif
+
+@VISIBILITY_MACROS@
+
+@AVAILABILITY_MACROS@
diff --git a/c_glib/arrow-dataset-glib/arrow-dataset-glib.h b/c_glib/arrow-dataset-glib/arrow-dataset-glib.h
index 58f4e216cc715..7ebf36ddd2b78 100644
--- a/c_glib/arrow-dataset-glib/arrow-dataset-glib.h
+++ b/c_glib/arrow-dataset-glib/arrow-dataset-glib.h
@@ -21,6 +21,8 @@
#include
+#include
+
#include
#include
#include
diff --git a/c_glib/arrow-dataset-glib/dataset-definition.h b/c_glib/arrow-dataset-glib/dataset-definition.h
index f278b05a135f5..bc52d6d3663a3 100644
--- a/c_glib/arrow-dataset-glib/dataset-definition.h
+++ b/c_glib/arrow-dataset-glib/dataset-definition.h
@@ -21,9 +21,12 @@
#include
+#include
+
G_BEGIN_DECLS
#define GADATASET_TYPE_DATASET (gadataset_dataset_get_type())
+GADATASET_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(GADatasetDataset, gadataset_dataset, GADATASET, DATASET, GObject)
struct _GADatasetDatasetClass
{
diff --git a/c_glib/arrow-dataset-glib/dataset-factory.h b/c_glib/arrow-dataset-glib/dataset-factory.h
index 1dc875837fe21..e7d3bc27aea8f 100644
--- a/c_glib/arrow-dataset-glib/dataset-factory.h
+++ b/c_glib/arrow-dataset-glib/dataset-factory.h
@@ -24,6 +24,7 @@
G_BEGIN_DECLS
#define GADATASET_TYPE_FINISH_OPTIONS (gadataset_finish_options_get_type())
+GADATASET_AVAILABLE_IN_11_0
G_DECLARE_DERIVABLE_TYPE(
GADatasetFinishOptions, gadataset_finish_options, GADATASET, FINISH_OPTIONS, GObject)
struct _GADatasetFinishOptionsClass
@@ -31,11 +32,12 @@ struct _GADatasetFinishOptionsClass
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_11_0
+GADATASET_AVAILABLE_IN_11_0
GADatasetFinishOptions *
gadataset_finish_options_new(void);
#define GADATASET_TYPE_DATASET_FACTORY (gadataset_dataset_factory_get_type())
+GADATASET_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(
GADatasetDatasetFactory, gadataset_dataset_factory, GADATASET, DATASET_FACTORY, GObject)
struct _GADatasetDatasetFactoryClass
@@ -43,7 +45,7 @@ struct _GADatasetDatasetFactoryClass
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_5_0
+GADATASET_AVAILABLE_IN_5_0
GADatasetDataset *
gadataset_dataset_factory_finish(GADatasetDatasetFactory *factory,
GADatasetFinishOptions *options,
@@ -51,6 +53,7 @@ gadataset_dataset_factory_finish(GADatasetDatasetFactory *factory,
#define GADATASET_TYPE_FILE_SYSTEM_DATASET_FACTORY \
(gadataset_file_system_dataset_factory_get_type())
+GADATASET_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(GADatasetFileSystemDatasetFactory,
gadataset_file_system_dataset_factory,
GADATASET,
@@ -61,32 +64,33 @@ struct _GADatasetFileSystemDatasetFactoryClass
GADatasetDatasetFactoryClass parent_class;
};
-GARROW_AVAILABLE_IN_5_0
+GADATASET_AVAILABLE_IN_5_0
GADatasetFileSystemDatasetFactory *
gadataset_file_system_dataset_factory_new(GADatasetFileFormat *file_format);
-GARROW_AVAILABLE_IN_5_0
+GADATASET_AVAILABLE_IN_5_0
gboolean
gadataset_file_system_dataset_factory_set_file_system(
GADatasetFileSystemDatasetFactory *factory,
GArrowFileSystem *file_system,
GError **error);
+GADATASET_AVAILABLE_IN_5_0
gboolean
gadataset_file_system_dataset_factory_set_file_system_uri(
GADatasetFileSystemDatasetFactory *factory, const gchar *uri, GError **error);
-GARROW_AVAILABLE_IN_5_0
+GADATASET_AVAILABLE_IN_5_0
gboolean
gadataset_file_system_dataset_factory_add_path(GADatasetFileSystemDatasetFactory *factory,
const gchar *path,
GError **error);
/*
-GARROW_AVAILABLE_IN_5_0
+GADATASET_AVAILABLE_IN_5_0
gboolean
gadataset_file_system_dataset_factory_add_file(
GADatasetFileSystemDatasetFactory *factory,
GArrowFileInfo *file,
GError **error);
-GARROW_AVAILABLE_IN_5_0
+GADATASET_AVAILABLE_IN_5_0
gboolean
gadataset_file_system_dataset_factory_add_selector(
GADatasetFileSystemDatasetFactory *factory,
@@ -94,7 +98,7 @@ gadataset_file_system_dataset_factory_add_selector(
GError **error);
*/
-GARROW_AVAILABLE_IN_5_0
+GADATASET_AVAILABLE_IN_5_0
GADatasetFileSystemDataset *
gadataset_file_system_dataset_factory_finish(GADatasetFileSystemDatasetFactory *factory,
GADatasetFinishOptions *options,
diff --git a/c_glib/arrow-dataset-glib/dataset.h b/c_glib/arrow-dataset-glib/dataset.h
index 57f6c7729f073..657de330e6c49 100644
--- a/c_glib/arrow-dataset-glib/dataset.h
+++ b/c_glib/arrow-dataset-glib/dataset.h
@@ -25,18 +25,19 @@
G_BEGIN_DECLS
-GARROW_AVAILABLE_IN_5_0
+GADATASET_AVAILABLE_IN_5_0
GADatasetScannerBuilder *
gadataset_dataset_begin_scan(GADatasetDataset *dataset, GError **error);
-GARROW_AVAILABLE_IN_5_0
+GADATASET_AVAILABLE_IN_5_0
GArrowTable *
gadataset_dataset_to_table(GADatasetDataset *dataset, GError **error);
-GARROW_AVAILABLE_IN_5_0
+GADATASET_AVAILABLE_IN_5_0
gchar *
gadataset_dataset_get_type_name(GADatasetDataset *dataset);
#define GADATASET_TYPE_FILE_SYSTEM_DATASET_WRITE_OPTIONS \
(gadataset_file_system_dataset_write_options_get_type())
+GADATASET_AVAILABLE_IN_6_0
G_DECLARE_DERIVABLE_TYPE(GADatasetFileSystemDatasetWriteOptions,
gadataset_file_system_dataset_write_options,
GADATASET,
@@ -47,11 +48,12 @@ struct _GADatasetFileSystemDatasetWriteOptionsClass
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_6_0
+GADATASET_AVAILABLE_IN_6_0
GADatasetFileSystemDatasetWriteOptions *
gadataset_file_system_dataset_write_options_new(void);
#define GADATASET_TYPE_FILE_SYSTEM_DATASET (gadataset_file_system_dataset_get_type())
+GADATASET_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(GADatasetFileSystemDataset,
gadataset_file_system_dataset,
GADATASET,
@@ -62,7 +64,7 @@ struct _GADatasetFileSystemDatasetClass
GADatasetDatasetClass parent_class;
};
-GARROW_AVAILABLE_IN_6_0
+GADATASET_AVAILABLE_IN_6_0
gboolean
gadataset_file_system_dataset_write_scanner(
GADatasetScanner *scanner,
diff --git a/c_glib/arrow-dataset-glib/file-format.h b/c_glib/arrow-dataset-glib/file-format.h
index 29487e59d70dd..f70523597e7c6 100644
--- a/c_glib/arrow-dataset-glib/file-format.h
+++ b/c_glib/arrow-dataset-glib/file-format.h
@@ -21,9 +21,12 @@
#include
+#include
+
G_BEGIN_DECLS
#define GADATASET_TYPE_FILE_WRITE_OPTIONS (gadataset_file_write_options_get_type())
+GADATASET_AVAILABLE_IN_6_0
G_DECLARE_DERIVABLE_TYPE(GADatasetFileWriteOptions,
gadataset_file_write_options,
GADATASET,
@@ -35,6 +38,7 @@ struct _GADatasetFileWriteOptionsClass
};
#define GADATASET_TYPE_FILE_WRITER (gadataset_file_writer_get_type())
+GADATASET_AVAILABLE_IN_6_0
G_DECLARE_DERIVABLE_TYPE(
GADatasetFileWriter, gadataset_file_writer, GADATASET, FILE_WRITER, GObject)
struct _GADatasetFileWriterClass
@@ -42,21 +46,22 @@ struct _GADatasetFileWriterClass
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_6_0
+GADATASET_AVAILABLE_IN_6_0
gboolean
gadataset_file_writer_write_record_batch(GADatasetFileWriter *writer,
GArrowRecordBatch *record_batch,
GError **error);
-GARROW_AVAILABLE_IN_6_0
+GADATASET_AVAILABLE_IN_6_0
gboolean
gadataset_file_writer_write_record_batch_reader(GADatasetFileWriter *writer,
GArrowRecordBatchReader *reader,
GError **error);
-GARROW_AVAILABLE_IN_6_0
+GADATASET_AVAILABLE_IN_6_0
gboolean
gadataset_file_writer_finish(GADatasetFileWriter *writer, GError **error);
#define GADATASET_TYPE_FILE_FORMAT (gadataset_file_format_get_type())
+GADATASET_AVAILABLE_IN_3_0
G_DECLARE_DERIVABLE_TYPE(
GADatasetFileFormat, gadataset_file_format, GADATASET, FILE_FORMAT, GObject)
struct _GADatasetFileFormatClass
@@ -64,13 +69,13 @@ struct _GADatasetFileFormatClass
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_3_0
+GADATASET_AVAILABLE_IN_3_0
gchar *
gadataset_file_format_get_type_name(GADatasetFileFormat *format);
-GARROW_AVAILABLE_IN_6_0
+GADATASET_AVAILABLE_IN_6_0
GADatasetFileWriteOptions *
gadataset_file_format_get_default_write_options(GADatasetFileFormat *format);
-GARROW_AVAILABLE_IN_6_0
+GADATASET_AVAILABLE_IN_6_0
GADatasetFileWriter *
gadataset_file_format_open_writer(GADatasetFileFormat *format,
GArrowOutputStream *destination,
@@ -80,12 +85,13 @@ gadataset_file_format_open_writer(GADatasetFileFormat *format,
GADatasetFileWriteOptions *options,
GError **error);
-GARROW_AVAILABLE_IN_3_0
+GADATASET_AVAILABLE_IN_3_0
gboolean
gadataset_file_format_equal(GADatasetFileFormat *format,
GADatasetFileFormat *other_format);
#define GADATASET_TYPE_CSV_FILE_FORMAT (gadataset_csv_file_format_get_type())
+GADATASET_AVAILABLE_IN_3_0
G_DECLARE_DERIVABLE_TYPE(GADatasetCSVFileFormat,
gadataset_csv_file_format,
GADATASET,
@@ -96,11 +102,12 @@ struct _GADatasetCSVFileFormatClass
GADatasetFileFormatClass parent_class;
};
-GARROW_AVAILABLE_IN_3_0
+GADATASET_AVAILABLE_IN_3_0
GADatasetCSVFileFormat *
gadataset_csv_file_format_new(void);
#define GADATASET_TYPE_IPC_FILE_FORMAT (gadataset_ipc_file_format_get_type())
+GADATASET_AVAILABLE_IN_3_0
G_DECLARE_DERIVABLE_TYPE(GADatasetIPCFileFormat,
gadataset_ipc_file_format,
GADATASET,
@@ -111,11 +118,12 @@ struct _GADatasetIPCFileFormatClass
GADatasetFileFormatClass parent_class;
};
-GARROW_AVAILABLE_IN_3_0
+GADATASET_AVAILABLE_IN_3_0
GADatasetIPCFileFormat *
gadataset_ipc_file_format_new(void);
#define GADATASET_TYPE_PARQUET_FILE_FORMAT (gadataset_parquet_file_format_get_type())
+GADATASET_AVAILABLE_IN_3_0
G_DECLARE_DERIVABLE_TYPE(GADatasetParquetFileFormat,
gadataset_parquet_file_format,
GADATASET,
@@ -126,7 +134,7 @@ struct _GADatasetParquetFileFormatClass
GADatasetFileFormatClass parent_class;
};
-GARROW_AVAILABLE_IN_3_0
+GADATASET_AVAILABLE_IN_3_0
GADatasetParquetFileFormat *
gadataset_parquet_file_format_new(void);
diff --git a/c_glib/arrow-dataset-glib/fragment.h b/c_glib/arrow-dataset-glib/fragment.h
index 49acc360a3679..80eb9e19df3cc 100644
--- a/c_glib/arrow-dataset-glib/fragment.h
+++ b/c_glib/arrow-dataset-glib/fragment.h
@@ -21,11 +21,14 @@
#include
+#include
+
G_BEGIN_DECLS
/* arrow::dataset::Fragment */
#define GADATASET_TYPE_FRAGMENT (gadataset_fragment_get_type())
+GADATASET_AVAILABLE_IN_4_0
G_DECLARE_DERIVABLE_TYPE(
GADatasetFragment, gadataset_fragment, GADATASET, FRAGMENT, GObject)
struct _GADatasetFragmentClass
@@ -36,6 +39,7 @@ struct _GADatasetFragmentClass
/* arrow::dataset::InMemoryFragment */
#define GADATASET_TYPE_IN_MEMORY_FRAGMENT (gadataset_in_memory_fragment_get_type())
+GADATASET_AVAILABLE_IN_4_0
G_DECLARE_DERIVABLE_TYPE(GADatasetInMemoryFragment,
gadataset_in_memory_fragment,
GADATASET,
@@ -46,7 +50,7 @@ struct _GADatasetInMemoryFragmentClass
GADatasetFragmentClass parent_class;
};
-GARROW_AVAILABLE_IN_4_0
+GADATASET_AVAILABLE_IN_4_0
GADatasetInMemoryFragment *
gadataset_in_memory_fragment_new(GArrowSchema *schema,
GArrowRecordBatch **record_batches,
diff --git a/c_glib/arrow-dataset-glib/meson.build b/c_glib/arrow-dataset-glib/meson.build
index 0c869a4183efa..2d54efadfa230 100644
--- a/c_glib/arrow-dataset-glib/meson.build
+++ b/c_glib/arrow-dataset-glib/meson.build
@@ -17,6 +17,8 @@
# specific language governing permissions and limitations
# under the License.
+project_name = 'arrow-dataset-glib'
+
sources = files(
'dataset-factory.cpp',
'dataset.cpp',
@@ -47,20 +49,27 @@ cpp_headers = files(
'scanner.hpp',
)
+version_h = configure_file(
+ input: 'version.h.in',
+ output: 'version.h',
+ command: [python3, generate_version_header_py, '--library', 'GADATASET', '--version', version, '--input', '@INPUT@', '--output', '@OUTPUT@'],
+)
+
+c_headers += version_h
+
enums = gnome.mkenums('enums',
sources: c_headers,
identifier_prefix: 'GADataset',
symbol_prefix: 'gadataset',
c_template: 'enums.c.template',
h_template: 'enums.h.template',
- install_dir: join_paths(include_dir, 'arrow-dataset-glib'),
+ install_dir: join_paths(include_dir, project_name),
install_header: true)
enums_source = enums[0]
enums_header = enums[1]
-
headers = c_headers + cpp_headers
-install_headers(headers, subdir: 'arrow-dataset-glib')
+install_headers(headers, subdir: project_name)
dependencies = [
arrow_dataset,
@@ -72,6 +81,7 @@ libarrow_dataset_glib = library('arrow-dataset-glib',
dependencies: dependencies,
implicit_include_directories: false,
include_directories: base_include_directories,
+ cpp_args: ['-DGADATASET_COMPILATION'],
soversion: so_version,
version: library_version)
arrow_dataset_glib = declare_dependency(link_with: libarrow_dataset_glib,
diff --git a/c_glib/arrow-dataset-glib/partitioning.h b/c_glib/arrow-dataset-glib/partitioning.h
index ccf476272e429..7671958d88e61 100644
--- a/c_glib/arrow-dataset-glib/partitioning.h
+++ b/c_glib/arrow-dataset-glib/partitioning.h
@@ -21,6 +21,8 @@
#include
+#include
+
G_BEGIN_DECLS
/**
@@ -39,6 +41,7 @@ typedef enum {
#define GADATASET_TYPE_PARTITIONING_FACTORY_OPTIONS \
(gadataset_partitioning_factory_options_get_type())
+GADATASET_AVAILABLE_IN_11_0
G_DECLARE_DERIVABLE_TYPE(GADatasetPartitioningFactoryOptions,
gadataset_partitioning_factory_options,
GADATASET,
@@ -49,11 +52,12 @@ struct _GADatasetPartitioningFactoryOptionsClass
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_11_0
+GADATASET_AVAILABLE_IN_11_0
GADatasetPartitioningFactoryOptions *
gadataset_partitioning_factory_options_new(void);
#define GADATASET_TYPE_PARTITIONING (gadataset_partitioning_get_type())
+GADATASET_AVAILABLE_IN_6_0
G_DECLARE_DERIVABLE_TYPE(
GADatasetPartitioning, gadataset_partitioning, GADATASET, PARTITIONING, GObject)
struct _GADatasetPartitioningClass
@@ -61,16 +65,17 @@ struct _GADatasetPartitioningClass
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_6_0
+GADATASET_AVAILABLE_IN_6_0
gchar *
gadataset_partitioning_get_type_name(GADatasetPartitioning *partitioning);
-GARROW_AVAILABLE_IN_12_0
+GADATASET_AVAILABLE_IN_12_0
GADatasetPartitioning *
gadataset_partitioning_create_default(void);
#define GADATASET_TYPE_KEY_VALUE_PARTITIONING_OPTIONS \
(gadataset_key_value_partitioning_options_get_type())
+GADATASET_AVAILABLE_IN_11_0
G_DECLARE_DERIVABLE_TYPE(GADatasetKeyValuePartitioningOptions,
gadataset_key_value_partitioning_options,
GADATASET,
@@ -81,12 +86,13 @@ struct _GADatasetKeyValuePartitioningOptionsClass
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_11_0
+GADATASET_AVAILABLE_IN_11_0
GADatasetKeyValuePartitioningOptions *
gadataset_key_value_partitioning_options_new(void);
#define GADATASET_TYPE_KEY_VALUE_PARTITIONING \
(gadataset_key_value_partitioning_get_type())
+GADATASET_AVAILABLE_IN_6_0
G_DECLARE_DERIVABLE_TYPE(GADatasetKeyValuePartitioning,
gadataset_key_value_partitioning,
GADATASET,
@@ -99,6 +105,7 @@ struct _GADatasetKeyValuePartitioningClass
#define GADATASET_TYPE_DIRECTORY_PARTITIONING \
(gadataset_directory_partitioning_get_type())
+GADATASET_AVAILABLE_IN_6_0
G_DECLARE_DERIVABLE_TYPE(GADatasetDirectoryPartitioning,
gadataset_directory_partitioning,
GADATASET,
@@ -109,7 +116,7 @@ struct _GADatasetDirectoryPartitioningClass
GADatasetKeyValuePartitioningClass parent_class;
};
-GARROW_AVAILABLE_IN_6_0
+GADATASET_AVAILABLE_IN_6_0
GADatasetDirectoryPartitioning *
gadataset_directory_partitioning_new(GArrowSchema *schema,
GList *dictionaries,
@@ -118,6 +125,7 @@ gadataset_directory_partitioning_new(GArrowSchema *schema,
#define GADATASET_TYPE_HIVE_PARTITIONING_OPTIONS \
(gadataset_hive_partitioning_options_get_type())
+GADATASET_AVAILABLE_IN_11_0
G_DECLARE_DERIVABLE_TYPE(GADatasetHivePartitioningOptions,
gadataset_hive_partitioning_options,
GADATASET,
@@ -128,11 +136,12 @@ struct _GADatasetHivePartitioningOptionsClass
GADatasetKeyValuePartitioningOptionsClass parent_class;
};
-GARROW_AVAILABLE_IN_11_0
+GADATASET_AVAILABLE_IN_11_0
GADatasetHivePartitioningOptions *
gadataset_hive_partitioning_options_new(void);
#define GADATASET_TYPE_HIVE_PARTITIONING (gadataset_hive_partitioning_get_type())
+GADATASET_AVAILABLE_IN_11_0
G_DECLARE_DERIVABLE_TYPE(GADatasetHivePartitioning,
gadataset_hive_partitioning,
GADATASET,
@@ -143,13 +152,13 @@ struct _GADatasetHivePartitioningClass
GADatasetKeyValuePartitioningClass parent_class;
};
-GARROW_AVAILABLE_IN_11_0
+GADATASET_AVAILABLE_IN_11_0
GADatasetHivePartitioning *
gadataset_hive_partitioning_new(GArrowSchema *schema,
GList *dictionaries,
GADatasetHivePartitioningOptions *options,
GError **error);
-GARROW_AVAILABLE_IN_11_0
+GADATASET_AVAILABLE_IN_11_0
gchar *
gadataset_hive_partitioning_get_null_fallback(GADatasetHivePartitioning *partitioning);
diff --git a/c_glib/arrow-dataset-glib/scanner.h b/c_glib/arrow-dataset-glib/scanner.h
index 3c7432fb268e4..ad462391568a3 100644
--- a/c_glib/arrow-dataset-glib/scanner.h
+++ b/c_glib/arrow-dataset-glib/scanner.h
@@ -21,21 +21,24 @@
#include
#include
+#include
G_BEGIN_DECLS
#define GADATASET_TYPE_SCANNER (gadataset_scanner_get_type())
+GADATASET_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(GADatasetScanner, gadataset_scanner, GADATASET, SCANNER, GObject)
struct _GADatasetScannerClass
{
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_5_0
+GADATASET_AVAILABLE_IN_5_0
GArrowTable *
gadataset_scanner_to_table(GADatasetScanner *scanner, GError **error);
#define GADATASET_TYPE_SCANNER_BUILDER (gadataset_scanner_builder_get_type())
+GADATASET_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(
GADatasetScannerBuilder, gadataset_scanner_builder, GADATASET, SCANNER_BUILDER, GObject)
struct _GADatasetScannerBuilderClass
@@ -43,20 +46,20 @@ struct _GADatasetScannerBuilderClass
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_5_0
+GADATASET_AVAILABLE_IN_5_0
GADatasetScannerBuilder *
gadataset_scanner_builder_new(GADatasetDataset *dataset, GError **error);
-GARROW_AVAILABLE_IN_6_0
+GADATASET_AVAILABLE_IN_6_0
GADatasetScannerBuilder *
gadataset_scanner_builder_new_record_batch_reader(GArrowRecordBatchReader *reader);
-GARROW_AVAILABLE_IN_6_0
+GADATASET_AVAILABLE_IN_6_0
gboolean
gadataset_scanner_builder_set_filter(GADatasetScannerBuilder *builder,
GArrowExpression *expression,
GError **error);
-GARROW_AVAILABLE_IN_5_0
+GADATASET_AVAILABLE_IN_5_0
GADatasetScanner *
gadataset_scanner_builder_finish(GADatasetScannerBuilder *builder, GError **error);
diff --git a/c_glib/arrow-dataset-glib/version.h.in b/c_glib/arrow-dataset-glib/version.h.in
new file mode 100644
index 0000000000000..7e678bda3a875
--- /dev/null
+++ b/c_glib/arrow-dataset-glib/version.h.in
@@ -0,0 +1,159 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#pragma once
+
+#include
+
+/**
+ * SECTION: version
+ * @section_id: version-macros
+ * @title: Version related macros
+ * @include: arrow-dataset-glib/arrow-dataset-glib.h
+ *
+ * Apache Arrow Dataset GLib provides macros that can be used by C pre-processor.
+ * They are useful to check version related things at compile time.
+ */
+
+/**
+ * GADATASET_VERSION_MAJOR:
+ *
+ * The major version.
+ *
+ * Since: 17.0.0
+ */
+#define GADATASET_VERSION_MAJOR (@VERSION_MAJOR@)
+
+/**
+ * GADATASET_VERSION_MINOR:
+ *
+ * The minor version.
+ *
+ * Since: 17.0.0
+ */
+#define GADATASET_VERSION_MINOR (@VERSION_MINOR@)
+
+/**
+ * GADATASET_VERSION_MICRO:
+ *
+ * The micro version.
+ *
+ * Since: 17.0.0
+ */
+#define GADATASET_VERSION_MICRO (@VERSION_MICRO@)
+
+/**
+ * GADATASET_VERSION_TAG:
+ *
+ * The version tag. Normally, it's an empty string. It's "SNAPSHOT"
+ * for snapshot version.
+ *
+ * Since: 17.0.0
+ */
+#define GADATASET_VERSION_TAG "@VERSION_TAG@"
+
+/**
+ * GADATASET_VERSION_CHECK:
+ * @major: A major version to check for.
+ * @minor: A minor version to check for.
+ * @micro: A micro version to check for.
+ *
+ * You can use this macro in C pre-processor.
+ *
+ * Returns: %TRUE if the compile time Apache Arrow GLib version is the
+ * same as or newer than the passed version, %FALSE otherwise.
+ *
+ * Since: 17.0.0
+ */
+#define GADATASET_VERSION_CHECK(major, minor, micro) \
+ (GADATASET_VERSION_MAJOR > (major) || \
+ (GADATASET_VERSION_MAJOR == (major) && \
+ GADATASET_VERSION_MINOR > (minor)) || \
+ (GADATASET_VERSION_MAJOR == (major) && \
+ GADATASET_VERSION_MINOR == (minor) && \
+ GADATASET_VERSION_MICRO >= (micro)))
+
+/**
+ * GADATASET_DISABLE_DEPRECATION_WARNINGS:
+ *
+ * If this macro is defined, no deprecated warnings are produced.
+ *
+ * You must define this macro before including the
+ * arrow-glib/arrow-glib.h header.
+ *
+ * Since: 17.0.0
+ */
+
+#ifdef GADATASET_DISABLE_DEPRECATION_WARNINGS
+# define GADATASET_DEPRECATED
+# define GADATASET_DEPRECATED_FOR(function)
+# define GADATASET_UNAVAILABLE(major, minor)
+#else
+# define GADATASET_DEPRECATED G_DEPRECATED
+# define GADATASET_DEPRECATED_FOR(function) G_DEPRECATED_FOR(function)
+# define GADATASET_UNAVAILABLE(major, minor) G_UNAVAILABLE(major, minor)
+#endif
+
+@ENCODED_VERSIONS@
+
+/**
+ * GADATASET_VERSION_MIN_REQUIRED:
+ *
+ * You can use this macro for compile time API version check.
+ *
+ * This macro value must be one of the predefined version macros such
+ * as %GADATASET_VERSION_0_10.
+ *
+ * If you use any functions that is defined by newer version than
+ * %GADATASET_VERSION_MIN_REQUIRED, deprecated warnings are produced at
+ * compile time.
+ *
+ * You must define this macro before including the
+ * arrow-dataset-glib/arrow-dataset-glib.h header.
+ *
+ * Since: 17.0.0
+ */
+#ifndef GADATASET_VERSION_MIN_REQUIRED
+# define GADATASET_VERSION_MIN_REQUIRED GARROW_VERSION_MIN_REQUIRED
+#endif
+
+/**
+ * GADATASET_VERSION_MAX_ALLOWED:
+ *
+ * You can use this macro for compile time API version check.
+ *
+ * This macro value must be one of the predefined version macros such
+ * as %GADATASET_VERSION_0_10.
+ *
+ * If you use any functions that is defined by newer version than
+ * %GADATASET_VERSION_MAX_ALLOWED, deprecated warnings are produced at
+ * compile time.
+ *
+ * You must define this macro before including the
+ * arrow-dataset-glib/arrow-dataset-glib.h header.
+ *
+ * Since: 17.0.0
+ */
+#ifndef GADATASET_VERSION_MAX_ALLOWED
+# define GADATASET_VERSION_MAX_ALLOWED GARROW_VERSION_MAX_ALLOWED
+#endif
+
+@VISIBILITY_MACROS@
+
+@AVAILABILITY_MACROS@
diff --git a/c_glib/arrow-flight-glib/arrow-flight-glib.h b/c_glib/arrow-flight-glib/arrow-flight-glib.h
index 6fc8f43d8406e..7e973dd125dd4 100644
--- a/c_glib/arrow-flight-glib/arrow-flight-glib.h
+++ b/c_glib/arrow-flight-glib/arrow-flight-glib.h
@@ -19,6 +19,8 @@
#pragma once
+#include
+
#include
#include
#include
diff --git a/c_glib/arrow-flight-glib/client.h b/c_glib/arrow-flight-glib/client.h
index f67d58371d583..a91bbe55e3c04 100644
--- a/c_glib/arrow-flight-glib/client.h
+++ b/c_glib/arrow-flight-glib/client.h
@@ -24,6 +24,7 @@
G_BEGIN_DECLS
#define GAFLIGHT_TYPE_STREAM_READER (gaflight_stream_reader_get_type())
+GAFLIGHT_AVAILABLE_IN_6_0
G_DECLARE_DERIVABLE_TYPE(GAFlightStreamReader,
gaflight_stream_reader,
GAFLIGHT,
@@ -35,6 +36,7 @@ struct _GAFlightStreamReaderClass
};
#define GAFLIGHT_TYPE_CALL_OPTIONS (gaflight_call_options_get_type())
+GAFLIGHT_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(
GAFlightCallOptions, gaflight_call_options, GAFLIGHT, CALL_OPTIONS, GObject)
struct _GAFlightCallOptionsClass
@@ -42,25 +44,26 @@ struct _GAFlightCallOptionsClass
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_5_0
+GAFLIGHT_AVAILABLE_IN_5_0
GAFlightCallOptions *
gaflight_call_options_new(void);
-GARROW_AVAILABLE_IN_9_0
+GAFLIGHT_AVAILABLE_IN_9_0
void
gaflight_call_options_add_header(GAFlightCallOptions *options,
const gchar *name,
const gchar *value);
-GARROW_AVAILABLE_IN_9_0
+GAFLIGHT_AVAILABLE_IN_9_0
void
gaflight_call_options_clear_headers(GAFlightCallOptions *options);
-GARROW_AVAILABLE_IN_9_0
+GAFLIGHT_AVAILABLE_IN_9_0
void
gaflight_call_options_foreach_header(GAFlightCallOptions *options,
GAFlightHeaderFunc func,
gpointer user_data);
#define GAFLIGHT_TYPE_CLIENT_OPTIONS (gaflight_client_options_get_type())
+GAFLIGHT_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(
GAFlightClientOptions, gaflight_client_options, GAFLIGHT, CLIENT_OPTIONS, GObject)
struct _GAFlightClientOptionsClass
@@ -68,28 +71,29 @@ struct _GAFlightClientOptionsClass
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_5_0
+GAFLIGHT_AVAILABLE_IN_5_0
GAFlightClientOptions *
gaflight_client_options_new(void);
#define GAFLIGHT_TYPE_CLIENT (gaflight_client_get_type())
+GAFLIGHT_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(GAFlightClient, gaflight_client, GAFLIGHT, CLIENT, GObject)
struct _GAFlightClientClass
{
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_5_0
+GAFLIGHT_AVAILABLE_IN_5_0
GAFlightClient *
gaflight_client_new(GAFlightLocation *location,
GAFlightClientOptions *options,
GError **error);
-GARROW_AVAILABLE_IN_8_0
+GAFLIGHT_AVAILABLE_IN_8_0
gboolean
gaflight_client_close(GAFlightClient *client, GError **error);
-GARROW_AVAILABLE_IN_12_0
+GAFLIGHT_AVAILABLE_IN_12_0
gboolean
gaflight_client_authenticate_basic_token(GAFlightClient *client,
const gchar *user,
@@ -99,21 +103,21 @@ gaflight_client_authenticate_basic_token(GAFlightClient *client,
gchar **bearer_value,
GError **error);
-GARROW_AVAILABLE_IN_5_0
+GAFLIGHT_AVAILABLE_IN_5_0
GList *
gaflight_client_list_flights(GAFlightClient *client,
GAFlightCriteria *criteria,
GAFlightCallOptions *options,
GError **error);
-GARROW_AVAILABLE_IN_9_0
+GAFLIGHT_AVAILABLE_IN_9_0
GAFlightInfo *
gaflight_client_get_flight_info(GAFlightClient *client,
GAFlightDescriptor *descriptor,
GAFlightCallOptions *options,
GError **error);
-GARROW_AVAILABLE_IN_6_0
+GAFLIGHT_AVAILABLE_IN_6_0
GAFlightStreamReader *
gaflight_client_do_get(GAFlightClient *client,
GAFlightTicket *ticket,
diff --git a/c_glib/arrow-flight-glib/client.hpp b/c_glib/arrow-flight-glib/client.hpp
index 6d7bdcecf3006..185a28e6dc4bd 100644
--- a/c_glib/arrow-flight-glib/client.hpp
+++ b/c_glib/arrow-flight-glib/client.hpp
@@ -23,17 +23,23 @@
#include
+GAFLIGHT_EXTERN
GAFlightStreamReader *
gaflight_stream_reader_new_raw(arrow::flight::FlightStreamReader *flight_reader,
gboolean is_owner);
+GAFLIGHT_EXTERN
arrow::flight::FlightCallOptions *
gaflight_call_options_get_raw(GAFlightCallOptions *options);
+GAFLIGHT_EXTERN
arrow::flight::FlightClientOptions *
gaflight_client_options_get_raw(GAFlightClientOptions *options);
+GAFLIGHT_EXTERN
std::shared_ptr
gaflight_client_get_raw(GAFlightClient *client);
+
+GAFLIGHT_EXTERN
GAFlightClient *
gaflight_client_new_raw(std::shared_ptr *flight_client);
diff --git a/c_glib/arrow-flight-glib/common.h b/c_glib/arrow-flight-glib/common.h
index fcb23b1885ea7..b1d89f79c357e 100644
--- a/c_glib/arrow-flight-glib/common.h
+++ b/c_glib/arrow-flight-glib/common.h
@@ -21,6 +21,8 @@
#include
+#include
+
G_BEGIN_DECLS
typedef void (*GAFlightHeaderFunc)(const gchar *name,
@@ -28,40 +30,43 @@ typedef void (*GAFlightHeaderFunc)(const gchar *name,
gpointer user_data);
#define GAFLIGHT_TYPE_CRITERIA (gaflight_criteria_get_type())
+GAFLIGHT_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(GAFlightCriteria, gaflight_criteria, GAFLIGHT, CRITERIA, GObject)
struct _GAFlightCriteriaClass
{
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_5_0
+GAFLIGHT_AVAILABLE_IN_5_0
GAFlightCriteria *
gaflight_criteria_new(GBytes *expression);
#define GAFLIGHT_TYPE_LOCATION (gaflight_location_get_type())
+GAFLIGHT_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(GAFlightLocation, gaflight_location, GAFLIGHT, LOCATION, GObject)
struct _GAFlightLocationClass
{
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_5_0
+GAFLIGHT_AVAILABLE_IN_5_0
GAFlightLocation *
gaflight_location_new(const gchar *uri, GError **error);
-GARROW_AVAILABLE_IN_5_0
+GAFLIGHT_AVAILABLE_IN_5_0
gchar *
gaflight_location_to_string(GAFlightLocation *location);
-GARROW_AVAILABLE_IN_5_0
+GAFLIGHT_AVAILABLE_IN_5_0
gchar *
gaflight_location_get_scheme(GAFlightLocation *location);
-GARROW_AVAILABLE_IN_5_0
+GAFLIGHT_AVAILABLE_IN_5_0
gboolean
gaflight_location_equal(GAFlightLocation *location, GAFlightLocation *other_location);
#define GAFLIGHT_TYPE_DESCRIPTOR (gaflight_descriptor_get_type())
+GAFLIGHT_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(
GAFlightDescriptor, gaflight_descriptor, GAFLIGHT, DESCRIPTOR, GObject)
struct _GAFlightDescriptorClass
@@ -69,16 +74,17 @@ struct _GAFlightDescriptorClass
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_5_0
+GAFLIGHT_AVAILABLE_IN_5_0
gchar *
gaflight_descriptor_to_string(GAFlightDescriptor *descriptor);
-GARROW_AVAILABLE_IN_5_0
+GAFLIGHT_AVAILABLE_IN_5_0
gboolean
gaflight_descriptor_equal(GAFlightDescriptor *descriptor,
GAFlightDescriptor *other_descriptor);
#define GAFLIGHT_TYPE_PATH_DESCRIPTOR (gaflight_path_descriptor_get_type())
+GAFLIGHT_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(GAFlightPathDescriptor,
gaflight_path_descriptor,
GAFLIGHT,
@@ -89,15 +95,16 @@ struct _GAFlightPathDescriptorClass
GAFlightDescriptorClass parent_class;
};
-GARROW_AVAILABLE_IN_5_0
+GAFLIGHT_AVAILABLE_IN_5_0
GAFlightPathDescriptor *
gaflight_path_descriptor_new(const gchar **paths, gsize n_paths);
-GARROW_AVAILABLE_IN_5_0
+GAFLIGHT_AVAILABLE_IN_5_0
gchar **
gaflight_path_descriptor_get_paths(GAFlightPathDescriptor *descriptor);
#define GAFLIGHT_TYPE_COMMAND_DESCRIPTOR (gaflight_command_descriptor_get_type())
+GAFLIGHT_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(GAFlightCommandDescriptor,
gaflight_command_descriptor,
GAFLIGHT,
@@ -108,56 +115,59 @@ struct _GAFlightCommandDescriptorClass
GAFlightDescriptorClass parent_class;
};
-GARROW_AVAILABLE_IN_5_0
+GAFLIGHT_AVAILABLE_IN_5_0
GAFlightCommandDescriptor *
gaflight_command_descriptor_new(const gchar *command);
-GARROW_AVAILABLE_IN_5_0
+GAFLIGHT_AVAILABLE_IN_5_0
gchar *
gaflight_command_descriptor_get_command(GAFlightCommandDescriptor *descriptor);
#define GAFLIGHT_TYPE_TICKET (gaflight_ticket_get_type())
+GAFLIGHT_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(GAFlightTicket, gaflight_ticket, GAFLIGHT, TICKET, GObject)
struct _GAFlightTicketClass
{
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_5_0
+GAFLIGHT_AVAILABLE_IN_5_0
GAFlightTicket *
gaflight_ticket_new(GBytes *data);
-GARROW_AVAILABLE_IN_5_0
+GAFLIGHT_AVAILABLE_IN_5_0
gboolean
gaflight_ticket_equal(GAFlightTicket *ticket, GAFlightTicket *other_ticket);
#define GAFLIGHT_TYPE_ENDPOINT (gaflight_endpoint_get_type())
+GAFLIGHT_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(GAFlightEndpoint, gaflight_endpoint, GAFLIGHT, ENDPOINT, GObject)
struct _GAFlightEndpointClass
{
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_5_0
+GAFLIGHT_AVAILABLE_IN_5_0
GAFlightEndpoint *
gaflight_endpoint_new(GAFlightTicket *ticket, GList *locations);
-GARROW_AVAILABLE_IN_5_0
+GAFLIGHT_AVAILABLE_IN_5_0
gboolean
gaflight_endpoint_equal(GAFlightEndpoint *endpoint, GAFlightEndpoint *other_endpoint);
-GARROW_AVAILABLE_IN_5_0
+GAFLIGHT_AVAILABLE_IN_5_0
GList *
gaflight_endpoint_get_locations(GAFlightEndpoint *endpoint);
#define GAFLIGHT_TYPE_INFO (gaflight_info_get_type())
+GAFLIGHT_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(GAFlightInfo, gaflight_info, GAFLIGHT, INFO, GObject)
struct _GAFlightInfoClass
{
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_5_0
+GAFLIGHT_AVAILABLE_IN_5_0
GAFlightInfo *
gaflight_info_new(GArrowSchema *schema,
GAFlightDescriptor *descriptor,
@@ -166,27 +176,28 @@ gaflight_info_new(GArrowSchema *schema,
gint64 total_bytes,
GError **error);
-GARROW_AVAILABLE_IN_5_0
+GAFLIGHT_AVAILABLE_IN_5_0
gboolean
gaflight_info_equal(GAFlightInfo *info, GAFlightInfo *other_info);
-GARROW_AVAILABLE_IN_5_0
+GAFLIGHT_AVAILABLE_IN_5_0
GArrowSchema *
gaflight_info_get_schema(GAFlightInfo *info, GArrowReadOptions *options, GError **error);
-GARROW_AVAILABLE_IN_5_0
+GAFLIGHT_AVAILABLE_IN_5_0
GAFlightDescriptor *
gaflight_info_get_descriptor(GAFlightInfo *info);
-GARROW_AVAILABLE_IN_5_0
+GAFLIGHT_AVAILABLE_IN_5_0
GList *
gaflight_info_get_endpoints(GAFlightInfo *info);
-GARROW_AVAILABLE_IN_5_0
+GAFLIGHT_AVAILABLE_IN_5_0
gint64
gaflight_info_get_total_records(GAFlightInfo *info);
-GARROW_AVAILABLE_IN_5_0
+GAFLIGHT_AVAILABLE_IN_5_0
gint64
gaflight_info_get_total_bytes(GAFlightInfo *info);
#define GAFLIGHT_TYPE_STREAM_CHUNK (gaflight_stream_chunk_get_type())
+GAFLIGHT_AVAILABLE_IN_6_0
G_DECLARE_DERIVABLE_TYPE(
GAFlightStreamChunk, gaflight_stream_chunk, GAFLIGHT, STREAM_CHUNK, GObject)
struct _GAFlightStreamChunkClass
@@ -194,14 +205,15 @@ struct _GAFlightStreamChunkClass
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_6_0
+GAFLIGHT_AVAILABLE_IN_6_0
GArrowRecordBatch *
gaflight_stream_chunk_get_data(GAFlightStreamChunk *chunk);
-GARROW_AVAILABLE_IN_6_0
+GAFLIGHT_AVAILABLE_IN_6_0
GArrowBuffer *
gaflight_stream_chunk_get_metadata(GAFlightStreamChunk *chunk);
#define GAFLIGHT_TYPE_RECORD_BATCH_READER (gaflight_record_batch_reader_get_type())
+GAFLIGHT_AVAILABLE_IN_6_0
G_DECLARE_DERIVABLE_TYPE(GAFlightRecordBatchReader,
gaflight_record_batch_reader,
GAFLIGHT,
@@ -212,11 +224,11 @@ struct _GAFlightRecordBatchReaderClass
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_6_0
+GAFLIGHT_AVAILABLE_IN_6_0
GAFlightStreamChunk *
gaflight_record_batch_reader_read_next(GAFlightRecordBatchReader *reader, GError **error);
-GARROW_AVAILABLE_IN_6_0
+GAFLIGHT_AVAILABLE_IN_6_0
GArrowTable *
gaflight_record_batch_reader_read_all(GAFlightRecordBatchReader *reader, GError **error);
diff --git a/c_glib/arrow-flight-glib/common.hpp b/c_glib/arrow-flight-glib/common.hpp
index b748d6f382184..db56fff579baf 100644
--- a/c_glib/arrow-flight-glib/common.hpp
+++ b/c_glib/arrow-flight-glib/common.hpp
@@ -23,39 +23,59 @@
#include
+GAFLIGHT_EXTERN
GAFlightCriteria *
gaflight_criteria_new_raw(const arrow::flight::Criteria *flight_criteria);
+
+GAFLIGHT_EXTERN
arrow::flight::Criteria *
gaflight_criteria_get_raw(GAFlightCriteria *criteria);
+GAFLIGHT_EXTERN
arrow::flight::Location *
gaflight_location_get_raw(GAFlightLocation *location);
+GAFLIGHT_EXTERN
GAFlightDescriptor *
gaflight_descriptor_new_raw(const arrow::flight::FlightDescriptor *flight_descriptor);
+
+GAFLIGHT_EXTERN
arrow::flight::FlightDescriptor *
gaflight_descriptor_get_raw(GAFlightDescriptor *descriptor);
+GAFLIGHT_EXTERN
GAFlightTicket *
gaflight_ticket_new_raw(const arrow::flight::Ticket *flight_ticket);
+
+GAFLIGHT_EXTERN
arrow::flight::Ticket *
gaflight_ticket_get_raw(GAFlightTicket *ticket);
+GAFLIGHT_EXTERN
GAFlightEndpoint *
gaflight_endpoint_new_raw(const arrow::flight::FlightEndpoint *flight_endpoint,
GAFlightTicket *ticket);
+
+GAFLIGHT_EXTERN
arrow::flight::FlightEndpoint *
gaflight_endpoint_get_raw(GAFlightEndpoint *endpoint);
+GAFLIGHT_EXTERN
GAFlightInfo *
gaflight_info_new_raw(arrow::flight::FlightInfo *flight_info);
+
+GAFLIGHT_EXTERN
arrow::flight::FlightInfo *
gaflight_info_get_raw(GAFlightInfo *info);
+GAFLIGHT_EXTERN
GAFlightStreamChunk *
gaflight_stream_chunk_new_raw(arrow::flight::FlightStreamChunk *flight_chunk);
+
+GAFLIGHT_EXTERN
arrow::flight::FlightStreamChunk *
gaflight_stream_chunk_get_raw(GAFlightStreamChunk *chunk);
+GAFLIGHT_EXTERN
arrow::flight::MetadataRecordBatchReader *
gaflight_record_batch_reader_get_raw(GAFlightRecordBatchReader *reader);
diff --git a/c_glib/arrow-flight-glib/meson.build b/c_glib/arrow-flight-glib/meson.build
index 70db7400b124a..c1422e0d10a7d 100644
--- a/c_glib/arrow-flight-glib/meson.build
+++ b/c_glib/arrow-flight-glib/meson.build
@@ -37,6 +37,14 @@ cpp_headers = files(
'server.hpp',
)
+version_h = configure_file(
+ input: 'version.h.in',
+ output: 'version.h',
+ command: [python3, generate_version_header_py, '--library', 'GAFLIGHT', '--version', version, '--input', '@INPUT@', '--output', '@OUTPUT@'],
+)
+
+c_headers += version_h
+
headers = c_headers + cpp_headers
install_headers(headers, subdir: 'arrow-flight-glib')
@@ -50,6 +58,7 @@ libarrow_flight_glib = library('arrow-flight-glib',
dependencies: dependencies,
implicit_include_directories: false,
include_directories: base_include_directories,
+ cpp_args: ['-DGAFLIGHT_COMPILATION'],
soversion: so_version,
version: library_version)
arrow_flight_glib = declare_dependency(link_with: libarrow_flight_glib,
diff --git a/c_glib/arrow-flight-glib/server.h b/c_glib/arrow-flight-glib/server.h
index 89f5a0a596e9e..7e594febb172f 100644
--- a/c_glib/arrow-flight-glib/server.h
+++ b/c_glib/arrow-flight-glib/server.h
@@ -24,6 +24,7 @@
G_BEGIN_DECLS
#define GAFLIGHT_TYPE_DATA_STREAM (gaflight_data_stream_get_type())
+GAFLIGHT_AVAILABLE_IN_6_0
G_DECLARE_DERIVABLE_TYPE(
GAFlightDataStream, gaflight_data_stream, GAFLIGHT, DATA_STREAM, GObject)
struct _GAFlightDataStreamClass
@@ -32,6 +33,7 @@ struct _GAFlightDataStreamClass
};
#define GAFLIGHT_TYPE_RECORD_BATCH_STREAM (gaflight_record_batch_stream_get_type())
+GAFLIGHT_AVAILABLE_IN_6_0
G_DECLARE_DERIVABLE_TYPE(GAFlightRecordBatchStream,
gaflight_record_batch_stream,
GAFLIGHT,
@@ -42,12 +44,13 @@ struct _GAFlightRecordBatchStreamClass
GAFlightDataStreamClass parent_class;
};
-GARROW_AVAILABLE_IN_6_0
+GAFLIGHT_AVAILABLE_IN_6_0
GAFlightRecordBatchStream *
gaflight_record_batch_stream_new(GArrowRecordBatchReader *reader,
GArrowWriteOptions *options);
#define GAFLIGHT_TYPE_MESSAGE_READER (gaflight_message_reader_get_type())
+GAFLIGHT_AVAILABLE_IN_14_0
G_DECLARE_DERIVABLE_TYPE(GAFlightMessageReader,
gaflight_message_reader,
GAFLIGHT,
@@ -58,11 +61,12 @@ struct _GAFlightMessageReaderClass
GAFlightRecordBatchReaderClass parent_class;
};
-GARROW_AVAILABLE_IN_14_0
+GAFLIGHT_AVAILABLE_IN_14_0
GAFlightDescriptor *
gaflight_message_reader_get_descriptor(GAFlightMessageReader *reader);
#define GAFLIGHT_TYPE_SERVER_CALL_CONTEXT (gaflight_server_call_context_get_type())
+GAFLIGHT_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(GAFlightServerCallContext,
gaflight_server_call_context,
GAFLIGHT,
@@ -73,13 +77,14 @@ struct _GAFlightServerCallContextClass
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_14_0
+GAFLIGHT_AVAILABLE_IN_14_0
void
gaflight_server_call_context_foreach_incoming_header(GAFlightServerCallContext *context,
GAFlightHeaderFunc func,
gpointer user_data);
#define GAFLIGHT_TYPE_SERVER_AUTH_SENDER (gaflight_server_auth_sender_get_type())
+GAFLIGHT_AVAILABLE_IN_12_0
G_DECLARE_DERIVABLE_TYPE(GAFlightServerAuthSender,
gaflight_server_auth_sender,
GAFLIGHT,
@@ -90,13 +95,14 @@ struct _GAFlightServerAuthSenderClass
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_12_0
+GAFLIGHT_AVAILABLE_IN_12_0
gboolean
gaflight_server_auth_sender_write(GAFlightServerAuthSender *sender,
GBytes *message,
GError **error);
#define GAFLIGHT_TYPE_SERVER_AUTH_READER (gaflight_server_auth_reader_get_type())
+GAFLIGHT_AVAILABLE_IN_12_0
G_DECLARE_DERIVABLE_TYPE(GAFlightServerAuthReader,
gaflight_server_auth_reader,
GAFLIGHT,
@@ -107,11 +113,12 @@ struct _GAFlightServerAuthReaderClass
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_12_0
+GAFLIGHT_AVAILABLE_IN_12_0
GBytes *
gaflight_server_auth_reader_read(GAFlightServerAuthReader *reader, GError **error);
#define GAFLIGHT_TYPE_SERVER_AUTH_HANDLER (gaflight_server_auth_handler_get_type())
+GAFLIGHT_AVAILABLE_IN_12_0
G_DECLARE_DERIVABLE_TYPE(GAFlightServerAuthHandler,
gaflight_server_auth_handler,
GAFLIGHT,
@@ -124,6 +131,7 @@ struct _GAFlightServerAuthHandlerClass
#define GAFLIGHT_TYPE_SERVER_CUSTOM_AUTH_HANDLER \
(gaflight_server_custom_auth_handler_get_type())
+GAFLIGHT_AVAILABLE_IN_12_0
G_DECLARE_DERIVABLE_TYPE(GAFlightServerCustomAuthHandler,
gaflight_server_custom_auth_handler,
GAFLIGHT,
@@ -152,7 +160,7 @@ struct _GAFlightServerCustomAuthHandlerClass
GError **error);
};
-GARROW_AVAILABLE_IN_12_0
+GAFLIGHT_AVAILABLE_IN_12_0
void
gaflight_server_custom_auth_handler_authenticate(GAFlightServerCustomAuthHandler *handler,
GAFlightServerCallContext *context,
@@ -160,7 +168,7 @@ gaflight_server_custom_auth_handler_authenticate(GAFlightServerCustomAuthHandler
GAFlightServerAuthReader *reader,
GError **error);
-GARROW_AVAILABLE_IN_12_0
+GAFLIGHT_AVAILABLE_IN_12_0
GBytes *
gaflight_server_custom_auth_handler_is_valid(GAFlightServerCustomAuthHandler *handler,
GAFlightServerCallContext *context,
@@ -168,6 +176,7 @@ gaflight_server_custom_auth_handler_is_valid(GAFlightServerCustomAuthHandler *ha
GError **error);
#define GAFLIGHT_TYPE_SERVER_OPTIONS (gaflight_server_options_get_type())
+GAFLIGHT_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(
GAFlightServerOptions, gaflight_server_options, GAFLIGHT, SERVER_OPTIONS, GObject)
struct _GAFlightServerOptionsClass
@@ -175,14 +184,16 @@ struct _GAFlightServerOptionsClass
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_5_0
+GAFLIGHT_AVAILABLE_IN_5_0
GAFlightServerOptions *
gaflight_server_options_new(GAFlightLocation *location);
#define GAFLIGHT_TYPE_SERVABLE (gaflight_servable_get_type())
+GAFLIGHT_AVAILABLE_IN_9_0
G_DECLARE_INTERFACE(GAFlightServable, gaflight_servable, GAFLIGHT, SERVABLE, GObject)
#define GAFLIGHT_TYPE_SERVER (gaflight_server_get_type())
+GAFLIGHT_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(GAFlightServer, gaflight_server, GAFLIGHT, SERVER, GObject)
/**
* GAFlightServerClass:
@@ -209,34 +220,34 @@ struct _GAFlightServerClass
GError **error);
};
-GARROW_AVAILABLE_IN_5_0
+GAFLIGHT_AVAILABLE_IN_5_0
gboolean
gaflight_server_listen(GAFlightServer *server,
GAFlightServerOptions *options,
GError **error);
-GARROW_AVAILABLE_IN_5_0
+GAFLIGHT_AVAILABLE_IN_5_0
gint
gaflight_server_get_port(GAFlightServer *server);
-GARROW_AVAILABLE_IN_5_0
+GAFLIGHT_AVAILABLE_IN_5_0
gboolean
gaflight_server_shutdown(GAFlightServer *server, GError **error);
-GARROW_AVAILABLE_IN_5_0
+GAFLIGHT_AVAILABLE_IN_5_0
gboolean
gaflight_server_wait(GAFlightServer *server, GError **error);
-GARROW_AVAILABLE_IN_5_0
+GAFLIGHT_AVAILABLE_IN_5_0
GList *
gaflight_server_list_flights(GAFlightServer *server,
GAFlightServerCallContext *context,
GAFlightCriteria *criteria,
GError **error);
-GARROW_AVAILABLE_IN_9_0
+GAFLIGHT_AVAILABLE_IN_9_0
GAFlightInfo *
gaflight_server_get_flight_info(GAFlightServer *server,
GAFlightServerCallContext *context,
GAFlightDescriptor *request,
GError **error);
-GARROW_AVAILABLE_IN_6_0
+GAFLIGHT_AVAILABLE_IN_6_0
GAFlightDataStream *
gaflight_server_do_get(GAFlightServer *server,
GAFlightServerCallContext *context,
diff --git a/c_glib/arrow-flight-glib/server.hpp b/c_glib/arrow-flight-glib/server.hpp
index 70da867d5b0e9..ec4815751c8d8 100644
--- a/c_glib/arrow-flight-glib/server.hpp
+++ b/c_glib/arrow-flight-glib/server.hpp
@@ -23,34 +23,49 @@
#include
+GAFLIGHT_EXTERN
arrow::flight::FlightDataStream *
gaflight_data_stream_get_raw(GAFlightDataStream *stream);
+GAFLIGHT_EXTERN
GAFlightMessageReader *
gaflight_message_reader_new_raw(arrow::flight::FlightMessageReader *flight_reader,
gboolean is_owner);
+
+GAFLIGHT_EXTERN
arrow::flight::FlightMessageReader *
gaflight_message_reader_get_raw(GAFlightMessageReader *reader);
+GAFLIGHT_EXTERN
GAFlightServerCallContext *
gaflight_server_call_context_new_raw(
const arrow::flight::ServerCallContext *flight_call_context);
+
+GAFLIGHT_EXTERN
const arrow::flight::ServerCallContext *
gaflight_server_call_context_get_raw(GAFlightServerCallContext *call_context);
+GAFLIGHT_EXTERN
GAFlightServerAuthSender *
gaflight_server_auth_sender_new_raw(arrow::flight::ServerAuthSender *flight_sender);
+
+GAFLIGHT_EXTERN
arrow::flight::ServerAuthSender *
gaflight_server_auth_sender_get_raw(GAFlightServerAuthSender *sender);
+GAFLIGHT_EXTERN
GAFlightServerAuthReader *
gaflight_server_auth_reader_new_raw(arrow::flight::ServerAuthReader *flight_reader);
+
+GAFLIGHT_EXTERN
arrow::flight::ServerAuthReader *
gaflight_server_auth_reader_get_raw(GAFlightServerAuthReader *reader);
+GAFLIGHT_EXTERN
std::shared_ptr
gaflight_server_auth_handler_get_raw(GAFlightServerAuthHandler *handler);
+GAFLIGHT_EXTERN
arrow::flight::FlightServerOptions *
gaflight_server_options_get_raw(GAFlightServerOptions *options);
@@ -61,6 +76,7 @@ struct _GAFlightServableInterface
arrow::flight::FlightServerBase *(*get_raw)(GAFlightServable *servable);
};
+GAFLIGHT_EXTERN
arrow::flight::FlightServerBase *
gaflight_servable_get_raw(GAFlightServable *servable);
diff --git a/c_glib/arrow-flight-glib/version.h.in b/c_glib/arrow-flight-glib/version.h.in
new file mode 100644
index 0000000000000..4a42c7f5aa91e
--- /dev/null
+++ b/c_glib/arrow-flight-glib/version.h.in
@@ -0,0 +1,159 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#pragma once
+
+#include
+
+/**
+ * SECTION: version
+ * @section_id: version-macros
+ * @title: Version related macros
+ * @include: arrow-flight-glib/arrow-flight-glib.h
+ *
+ * Apache Arrow Flight GLib provides macros that can be used by C pre-processor.
+ * They are useful to check version related things at compile time.
+ */
+
+/**
+ * GAFLIGHT_VERSION_MAJOR:
+ *
+ * The major version.
+ *
+ * Since: 17.0.0
+ */
+#define GAFLIGHT_VERSION_MAJOR (@VERSION_MAJOR@)
+
+/**
+ * GAFLIGHT_VERSION_MINOR:
+ *
+ * The minor version.
+ *
+ * Since: 17.0.0
+ */
+#define GAFLIGHT_VERSION_MINOR (@VERSION_MINOR@)
+
+/**
+ * GAFLIGHT_VERSION_MICRO:
+ *
+ * The micro version.
+ *
+ * Since: 17.0.0
+ */
+#define GAFLIGHT_VERSION_MICRO (@VERSION_MICRO@)
+
+/**
+ * GAFLIGHT_VERSION_TAG:
+ *
+ * The version tag. Normally, it's an empty string. It's "SNAPSHOT"
+ * for snapshot version.
+ *
+ * Since: 17.0.0
+ */
+#define GAFLIGHT_VERSION_TAG "@VERSION_TAG@"
+
+/**
+ * GAFLIGHT_VERSION_CHECK:
+ * @major: A major version to check for.
+ * @minor: A minor version to check for.
+ * @micro: A micro version to check for.
+ *
+ * You can use this macro in C pre-processor.
+ *
+ * Returns: %TRUE if the compile time Apache Arrow GLib version is the
+ * same as or newer than the passed version, %FALSE otherwise.
+ *
+ * Since: 17.0.0
+ */
+#define GAFLIGHT_VERSION_CHECK(major, minor, micro) \
+ (GAFLIGHT_VERSION_MAJOR > (major) || \
+ (GAFLIGHT_VERSION_MAJOR == (major) && \
+ GAFLIGHT_VERSION_MINOR > (minor)) || \
+ (GAFLIGHT_VERSION_MAJOR == (major) && \
+ GAFLIGHT_VERSION_MINOR == (minor) && \
+ GAFLIGHT_VERSION_MICRO >= (micro)))
+
+/**
+ * GAFLIGHT_DISABLE_DEPRECATION_WARNINGS:
+ *
+ * If this macro is defined, no deprecated warnings are produced.
+ *
+ * You must define this macro before including the
+ * arrow-glib/arrow-glib.h header.
+ *
+ * Since: 17.0.0
+ */
+
+#ifdef GAFLIGHT_DISABLE_DEPRECATION_WARNINGS
+# define GAFLIGHT_DEPRECATED
+# define GAFLIGHT_DEPRECATED_FOR(function)
+# define GAFLIGHT_UNAVAILABLE(major, minor)
+#else
+# define GAFLIGHT_DEPRECATED G_DEPRECATED
+# define GAFLIGHT_DEPRECATED_FOR(function) G_DEPRECATED_FOR(function)
+# define GAFLIGHT_UNAVAILABLE(major, minor) G_UNAVAILABLE(major, minor)
+#endif
+
+@ENCODED_VERSIONS@
+
+/**
+ * GAFLIGHT_VERSION_MIN_REQUIRED:
+ *
+ * You can use this macro for compile time API version check.
+ *
+ * This macro value must be one of the predefined version macros such
+ * as %GAFLIGHT_VERSION_0_10.
+ *
+ * If you use any functions that is defined by newer version than
+ * %GAFLIGHT_VERSION_MIN_REQUIRED, deprecated warnings are produced at
+ * compile time.
+ *
+ * You must define this macro before including the
+ * arrow-flight-glib/arrow-flight-glib.h header.
+ *
+ * Since: 17.0.0
+ */
+#ifndef GAFLIGHT_VERSION_MIN_REQUIRED
+# define GAFLIGHT_VERSION_MIN_REQUIRED GARROW_VERSION_MIN_REQUIRED
+#endif
+
+/**
+ * GAFLIGHT_VERSION_MAX_ALLOWED:
+ *
+ * You can use this macro for compile time API version check.
+ *
+ * This macro value must be one of the predefined version macros such
+ * as %GAFLIGHT_VERSION_0_10.
+ *
+ * If you use any functions that is defined by newer version than
+ * %GAFLIGHT_VERSION_MAX_ALLOWED, deprecated warnings are produced at
+ * compile time.
+ *
+ * You must define this macro before including the
+ * arrow-flight-glib/arrow-flight-glib.h header.
+ *
+ * Since: 17.0.0
+ */
+#ifndef GAFLIGHT_VERSION_MAX_ALLOWED
+# define GAFLIGHT_VERSION_MAX_ALLOWED GARROW_VERSION_MAX_ALLOWED
+#endif
+
+@VISIBILITY_MACROS@
+
+@AVAILABILITY_MACROS@
diff --git a/c_glib/arrow-flight-sql-glib/arrow-flight-sql-glib.h b/c_glib/arrow-flight-sql-glib/arrow-flight-sql-glib.h
index 8ebe39aee57a8..94e72d06f2b47 100644
--- a/c_glib/arrow-flight-sql-glib/arrow-flight-sql-glib.h
+++ b/c_glib/arrow-flight-sql-glib/arrow-flight-sql-glib.h
@@ -19,5 +19,7 @@
#pragma once
+#include
+
#include
#include
diff --git a/c_glib/arrow-flight-sql-glib/client.h b/c_glib/arrow-flight-sql-glib/client.h
index 9a5a8987f7195..b9e9baf41a59f 100644
--- a/c_glib/arrow-flight-sql-glib/client.h
+++ b/c_glib/arrow-flight-sql-glib/client.h
@@ -21,9 +21,12 @@
#include
+#include
+
G_BEGIN_DECLS
#define GAFLIGHTSQL_TYPE_PREPARED_STATEMENT (gaflightsql_prepared_statement_get_type())
+GAFLIGHTSQL_AVAILABLE_IN_14_0
G_DECLARE_DERIVABLE_TYPE(GAFlightSQLPreparedStatement,
gaflightsql_prepared_statement,
GAFLIGHTSQL,
@@ -34,52 +37,53 @@ struct _GAFlightSQLPreparedStatementClass
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_14_0
+GAFLIGHTSQL_AVAILABLE_IN_14_0
GAFlightInfo *
gaflightsql_prepared_statement_execute(GAFlightSQLPreparedStatement *statement,
GAFlightCallOptions *options,
GError **error);
-GARROW_AVAILABLE_IN_14_0
+GAFLIGHTSQL_AVAILABLE_IN_14_0
gint64
gaflightsql_prepared_statement_execute_update(GAFlightSQLPreparedStatement *statement,
GAFlightCallOptions *options,
GError **error);
-GARROW_AVAILABLE_IN_14_0
+GAFLIGHTSQL_AVAILABLE_IN_14_0
GArrowSchema *
gaflightsql_prepared_statement_get_parameter_schema(
GAFlightSQLPreparedStatement *statement);
-GARROW_AVAILABLE_IN_14_0
+GAFLIGHTSQL_AVAILABLE_IN_14_0
GArrowSchema *
gaflightsql_prepared_statement_get_dataset_schema(
GAFlightSQLPreparedStatement *statement);
-GARROW_AVAILABLE_IN_14_0
+GAFLIGHTSQL_AVAILABLE_IN_14_0
gboolean
gaflightsql_prepared_statement_set_record_batch(GAFlightSQLPreparedStatement *statement,
GArrowRecordBatch *record_batch,
GError **error);
-GARROW_AVAILABLE_IN_14_0
+GAFLIGHTSQL_AVAILABLE_IN_14_0
gboolean
gaflightsql_prepared_statement_set_record_batch_reader(
GAFlightSQLPreparedStatement *statement,
GArrowRecordBatchReader *reader,
GError **error);
-GARROW_AVAILABLE_IN_14_0
+GAFLIGHTSQL_AVAILABLE_IN_14_0
gboolean
gaflightsql_prepared_statement_close(GAFlightSQLPreparedStatement *statement,
GAFlightCallOptions *options,
GError **error);
-GARROW_AVAILABLE_IN_14_0
+GAFLIGHTSQL_AVAILABLE_IN_14_0
gboolean
gaflightsql_prepared_statement_is_closed(GAFlightSQLPreparedStatement *statement);
#define GAFLIGHTSQL_TYPE_CLIENT (gaflightsql_client_get_type())
+GAFLIGHTSQL_AVAILABLE_IN_9_0
G_DECLARE_DERIVABLE_TYPE(
GAFlightSQLClient, gaflightsql_client, GAFLIGHTSQL, CLIENT, GObject)
struct _GAFlightSQLClientClass
@@ -87,32 +91,32 @@ struct _GAFlightSQLClientClass
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_9_0
+GAFLIGHTSQL_AVAILABLE_IN_9_0
GAFlightSQLClient *
gaflightsql_client_new(GAFlightClient *client);
-GARROW_AVAILABLE_IN_9_0
+GAFLIGHTSQL_AVAILABLE_IN_9_0
GAFlightInfo *
gaflightsql_client_execute(GAFlightSQLClient *client,
const gchar *query,
GAFlightCallOptions *options,
GError **error);
-GARROW_AVAILABLE_IN_13_0
+GAFLIGHTSQL_AVAILABLE_IN_13_0
gint64
gaflightsql_client_execute_update(GAFlightSQLClient *client,
const gchar *query,
GAFlightCallOptions *options,
GError **error);
-GARROW_AVAILABLE_IN_9_0
+GAFLIGHTSQL_AVAILABLE_IN_9_0
GAFlightStreamReader *
gaflightsql_client_do_get(GAFlightSQLClient *client,
GAFlightTicket *ticket,
GAFlightCallOptions *options,
GError **error);
-GARROW_AVAILABLE_IN_14_0
+GAFLIGHTSQL_AVAILABLE_IN_14_0
GAFlightSQLPreparedStatement *
gaflightsql_client_prepare(GAFlightSQLClient *client,
const gchar *query,
diff --git a/c_glib/arrow-flight-sql-glib/meson.build b/c_glib/arrow-flight-sql-glib/meson.build
index e7abc605bb819..d588ba4917c76 100644
--- a/c_glib/arrow-flight-sql-glib/meson.build
+++ b/c_glib/arrow-flight-sql-glib/meson.build
@@ -34,6 +34,14 @@ cpp_headers = files(
'server.hpp',
)
+version_h = configure_file(
+ input: 'version.h.in',
+ output: 'version.h',
+ command: [python3, generate_version_header_py, '--library', 'GAFLIGHTSQL', '--version', version, '--input', '@INPUT@', '--output', '@OUTPUT@'],
+)
+
+c_headers += version_h
+
headers = c_headers + cpp_headers
install_headers(headers, subdir: 'arrow-flight-sql-glib')
@@ -47,6 +55,7 @@ libarrow_flight_sql_glib = library('arrow-flight-sql-glib',
dependencies: dependencies,
implicit_include_directories: false,
include_directories: base_include_directories,
+ cpp_args: ['-DGAFLIGHTSQL_COMPILATION'],
soversion: so_version,
version: library_version)
arrow_flight_sql_glib = \
diff --git a/c_glib/arrow-flight-sql-glib/server.h b/c_glib/arrow-flight-sql-glib/server.h
index d6fd7e4d10394..8cf0aace77644 100644
--- a/c_glib/arrow-flight-sql-glib/server.h
+++ b/c_glib/arrow-flight-sql-glib/server.h
@@ -21,9 +21,12 @@
#include
+#include
+
G_BEGIN_DECLS
#define GAFLIGHTSQL_TYPE_COMMAND (gaflightsql_command_get_type())
+GAFLIGHTSQL_AVAILABLE_IN_9_0
G_DECLARE_DERIVABLE_TYPE(
GAFlightSQLCommand, gaflightsql_command, GAFLIGHTSQL, COMMAND, GObject)
struct _GAFlightSQLCommandClass
@@ -32,6 +35,7 @@ struct _GAFlightSQLCommandClass
};
#define GAFLIGHTSQL_TYPE_STATEMENT_QUERY (gaflightsql_statement_query_get_type())
+GAFLIGHTSQL_AVAILABLE_IN_9_0
G_DECLARE_DERIVABLE_TYPE(GAFlightSQLStatementQuery,
gaflightsql_statement_query,
GAFLIGHTSQL,
@@ -42,11 +46,12 @@ struct _GAFlightSQLStatementQueryClass
GAFlightSQLCommandClass parent_class;
};
-GARROW_AVAILABLE_IN_9_0
+GAFLIGHTSQL_AVAILABLE_IN_9_0
const gchar *
gaflightsql_statement_query_get_query(GAFlightSQLStatementQuery *command);
#define GAFLIGHTSQL_TYPE_STATEMENT_UPDATE (gaflightsql_statement_update_get_type())
+GAFLIGHTSQL_AVAILABLE_IN_13_0
G_DECLARE_DERIVABLE_TYPE(GAFlightSQLStatementUpdate,
gaflightsql_statement_update,
GAFLIGHTSQL,
@@ -57,12 +62,13 @@ struct _GAFlightSQLStatementUpdateClass
GAFlightSQLCommandClass parent_class;
};
-GARROW_AVAILABLE_IN_13_0
+GAFLIGHTSQL_AVAILABLE_IN_13_0
const gchar *
gaflightsql_statement_update_get_query(GAFlightSQLStatementUpdate *command);
#define GAFLIGHTSQL_TYPE_PREPARED_STATEMENT_UPDATE \
(gaflightsql_prepared_statement_update_get_type())
+GAFLIGHTSQL_AVAILABLE_IN_14_0
G_DECLARE_DERIVABLE_TYPE(GAFlightSQLPreparedStatementUpdate,
gaflightsql_prepared_statement_update,
GAFLIGHTSQL,
@@ -73,13 +79,14 @@ struct _GAFlightSQLPreparedStatementUpdateClass
GAFlightSQLCommandClass parent_class;
};
-GARROW_AVAILABLE_IN_14_0
+GAFLIGHTSQL_AVAILABLE_IN_14_0
GBytes *
gaflightsql_prepared_statement_update_get_handle(
GAFlightSQLPreparedStatementUpdate *command);
#define GAFLIGHTSQL_TYPE_STATEMENT_QUERY_TICKET \
(gaflightsql_statement_query_ticket_get_type())
+GAFLIGHTSQL_AVAILABLE_IN_9_0
G_DECLARE_DERIVABLE_TYPE(GAFlightSQLStatementQueryTicket,
gaflightsql_statement_query_ticket,
GAFLIGHTSQL,
@@ -90,15 +97,16 @@ struct _GAFlightSQLStatementQueryTicketClass
GAFlightSQLCommandClass parent_class;
};
-GARROW_AVAILABLE_IN_9_0
+GAFLIGHTSQL_AVAILABLE_IN_9_0
GBytes *
gaflightsql_statement_query_ticket_generate_handle(const gchar *query, GError **error);
-GARROW_AVAILABLE_IN_9_0
+GAFLIGHTSQL_AVAILABLE_IN_9_0
GBytes *
gaflightsql_statement_query_ticket_get_handle(GAFlightSQLStatementQueryTicket *command);
#define GAFLIGHTSQL_TYPE_CREATE_PREPARED_STATEMENT_REQUEST \
(gaflightsql_create_prepared_statement_request_get_type())
+GAFLIGHTSQL_AVAILABLE_IN_14_0
G_DECLARE_DERIVABLE_TYPE(GAFlightSQLCreatePreparedStatementRequest,
gaflightsql_create_prepared_statement_request,
GAFLIGHTSQL,
@@ -109,18 +117,19 @@ struct _GAFlightSQLCreatePreparedStatementRequestClass
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_14_0
+GAFLIGHTSQL_AVAILABLE_IN_14_0
const gchar *
gaflightsql_create_prepared_statement_request_get_query(
GAFlightSQLCreatePreparedStatementRequest *request);
-GARROW_AVAILABLE_IN_14_0
+GAFLIGHTSQL_AVAILABLE_IN_14_0
const gchar *
gaflightsql_create_prepared_statement_request_get_transaction_id(
GAFlightSQLCreatePreparedStatementRequest *request);
#define GAFLIGHTSQL_TYPE_CREATE_PREPARED_STATEMENT_RESULT \
(gaflightsql_create_prepared_statement_result_get_type())
+GAFLIGHTSQL_AVAILABLE_IN_14_0
G_DECLARE_DERIVABLE_TYPE(GAFlightSQLCreatePreparedStatementResult,
gaflightsql_create_prepared_statement_result,
GAFLIGHTSQL,
@@ -131,36 +140,37 @@ struct _GAFlightSQLCreatePreparedStatementResultClass
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_14_0
+GAFLIGHTSQL_AVAILABLE_IN_14_0
GAFlightSQLCreatePreparedStatementResult *
gaflightsql_create_prepared_statement_result_new(void);
-GARROW_AVAILABLE_IN_14_0
+GAFLIGHTSQL_AVAILABLE_IN_14_0
void
gaflightsql_create_prepared_statement_result_set_dataset_schema(
GAFlightSQLCreatePreparedStatementResult *result, GArrowSchema *schema);
-GARROW_AVAILABLE_IN_14_0
+GAFLIGHTSQL_AVAILABLE_IN_14_0
GArrowSchema *
gaflightsql_create_prepared_statement_result_get_dataset_schema(
GAFlightSQLCreatePreparedStatementResult *result);
-GARROW_AVAILABLE_IN_14_0
+GAFLIGHTSQL_AVAILABLE_IN_14_0
void
gaflightsql_create_prepared_statement_result_set_parameter_schema(
GAFlightSQLCreatePreparedStatementResult *result, GArrowSchema *schema);
-GARROW_AVAILABLE_IN_14_0
+GAFLIGHTSQL_AVAILABLE_IN_14_0
GArrowSchema *
gaflightsql_create_prepared_statement_result_get_parameter_schema(
GAFlightSQLCreatePreparedStatementResult *result);
-GARROW_AVAILABLE_IN_14_0
+GAFLIGHTSQL_AVAILABLE_IN_14_0
void
gaflightsql_create_prepared_statement_result_set_handle(
GAFlightSQLCreatePreparedStatementResult *result, GBytes *handle);
-GARROW_AVAILABLE_IN_14_0
+GAFLIGHTSQL_AVAILABLE_IN_14_0
GBytes *
gaflightsql_create_prepared_statement_result_get_handle(
GAFlightSQLCreatePreparedStatementResult *result);
#define GAFLIGHTSQL_TYPE_CLOSE_PREPARED_STATEMENT_REQUEST \
(gaflightsql_close_prepared_statement_request_get_type())
+GAFLIGHTSQL_AVAILABLE_IN_14_0
G_DECLARE_DERIVABLE_TYPE(GAFlightSQLClosePreparedStatementRequest,
gaflightsql_close_prepared_statement_request,
GAFLIGHTSQL,
@@ -171,12 +181,13 @@ struct _GAFlightSQLClosePreparedStatementRequestClass
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_14_0
+GAFLIGHTSQL_AVAILABLE_IN_14_0
GBytes *
gaflightsql_close_prepared_statement_request_get_handle(
GAFlightSQLClosePreparedStatementRequest *request);
#define GAFLIGHTSQL_TYPE_SERVER (gaflightsql_server_get_type())
+GAFLIGHTSQL_AVAILABLE_IN_9_0
G_DECLARE_DERIVABLE_TYPE(
GAFlightSQLServer, gaflightsql_server, GAFLIGHTSQL, SERVER, GAFlightServer)
/**
@@ -231,27 +242,27 @@ struct _GAFlightSQLServerClass
GError **error);
};
-GARROW_AVAILABLE_IN_9_0
+GAFLIGHTSQL_AVAILABLE_IN_9_0
GAFlightInfo *
gaflightsql_server_get_flight_info_statement(GAFlightSQLServer *server,
GAFlightServerCallContext *context,
GAFlightSQLStatementQuery *command,
GAFlightDescriptor *descriptor,
GError **error);
-GARROW_AVAILABLE_IN_9_0
+GAFLIGHTSQL_AVAILABLE_IN_9_0
GAFlightDataStream *
gaflightsql_server_do_get_statement(GAFlightSQLServer *server,
GAFlightServerCallContext *context,
GAFlightSQLStatementQueryTicket *ticket,
GError **error);
-GARROW_AVAILABLE_IN_13_0
+GAFLIGHTSQL_AVAILABLE_IN_13_0
gint64
gaflightsql_server_do_put_command_statement_update(GAFlightSQLServer *server,
GAFlightServerCallContext *context,
GAFlightSQLStatementUpdate *command,
GError **error);
-/* We can restore this after we bump version to 14.0.0-SNAPSHOT. */
-/* GARROW_AVAILABLE_IN_14_0 */
+
+GAFLIGHTSQL_AVAILABLE_IN_14_0
gint64
gaflightsql_server_do_put_prepared_statement_update(
GAFlightSQLServer *server,
@@ -259,16 +270,16 @@ gaflightsql_server_do_put_prepared_statement_update(
GAFlightSQLPreparedStatementUpdate *command,
GAFlightMessageReader *reader,
GError **error);
-/* We can restore this after we bump version to 14.0.0-SNAPSHOT. */
-/* GARROW_AVAILABLE_IN_14_0 */
+
+GAFLIGHTSQL_AVAILABLE_IN_14_0
GAFlightSQLCreatePreparedStatementResult *
gaflightsql_server_create_prepared_statement(
GAFlightSQLServer *server,
GAFlightServerCallContext *context,
GAFlightSQLCreatePreparedStatementRequest *request,
GError **error);
-/* We can restore this after we bump version to 14.0.0-SNAPSHOT. */
-/* GARROW_AVAILABLE_IN_14_0 */
+
+GAFLIGHTSQL_AVAILABLE_IN_14_0
void
gaflightsql_server_close_prepared_statement(
GAFlightSQLServer *server,
diff --git a/c_glib/arrow-flight-sql-glib/version.h.in b/c_glib/arrow-flight-sql-glib/version.h.in
new file mode 100644
index 0000000000000..e4373109b9008
--- /dev/null
+++ b/c_glib/arrow-flight-sql-glib/version.h.in
@@ -0,0 +1,159 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#pragma once
+
+#include
+
+/**
+ * SECTION: version
+ * @section_id: version-macros
+ * @title: Version related macros
+ * @include: arrow-flight-sql-glib/arrow-flight-sql-glib.h
+ *
+ * Apache Arrow Flight SQL GLib provides macros that can be used by C pre-processor.
+ * They are useful to check version related things at compile time.
+ */
+
+/**
+ * GAFLIGHTSQL_VERSION_MAJOR:
+ *
+ * The major version.
+ *
+ * Since: 17.0.0
+ */
+#define GAFLIGHTSQL_VERSION_MAJOR (@VERSION_MAJOR@)
+
+/**
+ * GAFLIGHTSQL_VERSION_MINOR:
+ *
+ * The minor version.
+ *
+ * Since: 17.0.0
+ */
+#define GAFLIGHTSQL_VERSION_MINOR (@VERSION_MINOR@)
+
+/**
+ * GAFLIGHTSQL_VERSION_MICRO:
+ *
+ * The micro version.
+ *
+ * Since: 17.0.0
+ */
+#define GAFLIGHTSQL_VERSION_MICRO (@VERSION_MICRO@)
+
+/**
+ * GAFLIGHTSQL_VERSION_TAG:
+ *
+ * The version tag. Normally, it's an empty string. It's "SNAPSHOT"
+ * for snapshot version.
+ *
+ * Since: 17.0.0
+ */
+#define GAFLIGHTSQL_VERSION_TAG "@VERSION_TAG@"
+
+/**
+ * GAFLIGHTSQL_VERSION_CHECK:
+ * @major: A major version to check for.
+ * @minor: A minor version to check for.
+ * @micro: A micro version to check for.
+ *
+ * You can use this macro in C pre-processor.
+ *
+ * Returns: %TRUE if the compile time Apache Arrow GLib version is the
+ * same as or newer than the passed version, %FALSE otherwise.
+ *
+ * Since: 17.0.0
+ */
+#define GAFLIGHTSQL_VERSION_CHECK(major, minor, micro) \
+ (GAFLIGHTSQL_VERSION_MAJOR > (major) || \
+ (GAFLIGHTSQL_VERSION_MAJOR == (major) && \
+ GAFLIGHTSQL_VERSION_MINOR > (minor)) || \
+ (GAFLIGHTSQL_VERSION_MAJOR == (major) && \
+ GAFLIGHTSQL_VERSION_MINOR == (minor) && \
+ GAFLIGHTSQL_VERSION_MICRO >= (micro)))
+
+/**
+ * GAFLIGHTSQL_DISABLE_DEPRECATION_WARNINGS:
+ *
+ * If this macro is defined, no deprecated warnings are produced.
+ *
+ * You must define this macro before including the
+ * arrow-glib/arrow-glib.h header.
+ *
+ * Since: 17.0.0
+ */
+
+#ifdef GAFLIGHTSQL_DISABLE_DEPRECATION_WARNINGS
+# define GAFLIGHTSQL_DEPRECATED
+# define GAFLIGHTSQL_DEPRECATED_FOR(function)
+# define GAFLIGHTSQL_UNAVAILABLE(major, minor)
+#else
+# define GAFLIGHTSQL_DEPRECATED G_DEPRECATED
+# define GAFLIGHTSQL_DEPRECATED_FOR(function) G_DEPRECATED_FOR(function)
+# define GAFLIGHTSQL_UNAVAILABLE(major, minor) G_UNAVAILABLE(major, minor)
+#endif
+
+@ENCODED_VERSIONS@
+
+/**
+ * GAFLIGHTSQL_VERSION_MIN_REQUIRED:
+ *
+ * You can use this macro for compile time API version check.
+ *
+ * This macro value must be one of the predefined version macros such
+ * as %GAFLIGHTSQL_VERSION_0_10.
+ *
+ * If you use any functions that is defined by newer version than
+ * %GAFLIGHTSQL_VERSION_MIN_REQUIRED, deprecated warnings are produced at
+ * compile time.
+ *
+ * You must define this macro before including the
+ * arrow-flight-sql-glib/arrow-flight-sql-glib.h header.
+ *
+ * Since: 17.0.0
+ */
+#ifndef GAFLIGHTSQL_VERSION_MIN_REQUIRED
+# define GAFLIGHTSQL_VERSION_MIN_REQUIRED GARROW_VERSION_MIN_REQUIRED
+#endif
+
+/**
+ * GAFLIGHTSQL_VERSION_MAX_ALLOWED:
+ *
+ * You can use this macro for compile time API version check.
+ *
+ * This macro value must be one of the predefined version macros such
+ * as %GAFLIGHTSQL_VERSION_0_10.
+ *
+ * If you use any functions that is defined by newer version than
+ * %GAFLIGHTSQL_VERSION_MAX_ALLOWED, deprecated warnings are produced at
+ * compile time.
+ *
+ * You must define this macro before including the
+ * arrow-flight-sql-glib/arrow-flight-sql-glib.h header.
+ *
+ * Since: 17.0.0
+ */
+#ifndef GAFLIGHTSQL_VERSION_MAX_ALLOWED
+# define GAFLIGHTSQL_VERSION_MAX_ALLOWED GARROW_VERSION_MAX_ALLOWED
+#endif
+
+@VISIBILITY_MACROS@
+
+@AVAILABILITY_MACROS@
diff --git a/c_glib/arrow-glib/array-builder.cpp b/c_glib/arrow-glib/array-builder.cpp
index b498ecb51cedb..9b7c608ca8a5b 100644
--- a/c_glib/arrow-glib/array-builder.cpp
+++ b/c_glib/arrow-glib/array-builder.cpp
@@ -231,8 +231,8 @@ garrow_array_builder_append_values(GArrowArrayBuilder *builder,
if (n_remains > 0) {
++n_loops;
}
+ std::vector data(value_size * chunk_size);
for (gint64 i = 0; i < n_loops; ++i) {
- uint8_t data[value_size * chunk_size];
uint8_t *valid_bytes = nullptr;
uint8_t valid_bytes_buffer[chunk_size];
if (is_valids_length > 0) {
@@ -255,7 +255,7 @@ garrow_array_builder_append_values(GArrowArrayBuilder *builder,
value = values[offset + j];
}
if (value) {
- get_value_function(data + (value_size * j), value, value_size);
+ get_value_function(data.data() + (value_size * j), value, value_size);
} else {
is_valid = false;
if (!valid_bytes) {
@@ -267,7 +267,7 @@ garrow_array_builder_append_values(GArrowArrayBuilder *builder,
valid_bytes_buffer[j] = is_valid;
}
}
- auto status = arrow_builder->AppendValues(data, n_values, valid_bytes);
+ auto status = arrow_builder->AppendValues(data.data(), n_values, valid_bytes);
if (!garrow_error_check(error, status, context)) {
return FALSE;
}
@@ -1035,13 +1035,13 @@ garrow_boolean_array_builder_append_values(GArrowBooleanArrayBuilder *builder,
gint64 is_valids_length,
GError **error)
{
- guint8 arrow_values[values_length];
+ std::vector arrow_values(values_length);
for (gint64 i = 0; i < values_length; ++i) {
arrow_values[i] = values[i];
}
return garrow_array_builder_append_values(
GARROW_ARRAY_BUILDER(builder),
- arrow_values,
+ arrow_values.data(),
values_length,
is_valids,
is_valids_length,
diff --git a/c_glib/arrow-glib/array-builder.h b/c_glib/arrow-glib/array-builder.h
index 8a1385b9b8c1b..6a0d0154833a7 100644
--- a/c_glib/arrow-glib/array-builder.h
+++ b/c_glib/arrow-glib/array-builder.h
@@ -26,6 +26,7 @@
G_BEGIN_DECLS
#define GARROW_TYPE_ARRAY_BUILDER (garrow_array_builder_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowArrayBuilder, garrow_array_builder, GARROW, ARRAY_BUILDER, GObject)
struct _GArrowArrayBuilderClass
@@ -33,11 +34,15 @@ struct _GArrowArrayBuilderClass
GObjectClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowDataType *
garrow_array_builder_get_value_data_type(GArrowArrayBuilder *builder);
+
+GARROW_AVAILABLE_IN_ALL
GArrowType
garrow_array_builder_get_value_type(GArrowArrayBuilder *builder);
+GARROW_AVAILABLE_IN_ALL
GArrowArray *
garrow_array_builder_finish(GArrowArrayBuilder *builder, GError **error);
@@ -86,6 +91,7 @@ garrow_array_builder_append_empty_values(GArrowArrayBuilder *builder,
GError **error);
#define GARROW_TYPE_NULL_ARRAY_BUILDER (garrow_null_array_builder_get_type())
+GARROW_AVAILABLE_IN_0_13
G_DECLARE_DERIVABLE_TYPE(GArrowNullArrayBuilder,
garrow_null_array_builder,
GARROW,
@@ -114,6 +120,7 @@ garrow_null_array_builder_append_nulls(GArrowNullArrayBuilder *builder,
#endif
#define GARROW_TYPE_BOOLEAN_ARRAY_BUILDER (garrow_boolean_array_builder_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowBooleanArrayBuilder,
garrow_boolean_array_builder,
GARROW,
@@ -124,10 +131,12 @@ struct _GArrowBooleanArrayBuilderClass
GArrowArrayBuilderClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowBooleanArrayBuilder *
garrow_boolean_array_builder_new(void);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_0_12_FOR(garrow_boolean_array_builder_append_value)
gboolean
garrow_boolean_array_builder_append(GArrowBooleanArrayBuilder *builder,
@@ -139,6 +148,8 @@ gboolean
garrow_boolean_array_builder_append_value(GArrowBooleanArrayBuilder *builder,
gboolean value,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_boolean_array_builder_append_values(GArrowBooleanArrayBuilder *builder,
const gboolean *values,
@@ -159,6 +170,7 @@ garrow_boolean_array_builder_append_nulls(GArrowBooleanArrayBuilder *builder,
#endif
#define GARROW_TYPE_INT_ARRAY_BUILDER (garrow_int_array_builder_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowIntArrayBuilder,
garrow_int_array_builder,
GARROW,
@@ -169,10 +181,12 @@ struct _GArrowIntArrayBuilderClass
GArrowArrayBuilderClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowIntArrayBuilder *
garrow_int_array_builder_new(void);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_0_12_FOR(garrow_int_array_builder_append_value)
gboolean
garrow_int_array_builder_append(GArrowIntArrayBuilder *builder,
@@ -184,6 +198,7 @@ gboolean
garrow_int_array_builder_append_value(GArrowIntArrayBuilder *builder,
gint64 value,
GError **error);
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_int_array_builder_append_values(GArrowIntArrayBuilder *builder,
const gint64 *values,
@@ -192,9 +207,12 @@ garrow_int_array_builder_append_values(GArrowIntArrayBuilder *builder,
gint64 is_valids_length,
GError **error);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_null)
gboolean
garrow_int_array_builder_append_null(GArrowIntArrayBuilder *builder, GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_nulls)
gboolean
garrow_int_array_builder_append_nulls(GArrowIntArrayBuilder *builder,
@@ -203,6 +221,7 @@ garrow_int_array_builder_append_nulls(GArrowIntArrayBuilder *builder,
#endif
#define GARROW_TYPE_UINT_ARRAY_BUILDER (garrow_uint_array_builder_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowUIntArrayBuilder,
garrow_uint_array_builder,
GARROW,
@@ -213,10 +232,12 @@ struct _GArrowUIntArrayBuilderClass
GArrowArrayBuilderClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowUIntArrayBuilder *
garrow_uint_array_builder_new(void);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_0_12_FOR(garrow_uint_array_builder_append_value)
gboolean
garrow_uint_array_builder_append(GArrowUIntArrayBuilder *builder,
@@ -228,6 +249,8 @@ gboolean
garrow_uint_array_builder_append_value(GArrowUIntArrayBuilder *builder,
guint64 value,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_uint_array_builder_append_values(GArrowUIntArrayBuilder *builder,
const guint64 *values,
@@ -236,9 +259,12 @@ garrow_uint_array_builder_append_values(GArrowUIntArrayBuilder *builder,
gint64 is_valids_length,
GError **error);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_null)
gboolean
garrow_uint_array_builder_append_null(GArrowUIntArrayBuilder *builder, GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_nulls)
gboolean
garrow_uint_array_builder_append_nulls(GArrowUIntArrayBuilder *builder,
@@ -247,6 +273,7 @@ garrow_uint_array_builder_append_nulls(GArrowUIntArrayBuilder *builder,
#endif
#define GARROW_TYPE_INT8_ARRAY_BUILDER (garrow_int8_array_builder_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowInt8ArrayBuilder,
garrow_int8_array_builder,
GARROW,
@@ -257,10 +284,12 @@ struct _GArrowInt8ArrayBuilderClass
GArrowArrayBuilderClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowInt8ArrayBuilder *
garrow_int8_array_builder_new(void);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_0_12_FOR(garrow_int8_array_builder_append_value)
gboolean
garrow_int8_array_builder_append(GArrowInt8ArrayBuilder *builder,
@@ -272,6 +301,8 @@ gboolean
garrow_int8_array_builder_append_value(GArrowInt8ArrayBuilder *builder,
gint8 value,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_int8_array_builder_append_values(GArrowInt8ArrayBuilder *builder,
const gint8 *values,
@@ -280,9 +311,12 @@ garrow_int8_array_builder_append_values(GArrowInt8ArrayBuilder *builder,
gint64 is_valids_length,
GError **error);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_null)
gboolean
garrow_int8_array_builder_append_null(GArrowInt8ArrayBuilder *builder, GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_nulls)
gboolean
garrow_int8_array_builder_append_nulls(GArrowInt8ArrayBuilder *builder,
@@ -291,6 +325,7 @@ garrow_int8_array_builder_append_nulls(GArrowInt8ArrayBuilder *builder,
#endif
#define GARROW_TYPE_UINT8_ARRAY_BUILDER (garrow_uint8_array_builder_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowUInt8ArrayBuilder,
garrow_uint8_array_builder,
GARROW,
@@ -301,10 +336,12 @@ struct _GArrowUInt8ArrayBuilderClass
GArrowArrayBuilderClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowUInt8ArrayBuilder *
garrow_uint8_array_builder_new(void);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_0_12_FOR(garrow_uint8_array_builder_append_value)
gboolean
garrow_uint8_array_builder_append(GArrowUInt8ArrayBuilder *builder,
@@ -316,6 +353,8 @@ gboolean
garrow_uint8_array_builder_append_value(GArrowUInt8ArrayBuilder *builder,
guint8 value,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_uint8_array_builder_append_values(GArrowUInt8ArrayBuilder *builder,
const guint8 *values,
@@ -324,9 +363,12 @@ garrow_uint8_array_builder_append_values(GArrowUInt8ArrayBuilder *builder,
gint64 is_valids_length,
GError **error);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_null)
gboolean
garrow_uint8_array_builder_append_null(GArrowUInt8ArrayBuilder *builder, GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_nulls)
gboolean
garrow_uint8_array_builder_append_nulls(GArrowUInt8ArrayBuilder *builder,
@@ -335,6 +377,7 @@ garrow_uint8_array_builder_append_nulls(GArrowUInt8ArrayBuilder *builder,
#endif
#define GARROW_TYPE_INT16_ARRAY_BUILDER (garrow_int16_array_builder_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowInt16ArrayBuilder,
garrow_int16_array_builder,
GARROW,
@@ -345,6 +388,7 @@ struct _GArrowInt16ArrayBuilderClass
GArrowArrayBuilderClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowInt16ArrayBuilder *
garrow_int16_array_builder_new(void);
@@ -360,6 +404,7 @@ gboolean
garrow_int16_array_builder_append_value(GArrowInt16ArrayBuilder *builder,
gint16 value,
GError **error);
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_int16_array_builder_append_values(GArrowInt16ArrayBuilder *builder,
const gint16 *values,
@@ -368,9 +413,12 @@ garrow_int16_array_builder_append_values(GArrowInt16ArrayBuilder *builder,
gint64 is_valids_length,
GError **error);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_null)
gboolean
garrow_int16_array_builder_append_null(GArrowInt16ArrayBuilder *builder, GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_nulls)
gboolean
garrow_int16_array_builder_append_nulls(GArrowInt16ArrayBuilder *builder,
@@ -379,6 +427,7 @@ garrow_int16_array_builder_append_nulls(GArrowInt16ArrayBuilder *builder,
#endif
#define GARROW_TYPE_UINT16_ARRAY_BUILDER (garrow_uint16_array_builder_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowUInt16ArrayBuilder,
garrow_uint16_array_builder,
GARROW,
@@ -389,10 +438,12 @@ struct _GArrowUInt16ArrayBuilderClass
GArrowArrayBuilderClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowUInt16ArrayBuilder *
garrow_uint16_array_builder_new(void);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_0_12_FOR(garrow_uint16_array_builder_append_value)
gboolean
garrow_uint16_array_builder_append(GArrowUInt16ArrayBuilder *builder,
@@ -404,6 +455,8 @@ gboolean
garrow_uint16_array_builder_append_value(GArrowUInt16ArrayBuilder *builder,
guint16 value,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_uint16_array_builder_append_values(GArrowUInt16ArrayBuilder *builder,
const guint16 *values,
@@ -412,10 +465,13 @@ garrow_uint16_array_builder_append_values(GArrowUInt16ArrayBuilder *builder,
gint64 is_valids_length,
GError **error);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_null)
gboolean
garrow_uint16_array_builder_append_null(GArrowUInt16ArrayBuilder *builder,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_nulls)
gboolean
garrow_uint16_array_builder_append_nulls(GArrowUInt16ArrayBuilder *builder,
@@ -424,6 +480,7 @@ garrow_uint16_array_builder_append_nulls(GArrowUInt16ArrayBuilder *builder,
#endif
#define GARROW_TYPE_INT32_ARRAY_BUILDER (garrow_int32_array_builder_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowInt32ArrayBuilder,
garrow_int32_array_builder,
GARROW,
@@ -434,10 +491,12 @@ struct _GArrowInt32ArrayBuilderClass
GArrowArrayBuilderClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowInt32ArrayBuilder *
garrow_int32_array_builder_new(void);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_0_12_FOR(garrow_int32_array_builder_append_value)
gboolean
garrow_int32_array_builder_append(GArrowInt32ArrayBuilder *builder,
@@ -449,6 +508,8 @@ gboolean
garrow_int32_array_builder_append_value(GArrowInt32ArrayBuilder *builder,
gint32 value,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_int32_array_builder_append_values(GArrowInt32ArrayBuilder *builder,
const gint32 *values,
@@ -457,9 +518,12 @@ garrow_int32_array_builder_append_values(GArrowInt32ArrayBuilder *builder,
gint64 is_valids_length,
GError **error);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_null)
gboolean
garrow_int32_array_builder_append_null(GArrowInt32ArrayBuilder *builder, GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_nulls)
gboolean
garrow_int32_array_builder_append_nulls(GArrowInt32ArrayBuilder *builder,
@@ -468,6 +532,7 @@ garrow_int32_array_builder_append_nulls(GArrowInt32ArrayBuilder *builder,
#endif
#define GARROW_TYPE_UINT32_ARRAY_BUILDER (garrow_uint32_array_builder_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowUInt32ArrayBuilder,
garrow_uint32_array_builder,
GARROW,
@@ -478,10 +543,12 @@ struct _GArrowUInt32ArrayBuilderClass
GArrowArrayBuilderClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowUInt32ArrayBuilder *
garrow_uint32_array_builder_new(void);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_0_12_FOR(garrow_uint32_array_builder_append_value)
gboolean
garrow_uint32_array_builder_append(GArrowUInt32ArrayBuilder *builder,
@@ -493,6 +560,8 @@ gboolean
garrow_uint32_array_builder_append_value(GArrowUInt32ArrayBuilder *builder,
guint32 value,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_uint32_array_builder_append_values(GArrowUInt32ArrayBuilder *builder,
const guint32 *values,
@@ -501,10 +570,13 @@ garrow_uint32_array_builder_append_values(GArrowUInt32ArrayBuilder *builder,
gint64 is_valids_length,
GError **error);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_null)
gboolean
garrow_uint32_array_builder_append_null(GArrowUInt32ArrayBuilder *builder,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_nulls)
gboolean
garrow_uint32_array_builder_append_nulls(GArrowUInt32ArrayBuilder *builder,
@@ -513,6 +585,7 @@ garrow_uint32_array_builder_append_nulls(GArrowUInt32ArrayBuilder *builder,
#endif
#define GARROW_TYPE_INT64_ARRAY_BUILDER (garrow_int64_array_builder_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowInt64ArrayBuilder,
garrow_int64_array_builder,
GARROW,
@@ -523,10 +596,12 @@ struct _GArrowInt64ArrayBuilderClass
GArrowArrayBuilderClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowInt64ArrayBuilder *
garrow_int64_array_builder_new(void);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_0_12_FOR(garrow_int64_array_builder_append_value)
gboolean
garrow_int64_array_builder_append(GArrowInt64ArrayBuilder *builder,
@@ -538,6 +613,8 @@ gboolean
garrow_int64_array_builder_append_value(GArrowInt64ArrayBuilder *builder,
gint64 value,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_int64_array_builder_append_values(GArrowInt64ArrayBuilder *builder,
const gint64 *values,
@@ -546,9 +623,12 @@ garrow_int64_array_builder_append_values(GArrowInt64ArrayBuilder *builder,
gint64 is_valids_length,
GError **error);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_null)
gboolean
garrow_int64_array_builder_append_null(GArrowInt64ArrayBuilder *builder, GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_nulls)
gboolean
garrow_int64_array_builder_append_nulls(GArrowInt64ArrayBuilder *builder,
@@ -557,6 +637,7 @@ garrow_int64_array_builder_append_nulls(GArrowInt64ArrayBuilder *builder,
#endif
#define GARROW_TYPE_UINT64_ARRAY_BUILDER (garrow_uint64_array_builder_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowUInt64ArrayBuilder,
garrow_uint64_array_builder,
GARROW,
@@ -567,10 +648,12 @@ struct _GArrowUInt64ArrayBuilderClass
GArrowArrayBuilderClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowUInt64ArrayBuilder *
garrow_uint64_array_builder_new(void);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_0_12_FOR(garrow_uint64_array_builder_append_value)
gboolean
garrow_uint64_array_builder_append(GArrowUInt64ArrayBuilder *builder,
@@ -582,6 +665,8 @@ gboolean
garrow_uint64_array_builder_append_value(GArrowUInt64ArrayBuilder *builder,
guint64 value,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_uint64_array_builder_append_values(GArrowUInt64ArrayBuilder *builder,
const guint64 *values,
@@ -590,10 +675,13 @@ garrow_uint64_array_builder_append_values(GArrowUInt64ArrayBuilder *builder,
gint64 is_valids_length,
GError **error);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_null)
gboolean
garrow_uint64_array_builder_append_null(GArrowUInt64ArrayBuilder *builder,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_nulls)
gboolean
garrow_uint64_array_builder_append_nulls(GArrowUInt64ArrayBuilder *builder,
@@ -602,6 +690,7 @@ garrow_uint64_array_builder_append_nulls(GArrowUInt64ArrayBuilder *builder,
#endif
#define GARROW_TYPE_HALF_FLOAT_ARRAY_BUILDER (garrow_half_float_array_builder_get_type())
+GARROW_AVAILABLE_IN_11_0
G_DECLARE_DERIVABLE_TYPE(GArrowHalfFloatArrayBuilder,
garrow_half_float_array_builder,
GARROW,
@@ -631,6 +720,7 @@ garrow_half_float_array_builder_append_values(GArrowHalfFloatArrayBuilder *build
GError **error);
#define GARROW_TYPE_FLOAT_ARRAY_BUILDER (garrow_float_array_builder_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowFloatArrayBuilder,
garrow_float_array_builder,
GARROW,
@@ -641,10 +731,12 @@ struct _GArrowFloatArrayBuilderClass
GArrowArrayBuilderClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowFloatArrayBuilder *
garrow_float_array_builder_new(void);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_0_12_FOR(garrow_float_array_builder_append_value)
gboolean
garrow_float_array_builder_append(GArrowFloatArrayBuilder *builder,
@@ -656,6 +748,8 @@ gboolean
garrow_float_array_builder_append_value(GArrowFloatArrayBuilder *builder,
gfloat value,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_float_array_builder_append_values(GArrowFloatArrayBuilder *builder,
const gfloat *values,
@@ -664,9 +758,12 @@ garrow_float_array_builder_append_values(GArrowFloatArrayBuilder *builder,
gint64 is_valids_length,
GError **error);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_null)
gboolean
garrow_float_array_builder_append_null(GArrowFloatArrayBuilder *builder, GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_nulls)
gboolean
garrow_float_array_builder_append_nulls(GArrowFloatArrayBuilder *builder,
@@ -675,6 +772,7 @@ garrow_float_array_builder_append_nulls(GArrowFloatArrayBuilder *builder,
#endif
#define GARROW_TYPE_DOUBLE_ARRAY_BUILDER (garrow_double_array_builder_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowDoubleArrayBuilder,
garrow_double_array_builder,
GARROW,
@@ -685,10 +783,12 @@ struct _GArrowDoubleArrayBuilderClass
GArrowArrayBuilderClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowDoubleArrayBuilder *
garrow_double_array_builder_new(void);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_0_12_FOR(garrow_double_array_builder_append_value)
gboolean
garrow_double_array_builder_append(GArrowDoubleArrayBuilder *builder,
@@ -700,6 +800,8 @@ gboolean
garrow_double_array_builder_append_value(GArrowDoubleArrayBuilder *builder,
gdouble value,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_double_array_builder_append_values(GArrowDoubleArrayBuilder *builder,
const gdouble *values,
@@ -708,10 +810,13 @@ garrow_double_array_builder_append_values(GArrowDoubleArrayBuilder *builder,
gint64 is_valids_length,
GError **error);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_null)
gboolean
garrow_double_array_builder_append_null(GArrowDoubleArrayBuilder *builder,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_nulls)
gboolean
garrow_double_array_builder_append_nulls(GArrowDoubleArrayBuilder *builder,
@@ -720,6 +825,7 @@ garrow_double_array_builder_append_nulls(GArrowDoubleArrayBuilder *builder,
#endif
#define GARROW_TYPE_BINARY_ARRAY_BUILDER (garrow_binary_array_builder_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowBinaryArrayBuilder,
garrow_binary_array_builder,
GARROW,
@@ -730,10 +836,12 @@ struct _GArrowBinaryArrayBuilderClass
GArrowArrayBuilderClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowBinaryArrayBuilder *
garrow_binary_array_builder_new(void);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_0_12_FOR(garrow_binary_array_builder_append_value)
gboolean
garrow_binary_array_builder_append(GArrowBinaryArrayBuilder *builder,
@@ -761,10 +869,12 @@ garrow_binary_array_builder_append_values(GArrowBinaryArrayBuilder *builder,
gint64 is_valids_length,
GError **error);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_null)
gboolean
garrow_binary_array_builder_append_null(GArrowBinaryArrayBuilder *builder,
GError **error);
+
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_nulls)
GARROW_AVAILABLE_IN_0_16
gboolean
@@ -775,6 +885,7 @@ garrow_binary_array_builder_append_nulls(GArrowBinaryArrayBuilder *builder,
#define GARROW_TYPE_LARGE_BINARY_ARRAY_BUILDER \
(garrow_large_binary_array_builder_get_type())
+GARROW_AVAILABLE_IN_0_16
G_DECLARE_DERIVABLE_TYPE(GArrowLargeBinaryArrayBuilder,
garrow_large_binary_array_builder,
GARROW,
@@ -821,6 +932,7 @@ garrow_large_binary_array_builder_append_nulls(GArrowLargeBinaryArrayBuilder *bu
#endif
#define GARROW_TYPE_STRING_ARRAY_BUILDER (garrow_string_array_builder_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowStringArrayBuilder,
garrow_string_array_builder,
GARROW,
@@ -831,10 +943,12 @@ struct _GArrowStringArrayBuilderClass
GArrowBinaryArrayBuilderClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowStringArrayBuilder *
garrow_string_array_builder_new(void);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_0_12_FOR(garrow_string_array_builder_append_value)
gboolean
garrow_string_array_builder_append(GArrowStringArrayBuilder *builder,
@@ -863,6 +977,7 @@ garrow_string_array_builder_append_string_len(GArrowStringArrayBuilder *builder,
GError **error);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_0_16_FOR(garrow_string_array_builder_append_strings)
gboolean
garrow_string_array_builder_append_values(GArrowStringArrayBuilder *builder,
@@ -883,6 +998,7 @@ garrow_string_array_builder_append_strings(GArrowStringArrayBuilder *builder,
#define GARROW_TYPE_LARGE_STRING_ARRAY_BUILDER \
(garrow_large_string_array_builder_get_type())
+GARROW_AVAILABLE_IN_0_16
G_DECLARE_DERIVABLE_TYPE(GArrowLargeStringArrayBuilder,
garrow_large_string_array_builder,
GARROW,
@@ -919,6 +1035,7 @@ garrow_large_string_array_builder_append_strings(GArrowLargeStringArrayBuilder *
#define GARROW_TYPE_FIXED_SIZE_BINARY_ARRAY_BUILDER \
(garrow_fixed_size_binary_array_builder_get_type())
+GARROW_AVAILABLE_IN_3_0
G_DECLARE_DERIVABLE_TYPE(GArrowFixedSizeBinaryArrayBuilder,
garrow_fixed_size_binary_array_builder,
GARROW,
@@ -963,6 +1080,7 @@ garrow_fixed_size_binary_array_builder_append_values_packed(
GError **error);
#define GARROW_TYPE_DATE32_ARRAY_BUILDER (garrow_date32_array_builder_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowDate32ArrayBuilder,
garrow_date32_array_builder,
GARROW,
@@ -973,10 +1091,12 @@ struct _GArrowDate32ArrayBuilderClass
GArrowArrayBuilderClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowDate32ArrayBuilder *
garrow_date32_array_builder_new(void);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_0_12_FOR(garrow_date32_array_builder_append_value)
gboolean
garrow_date32_array_builder_append(GArrowDate32ArrayBuilder *builder,
@@ -988,6 +1108,8 @@ gboolean
garrow_date32_array_builder_append_value(GArrowDate32ArrayBuilder *builder,
gint32 value,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_date32_array_builder_append_values(GArrowDate32ArrayBuilder *builder,
const gint32 *values,
@@ -996,10 +1118,13 @@ garrow_date32_array_builder_append_values(GArrowDate32ArrayBuilder *builder,
gint64 is_valids_length,
GError **error);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_null)
gboolean
garrow_date32_array_builder_append_null(GArrowDate32ArrayBuilder *builder,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_nulls)
gboolean
garrow_date32_array_builder_append_nulls(GArrowDate32ArrayBuilder *builder,
@@ -1008,6 +1133,7 @@ garrow_date32_array_builder_append_nulls(GArrowDate32ArrayBuilder *builder,
#endif
#define GARROW_TYPE_DATE64_ARRAY_BUILDER (garrow_date64_array_builder_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowDate64ArrayBuilder,
garrow_date64_array_builder,
GARROW,
@@ -1018,10 +1144,12 @@ struct _GArrowDate64ArrayBuilderClass
GArrowArrayBuilderClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowDate64ArrayBuilder *
garrow_date64_array_builder_new(void);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_0_12_FOR(garrow_date64_array_builder_append_value)
gboolean
garrow_date64_array_builder_append(GArrowDate64ArrayBuilder *builder,
@@ -1033,6 +1161,8 @@ gboolean
garrow_date64_array_builder_append_value(GArrowDate64ArrayBuilder *builder,
gint64 value,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_date64_array_builder_append_values(GArrowDate64ArrayBuilder *builder,
const gint64 *values,
@@ -1041,10 +1171,13 @@ garrow_date64_array_builder_append_values(GArrowDate64ArrayBuilder *builder,
gint64 is_valids_length,
GError **error);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_null)
gboolean
garrow_date64_array_builder_append_null(GArrowDate64ArrayBuilder *builder,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_nulls)
gboolean
garrow_date64_array_builder_append_nulls(GArrowDate64ArrayBuilder *builder,
@@ -1053,6 +1186,7 @@ garrow_date64_array_builder_append_nulls(GArrowDate64ArrayBuilder *builder,
#endif
#define GARROW_TYPE_TIMESTAMP_ARRAY_BUILDER (garrow_timestamp_array_builder_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowTimestampArrayBuilder,
garrow_timestamp_array_builder,
GARROW,
@@ -1063,10 +1197,12 @@ struct _GArrowTimestampArrayBuilderClass
GArrowArrayBuilderClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowTimestampArrayBuilder *
garrow_timestamp_array_builder_new(GArrowTimestampDataType *data_type);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_0_12_FOR(garrow_timestamp_array_builder_append_value)
gboolean
garrow_timestamp_array_builder_append(GArrowTimestampArrayBuilder *builder,
@@ -1078,6 +1214,8 @@ gboolean
garrow_timestamp_array_builder_append_value(GArrowTimestampArrayBuilder *builder,
gint64 value,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_timestamp_array_builder_append_values(GArrowTimestampArrayBuilder *builder,
const gint64 *values,
@@ -1086,10 +1224,13 @@ garrow_timestamp_array_builder_append_values(GArrowTimestampArrayBuilder *builde
gint64 is_valids_length,
GError **error);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_null)
gboolean
garrow_timestamp_array_builder_append_null(GArrowTimestampArrayBuilder *builder,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_nulls)
gboolean
garrow_timestamp_array_builder_append_nulls(GArrowTimestampArrayBuilder *builder,
@@ -1098,6 +1239,7 @@ garrow_timestamp_array_builder_append_nulls(GArrowTimestampArrayBuilder *builder
#endif
#define GARROW_TYPE_TIME32_ARRAY_BUILDER (garrow_time32_array_builder_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowTime32ArrayBuilder,
garrow_time32_array_builder,
GARROW,
@@ -1108,10 +1250,12 @@ struct _GArrowTime32ArrayBuilderClass
GArrowArrayBuilderClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowTime32ArrayBuilder *
garrow_time32_array_builder_new(GArrowTime32DataType *data_type);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_0_12_FOR(garrow_time32_array_builder_append_value)
gboolean
garrow_time32_array_builder_append(GArrowTime32ArrayBuilder *builder,
@@ -1123,6 +1267,8 @@ gboolean
garrow_time32_array_builder_append_value(GArrowTime32ArrayBuilder *builder,
gint32 value,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_time32_array_builder_append_values(GArrowTime32ArrayBuilder *builder,
const gint32 *values,
@@ -1131,10 +1277,13 @@ garrow_time32_array_builder_append_values(GArrowTime32ArrayBuilder *builder,
gint64 is_valids_length,
GError **error);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_null)
gboolean
garrow_time32_array_builder_append_null(GArrowTime32ArrayBuilder *builder,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_nulls)
gboolean
garrow_time32_array_builder_append_nulls(GArrowTime32ArrayBuilder *builder,
@@ -1143,6 +1292,7 @@ garrow_time32_array_builder_append_nulls(GArrowTime32ArrayBuilder *builder,
#endif
#define GARROW_TYPE_TIME64_ARRAY_BUILDER (garrow_time64_array_builder_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowTime64ArrayBuilder,
garrow_time64_array_builder,
GARROW,
@@ -1153,10 +1303,12 @@ struct _GArrowTime64ArrayBuilderClass
GArrowArrayBuilderClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowTime64ArrayBuilder *
garrow_time64_array_builder_new(GArrowTime64DataType *data_type);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_0_12_FOR(garrow_time64_array_builder_append_value)
gboolean
garrow_time64_array_builder_append(GArrowTime64ArrayBuilder *builder,
@@ -1168,6 +1320,8 @@ gboolean
garrow_time64_array_builder_append_value(GArrowTime64ArrayBuilder *builder,
gint64 value,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_time64_array_builder_append_values(GArrowTime64ArrayBuilder *builder,
const gint64 *values,
@@ -1176,10 +1330,13 @@ garrow_time64_array_builder_append_values(GArrowTime64ArrayBuilder *builder,
gint64 is_valids_length,
GError **error);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_null)
gboolean
garrow_time64_array_builder_append_null(GArrowTime64ArrayBuilder *builder,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_nulls)
gboolean
garrow_time64_array_builder_append_nulls(GArrowTime64ArrayBuilder *builder,
@@ -1189,6 +1346,7 @@ garrow_time64_array_builder_append_nulls(GArrowTime64ArrayBuilder *builder,
#define GARROW_TYPE_MONTH_INTERVAL_ARRAY_BUILDER \
(garrow_month_interval_array_builder_get_type())
+GARROW_AVAILABLE_IN_8_0
G_DECLARE_DERIVABLE_TYPE(GArrowMonthIntervalArrayBuilder,
garrow_month_interval_array_builder,
GARROW,
@@ -1220,6 +1378,7 @@ garrow_month_interval_array_builder_append_values(
#define GARROW_TYPE_DAY_TIME_INTERVAL_ARRAY_BUILDER \
(garrow_day_time_interval_array_builder_get_type())
+GARROW_AVAILABLE_IN_8_0
G_DECLARE_DERIVABLE_TYPE(GArrowDayTimeIntervalArrayBuilder,
garrow_day_time_interval_array_builder,
GARROW,
@@ -1252,6 +1411,7 @@ garrow_day_time_interval_array_builder_append_values(
#define GARROW_TYPE_MONTH_DAY_NANO_INTERVAL_ARRAY_BUILDER \
(garrow_month_day_nano_interval_array_builder_get_type())
+GARROW_AVAILABLE_IN_8_0
G_DECLARE_DERIVABLE_TYPE(GArrowMonthDayNanoIntervalArrayBuilder,
garrow_month_day_nano_interval_array_builder,
GARROW,
@@ -1284,6 +1444,7 @@ garrow_month_day_nano_interval_array_builder_append_values(
#define GARROW_TYPE_BINARY_DICTIONARY_ARRAY_BUILDER \
(garrow_binary_dictionary_array_builder_get_type())
+GARROW_AVAILABLE_IN_2_0
G_DECLARE_DERIVABLE_TYPE(GArrowBinaryDictionaryArrayBuilder,
garrow_binary_dictionary_array_builder,
GARROW,
@@ -1350,6 +1511,7 @@ garrow_binary_dictionary_array_builder_reset_full(
#define GARROW_TYPE_STRING_DICTIONARY_ARRAY_BUILDER \
(garrow_string_dictionary_array_builder_get_type())
+GARROW_AVAILABLE_IN_2_0
G_DECLARE_DERIVABLE_TYPE(GArrowStringDictionaryArrayBuilder,
garrow_string_dictionary_array_builder,
GARROW,
@@ -1408,6 +1570,7 @@ garrow_string_dictionary_array_builder_reset_full(
GArrowStringDictionaryArrayBuilder *builder);
#define GARROW_TYPE_LIST_ARRAY_BUILDER (garrow_list_array_builder_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowListArrayBuilder,
garrow_list_array_builder,
GARROW,
@@ -1418,10 +1581,12 @@ struct _GArrowListArrayBuilderClass
GArrowArrayBuilderClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowListArrayBuilder *
garrow_list_array_builder_new(GArrowListDataType *data_type, GError **error);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_0_12_FOR(garrow_list_array_builder_append_value)
gboolean
garrow_list_array_builder_append(GArrowListArrayBuilder *builder, GError **error);
@@ -1430,15 +1595,18 @@ GARROW_AVAILABLE_IN_0_12
gboolean
garrow_list_array_builder_append_value(GArrowListArrayBuilder *builder, GError **error);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_null)
gboolean
garrow_list_array_builder_append_null(GArrowListArrayBuilder *builder, GError **error);
#endif
+GARROW_AVAILABLE_IN_ALL
GArrowArrayBuilder *
garrow_list_array_builder_get_value_builder(GArrowListArrayBuilder *builder);
#define GARROW_TYPE_LARGE_LIST_ARRAY_BUILDER (garrow_large_list_array_builder_get_type())
+GARROW_AVAILABLE_IN_0_16
G_DECLARE_DERIVABLE_TYPE(GArrowLargeListArrayBuilder,
garrow_large_list_array_builder,
GARROW,
@@ -1468,6 +1636,7 @@ GArrowArrayBuilder *
garrow_large_list_array_builder_get_value_builder(GArrowLargeListArrayBuilder *builder);
#define GARROW_TYPE_STRUCT_ARRAY_BUILDER (garrow_struct_array_builder_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowStructArrayBuilder,
garrow_struct_array_builder,
GARROW,
@@ -1478,10 +1647,12 @@ struct _GArrowStructArrayBuilderClass
GArrowArrayBuilderClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowStructArrayBuilder *
garrow_struct_array_builder_new(GArrowStructDataType *data_type, GError **error);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_0_12_FOR(garrow_struct_array_builder_append_value)
gboolean
garrow_struct_array_builder_append(GArrowStructArrayBuilder *builder, GError **error);
@@ -1491,6 +1662,7 @@ gboolean
garrow_struct_array_builder_append_value(GArrowStructArrayBuilder *builder,
GError **error);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_3_0_FOR(garrow_array_builder_append_null)
gboolean
garrow_struct_array_builder_append_null(GArrowStructArrayBuilder *builder,
@@ -1498,15 +1670,19 @@ garrow_struct_array_builder_append_null(GArrowStructArrayBuilder *builder,
#endif
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_12_0_FOR(garrow_array_builder_get_child)
GArrowArrayBuilder *
garrow_struct_array_builder_get_field_builder(GArrowStructArrayBuilder *builder, gint i);
+
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_12_0_FOR(garrow_array_builder_get_children)
GList *
garrow_struct_array_builder_get_field_builders(GArrowStructArrayBuilder *builder);
#endif
#define GARROW_TYPE_MAP_ARRAY_BUILDER (garrow_map_array_builder_get_type())
+GARROW_AVAILABLE_IN_0_17
G_DECLARE_DERIVABLE_TYPE(GArrowMapArrayBuilder,
garrow_map_array_builder,
GARROW,
@@ -1554,6 +1730,7 @@ GArrowArrayBuilder *
garrow_map_array_builder_get_value_builder(GArrowMapArrayBuilder *builder);
#define GARROW_TYPE_DECIMAL128_ARRAY_BUILDER (garrow_decimal128_array_builder_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowDecimal128ArrayBuilder,
garrow_decimal128_array_builder,
GARROW,
@@ -1564,10 +1741,12 @@ struct _GArrowDecimal128ArrayBuilderClass
GArrowFixedSizeBinaryArrayBuilderClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowDecimal128ArrayBuilder *
garrow_decimal128_array_builder_new(GArrowDecimal128DataType *data_type);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_0_12_FOR(garrow_decimal128_array_builder_append_value)
gboolean
garrow_decimal128_array_builder_append(GArrowDecimal128ArrayBuilder *builder,
@@ -1596,6 +1775,7 @@ garrow_decimal128_array_builder_append_null(GArrowDecimal128ArrayBuilder *builde
#endif
#define GARROW_TYPE_DECIMAL256_ARRAY_BUILDER (garrow_decimal256_array_builder_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowDecimal256ArrayBuilder,
garrow_decimal256_array_builder,
GARROW,
@@ -1606,6 +1786,7 @@ struct _GArrowDecimal256ArrayBuilderClass
GArrowFixedSizeBinaryArrayBuilderClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowDecimal256ArrayBuilder *
garrow_decimal256_array_builder_new(GArrowDecimal256DataType *data_type);
@@ -1624,6 +1805,7 @@ garrow_decimal256_array_builder_append_values(GArrowDecimal256ArrayBuilder *buil
GError **error);
#define GARROW_TYPE_UNION_ARRAY_BUILDER (garrow_union_array_builder_get_type())
+GARROW_AVAILABLE_IN_12_0
G_DECLARE_DERIVABLE_TYPE(GArrowUnionArrayBuilder,
garrow_union_array_builder,
GARROW,
@@ -1648,6 +1830,7 @@ garrow_union_array_builder_append_value(GArrowUnionArrayBuilder *builder,
#define GARROW_TYPE_DENSE_UNION_ARRAY_BUILDER \
(garrow_dense_union_array_builder_get_type())
+GARROW_AVAILABLE_IN_12_0
G_DECLARE_DERIVABLE_TYPE(GArrowDenseUnionArrayBuilder,
garrow_dense_union_array_builder,
GARROW,
@@ -1664,6 +1847,7 @@ garrow_dense_union_array_builder_new(GArrowDenseUnionDataType *data_type, GError
#define GARROW_TYPE_SPARSE_UNION_ARRAY_BUILDER \
(garrow_sparse_union_array_builder_get_type())
+GARROW_AVAILABLE_IN_12_0
G_DECLARE_DERIVABLE_TYPE(GArrowSparseUnionArrayBuilder,
garrow_sparse_union_array_builder,
GARROW,
diff --git a/c_glib/arrow-glib/basic-array-definition.h b/c_glib/arrow-glib/basic-array-definition.h
index 54642dae018ec..2fa67c09c1cc4 100644
--- a/c_glib/arrow-glib/basic-array-definition.h
+++ b/c_glib/arrow-glib/basic-array-definition.h
@@ -21,9 +21,12 @@
#include
+#include
+
G_BEGIN_DECLS
#define GARROW_TYPE_ARRAY (garrow_array_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowArray, garrow_array, GARROW, ARRAY, GObject)
struct _GArrowArrayClass
{
@@ -31,6 +34,7 @@ struct _GArrowArrayClass
};
#define GARROW_TYPE_EXTENSION_ARRAY (garrow_extension_array_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowExtensionArray, garrow_extension_array, GARROW, EXTENSION_ARRAY, GArrowArray)
struct _GArrowExtensionArrayClass
diff --git a/c_glib/arrow-glib/basic-array.h b/c_glib/arrow-glib/basic-array.h
index ee6f40b1ddc24..95679aa37c57a 100644
--- a/c_glib/arrow-glib/basic-array.h
+++ b/c_glib/arrow-glib/basic-array.h
@@ -27,6 +27,7 @@
G_BEGIN_DECLS
#define GARROW_TYPE_EQUAL_OPTIONS (garrow_equal_options_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(
GArrowEqualOptions, garrow_equal_options, GARROW, EQUAL_OPTIONS, GObject)
struct _GArrowEqualOptionsClass
@@ -52,6 +53,7 @@ garrow_array_export(GArrowArray *array,
gpointer *c_abi_schema,
GError **error);
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_array_equal(GArrowArray *array, GArrowArray *other_array);
GARROW_AVAILABLE_IN_5_0
@@ -59,8 +61,11 @@ gboolean
garrow_array_equal_options(GArrowArray *array,
GArrowArray *other_array,
GArrowEqualOptions *options);
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_array_equal_approx(GArrowArray *array, GArrowArray *other_array);
+
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_array_equal_range(GArrowArray *array,
gint64 start_index,
@@ -69,37 +74,60 @@ garrow_array_equal_range(GArrowArray *array,
gint64 end_index,
GArrowEqualOptions *options);
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_array_is_null(GArrowArray *array, gint64 i);
+
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_array_is_valid(GArrowArray *array, gint64 i);
+
+GARROW_AVAILABLE_IN_ALL
gint64
garrow_array_get_length(GArrowArray *array);
+
+GARROW_AVAILABLE_IN_ALL
gint64
garrow_array_get_offset(GArrowArray *array);
+
+GARROW_AVAILABLE_IN_ALL
gint64
garrow_array_get_n_nulls(GArrowArray *array);
+
+GARROW_AVAILABLE_IN_ALL
GArrowBuffer *
garrow_array_get_null_bitmap(GArrowArray *array);
+
+GARROW_AVAILABLE_IN_ALL
GArrowDataType *
garrow_array_get_value_data_type(GArrowArray *array);
+
+GARROW_AVAILABLE_IN_ALL
GArrowType
garrow_array_get_value_type(GArrowArray *array);
+
+GARROW_AVAILABLE_IN_ALL
GArrowArray *
garrow_array_slice(GArrowArray *array, gint64 offset, gint64 length);
+
+GARROW_AVAILABLE_IN_ALL
gchar *
garrow_array_to_string(GArrowArray *array, GError **error);
+
GARROW_AVAILABLE_IN_0_15
GArrowArray *
garrow_array_view(GArrowArray *array, GArrowDataType *return_type, GError **error);
+
GARROW_AVAILABLE_IN_0_15
gchar *
garrow_array_diff_unified(GArrowArray *array, GArrowArray *other_array);
+
GARROW_AVAILABLE_IN_4_0
GArrowArray *
garrow_array_concatenate(GArrowArray *array, GList *other_arrays, GError **error);
#define GARROW_TYPE_NULL_ARRAY (garrow_null_array_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowNullArray, garrow_null_array, GARROW, NULL_ARRAY, GArrowArray)
struct _GArrowNullArrayClass
@@ -107,10 +135,12 @@ struct _GArrowNullArrayClass
GArrowArrayClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowNullArray *
garrow_null_array_new(gint64 length);
#define GARROW_TYPE_PRIMITIVE_ARRAY (garrow_primitive_array_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowPrimitiveArray, garrow_primitive_array, GARROW, PRIMITIVE_ARRAY, GArrowArray)
struct _GArrowPrimitiveArrayClass
@@ -119,6 +149,7 @@ struct _GArrowPrimitiveArrayClass
};
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_1_0_FOR(garrow_primitive_array_get_data_buffer)
GArrowBuffer *
garrow_primitive_array_get_buffer(GArrowPrimitiveArray *array);
@@ -128,6 +159,7 @@ GArrowBuffer *
garrow_primitive_array_get_data_buffer(GArrowPrimitiveArray *array);
#define GARROW_TYPE_BOOLEAN_ARRAY (garrow_boolean_array_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowBooleanArray, garrow_boolean_array, GARROW, BOOLEAN_ARRAY, GArrowPrimitiveArray)
struct _GArrowBooleanArrayClass
@@ -135,18 +167,23 @@ struct _GArrowBooleanArrayClass
GArrowPrimitiveArrayClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowBooleanArray *
garrow_boolean_array_new(gint64 length,
GArrowBuffer *data,
GArrowBuffer *null_bitmap,
gint64 n_nulls);
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_boolean_array_get_value(GArrowBooleanArray *array, gint64 i);
+
+GARROW_AVAILABLE_IN_ALL
gboolean *
garrow_boolean_array_get_values(GArrowBooleanArray *array, gint64 *length);
#define GARROW_TYPE_NUMERIC_ARRAY (garrow_numeric_array_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowNumericArray, garrow_numeric_array, GARROW, NUMERIC_ARRAY, GArrowPrimitiveArray)
struct _GArrowNumericArrayClass
@@ -155,6 +192,7 @@ struct _GArrowNumericArrayClass
};
#define GARROW_TYPE_INT8_ARRAY (garrow_int8_array_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowInt8Array, garrow_int8_array, GARROW, INT8_ARRAY, GArrowNumericArray)
struct _GArrowInt8ArrayClass
@@ -162,18 +200,23 @@ struct _GArrowInt8ArrayClass
GArrowNumericArrayClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowInt8Array *
garrow_int8_array_new(gint64 length,
GArrowBuffer *data,
GArrowBuffer *null_bitmap,
gint64 n_nulls);
+GARROW_AVAILABLE_IN_ALL
gint8
garrow_int8_array_get_value(GArrowInt8Array *array, gint64 i);
+
+GARROW_AVAILABLE_IN_ALL
const gint8 *
garrow_int8_array_get_values(GArrowInt8Array *array, gint64 *length);
#define GARROW_TYPE_UINT8_ARRAY (garrow_uint8_array_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowUInt8Array, garrow_uint8_array, GARROW, UINT8_ARRAY, GArrowNumericArray)
struct _GArrowUInt8ArrayClass
@@ -181,18 +224,23 @@ struct _GArrowUInt8ArrayClass
GArrowNumericArrayClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowUInt8Array *
garrow_uint8_array_new(gint64 length,
GArrowBuffer *data,
GArrowBuffer *null_bitmap,
gint64 n_nulls);
+GARROW_AVAILABLE_IN_ALL
guint8
garrow_uint8_array_get_value(GArrowUInt8Array *array, gint64 i);
+
+GARROW_AVAILABLE_IN_ALL
const guint8 *
garrow_uint8_array_get_values(GArrowUInt8Array *array, gint64 *length);
#define GARROW_TYPE_INT16_ARRAY (garrow_int16_array_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowInt16Array, garrow_int16_array, GARROW, INT16_ARRAY, GArrowNumericArray)
struct _GArrowInt16ArrayClass
@@ -200,18 +248,23 @@ struct _GArrowInt16ArrayClass
GArrowNumericArrayClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowInt16Array *
garrow_int16_array_new(gint64 length,
GArrowBuffer *data,
GArrowBuffer *null_bitmap,
gint64 n_nulls);
+GARROW_AVAILABLE_IN_ALL
gint16
garrow_int16_array_get_value(GArrowInt16Array *array, gint64 i);
+
+GARROW_AVAILABLE_IN_ALL
const gint16 *
garrow_int16_array_get_values(GArrowInt16Array *array, gint64 *length);
#define GARROW_TYPE_UINT16_ARRAY (garrow_uint16_array_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowUInt16Array, garrow_uint16_array, GARROW, UINT16_ARRAY, GArrowNumericArray)
struct _GArrowUInt16ArrayClass
@@ -219,18 +272,23 @@ struct _GArrowUInt16ArrayClass
GArrowNumericArrayClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowUInt16Array *
garrow_uint16_array_new(gint64 length,
GArrowBuffer *data,
GArrowBuffer *null_bitmap,
gint64 n_nulls);
+GARROW_AVAILABLE_IN_ALL
guint16
garrow_uint16_array_get_value(GArrowUInt16Array *array, gint64 i);
+
+GARROW_AVAILABLE_IN_ALL
const guint16 *
garrow_uint16_array_get_values(GArrowUInt16Array *array, gint64 *length);
#define GARROW_TYPE_INT32_ARRAY (garrow_int32_array_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowInt32Array, garrow_int32_array, GARROW, INT32_ARRAY, GArrowNumericArray)
struct _GArrowInt32ArrayClass
@@ -238,18 +296,23 @@ struct _GArrowInt32ArrayClass
GArrowNumericArrayClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowInt32Array *
garrow_int32_array_new(gint64 length,
GArrowBuffer *data,
GArrowBuffer *null_bitmap,
gint64 n_nulls);
+GARROW_AVAILABLE_IN_ALL
gint32
garrow_int32_array_get_value(GArrowInt32Array *array, gint64 i);
+
+GARROW_AVAILABLE_IN_ALL
const gint32 *
garrow_int32_array_get_values(GArrowInt32Array *array, gint64 *length);
#define GARROW_TYPE_UINT32_ARRAY (garrow_uint32_array_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowUInt32Array, garrow_uint32_array, GARROW, UINT32_ARRAY, GArrowNumericArray)
struct _GArrowUInt32ArrayClass
@@ -257,18 +320,23 @@ struct _GArrowUInt32ArrayClass
GArrowNumericArrayClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowUInt32Array *
garrow_uint32_array_new(gint64 length,
GArrowBuffer *data,
GArrowBuffer *null_bitmap,
gint64 n_nulls);
+GARROW_AVAILABLE_IN_ALL
guint32
garrow_uint32_array_get_value(GArrowUInt32Array *array, gint64 i);
+
+GARROW_AVAILABLE_IN_ALL
const guint32 *
garrow_uint32_array_get_values(GArrowUInt32Array *array, gint64 *length);
#define GARROW_TYPE_INT64_ARRAY (garrow_int64_array_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowInt64Array, garrow_int64_array, GARROW, INT64_ARRAY, GArrowNumericArray)
struct _GArrowInt64ArrayClass
@@ -276,18 +344,23 @@ struct _GArrowInt64ArrayClass
GArrowNumericArrayClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowInt64Array *
garrow_int64_array_new(gint64 length,
GArrowBuffer *data,
GArrowBuffer *null_bitmap,
gint64 n_nulls);
+GARROW_AVAILABLE_IN_ALL
gint64
garrow_int64_array_get_value(GArrowInt64Array *array, gint64 i);
+
+GARROW_AVAILABLE_IN_ALL
const gint64 *
garrow_int64_array_get_values(GArrowInt64Array *array, gint64 *length);
#define GARROW_TYPE_UINT64_ARRAY (garrow_uint64_array_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowUInt64Array, garrow_uint64_array, GARROW, UINT64_ARRAY, GArrowNumericArray)
struct _GArrowUInt64ArrayClass
@@ -295,18 +368,23 @@ struct _GArrowUInt64ArrayClass
GArrowNumericArrayClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowUInt64Array *
garrow_uint64_array_new(gint64 length,
GArrowBuffer *data,
GArrowBuffer *null_bitmap,
gint64 n_nulls);
+GARROW_AVAILABLE_IN_ALL
guint64
garrow_uint64_array_get_value(GArrowUInt64Array *array, gint64 i);
+
+GARROW_AVAILABLE_IN_ALL
const guint64 *
garrow_uint64_array_get_values(GArrowUInt64Array *array, gint64 *length);
#define GARROW_TYPE_HALF_FLOAT_ARRAY (garrow_half_float_array_get_type())
+GARROW_AVAILABLE_IN_11_0
G_DECLARE_DERIVABLE_TYPE(GArrowHalfFloatArray,
garrow_half_float_array,
GARROW,
@@ -332,6 +410,7 @@ const guint16 *
garrow_half_float_array_get_values(GArrowHalfFloatArray *array, gint64 *length);
#define GARROW_TYPE_FLOAT_ARRAY (garrow_float_array_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowFloatArray, garrow_float_array, GARROW, FLOAT_ARRAY, GArrowNumericArray)
struct _GArrowFloatArrayClass
@@ -339,18 +418,23 @@ struct _GArrowFloatArrayClass
GArrowNumericArrayClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowFloatArray *
garrow_float_array_new(gint64 length,
GArrowBuffer *data,
GArrowBuffer *null_bitmap,
gint64 n_nulls);
+GARROW_AVAILABLE_IN_ALL
gfloat
garrow_float_array_get_value(GArrowFloatArray *array, gint64 i);
+
+GARROW_AVAILABLE_IN_ALL
const gfloat *
garrow_float_array_get_values(GArrowFloatArray *array, gint64 *length);
#define GARROW_TYPE_DOUBLE_ARRAY (garrow_double_array_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowDoubleArray, garrow_double_array, GARROW, DOUBLE_ARRAY, GArrowNumericArray)
struct _GArrowDoubleArrayClass
@@ -358,18 +442,23 @@ struct _GArrowDoubleArrayClass
GArrowNumericArrayClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowDoubleArray *
garrow_double_array_new(gint64 length,
GArrowBuffer *data,
GArrowBuffer *null_bitmap,
gint64 n_nulls);
+GARROW_AVAILABLE_IN_ALL
gdouble
garrow_double_array_get_value(GArrowDoubleArray *array, gint64 i);
+
+GARROW_AVAILABLE_IN_ALL
const gdouble *
garrow_double_array_get_values(GArrowDoubleArray *array, gint64 *length);
#define GARROW_TYPE_BINARY_ARRAY (garrow_binary_array_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowBinaryArray, garrow_binary_array, GARROW, BINARY_ARRAY, GArrowArray)
struct _GArrowBinaryArrayClass
@@ -377,6 +466,7 @@ struct _GArrowBinaryArrayClass
GArrowArrayClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowBinaryArray *
garrow_binary_array_new(gint64 length,
GArrowBuffer *value_offsets,
@@ -384,9 +474,12 @@ garrow_binary_array_new(gint64 length,
GArrowBuffer *null_bitmap,
gint64 n_nulls);
+GARROW_AVAILABLE_IN_ALL
GBytes *
garrow_binary_array_get_value(GArrowBinaryArray *array, gint64 i);
+
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_1_0_FOR(garrow_binary_array_get_data_buffer)
GArrowBuffer *
garrow_binary_array_get_buffer(GArrowBinaryArray *array);
@@ -394,10 +487,13 @@ garrow_binary_array_get_buffer(GArrowBinaryArray *array);
GARROW_AVAILABLE_IN_1_0
GArrowBuffer *
garrow_binary_array_get_data_buffer(GArrowBinaryArray *array);
+
+GARROW_AVAILABLE_IN_ALL
GArrowBuffer *
garrow_binary_array_get_offsets_buffer(GArrowBinaryArray *array);
#define GARROW_TYPE_LARGE_BINARY_ARRAY (garrow_large_binary_array_get_type())
+GARROW_AVAILABLE_IN_0_16
G_DECLARE_DERIVABLE_TYPE(GArrowLargeBinaryArray,
garrow_large_binary_array,
GARROW,
@@ -428,11 +524,13 @@ garrow_large_binary_array_get_buffer(GArrowLargeBinaryArray *array);
GARROW_AVAILABLE_IN_1_0
GArrowBuffer *
garrow_large_binary_array_get_data_buffer(GArrowLargeBinaryArray *array);
+
GARROW_AVAILABLE_IN_0_16
GArrowBuffer *
garrow_large_binary_array_get_offsets_buffer(GArrowLargeBinaryArray *array);
#define GARROW_TYPE_STRING_ARRAY (garrow_string_array_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowStringArray, garrow_string_array, GARROW, STRING_ARRAY, GArrowBinaryArray)
struct _GArrowStringArrayClass
@@ -440,6 +538,7 @@ struct _GArrowStringArrayClass
GArrowBinaryArrayClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowStringArray *
garrow_string_array_new(gint64 length,
GArrowBuffer *value_offsets,
@@ -447,10 +546,12 @@ garrow_string_array_new(gint64 length,
GArrowBuffer *null_bitmap,
gint64 n_nulls);
+GARROW_AVAILABLE_IN_ALL
gchar *
garrow_string_array_get_string(GArrowStringArray *array, gint64 i);
#define GARROW_TYPE_LARGE_STRING_ARRAY (garrow_large_string_array_get_type())
+GARROW_AVAILABLE_IN_0_16
G_DECLARE_DERIVABLE_TYPE(GArrowLargeStringArray,
garrow_large_string_array,
GARROW,
@@ -474,6 +575,7 @@ gchar *
garrow_large_string_array_get_string(GArrowLargeStringArray *array, gint64 i);
#define GARROW_TYPE_DATE32_ARRAY (garrow_date32_array_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowDate32Array, garrow_date32_array, GARROW, DATE32_ARRAY, GArrowNumericArray)
struct _GArrowDate32ArrayClass
@@ -481,18 +583,23 @@ struct _GArrowDate32ArrayClass
GArrowNumericArrayClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowDate32Array *
garrow_date32_array_new(gint64 length,
GArrowBuffer *data,
GArrowBuffer *null_bitmap,
gint64 n_nulls);
+GARROW_AVAILABLE_IN_ALL
gint32
garrow_date32_array_get_value(GArrowDate32Array *array, gint64 i);
+
+GARROW_AVAILABLE_IN_ALL
const gint32 *
garrow_date32_array_get_values(GArrowDate32Array *array, gint64 *length);
#define GARROW_TYPE_DATE64_ARRAY (garrow_date64_array_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowDate64Array, garrow_date64_array, GARROW, DATE64_ARRAY, GArrowNumericArray)
struct _GArrowDate64ArrayClass
@@ -500,18 +607,23 @@ struct _GArrowDate64ArrayClass
GArrowNumericArrayClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowDate64Array *
garrow_date64_array_new(gint64 length,
GArrowBuffer *data,
GArrowBuffer *null_bitmap,
gint64 n_nulls);
+GARROW_AVAILABLE_IN_ALL
gint64
garrow_date64_array_get_value(GArrowDate64Array *array, gint64 i);
+
+GARROW_AVAILABLE_IN_ALL
const gint64 *
garrow_date64_array_get_values(GArrowDate64Array *array, gint64 *length);
#define GARROW_TYPE_TIMESTAMP_ARRAY (garrow_timestamp_array_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowTimestampArray,
garrow_timestamp_array,
GARROW,
@@ -522,6 +634,7 @@ struct _GArrowTimestampArrayClass
GArrowNumericArrayClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowTimestampArray *
garrow_timestamp_array_new(GArrowTimestampDataType *data_type,
gint64 length,
@@ -529,12 +642,16 @@ garrow_timestamp_array_new(GArrowTimestampDataType *data_type,
GArrowBuffer *null_bitmap,
gint64 n_nulls);
+GARROW_AVAILABLE_IN_ALL
gint64
garrow_timestamp_array_get_value(GArrowTimestampArray *array, gint64 i);
+
+GARROW_AVAILABLE_IN_ALL
const gint64 *
garrow_timestamp_array_get_values(GArrowTimestampArray *array, gint64 *length);
#define GARROW_TYPE_TIME32_ARRAY (garrow_time32_array_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowTime32Array, garrow_time32_array, GARROW, TIME32_ARRAY, GArrowNumericArray)
struct _GArrowTime32ArrayClass
@@ -542,6 +659,7 @@ struct _GArrowTime32ArrayClass
GArrowNumericArrayClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowTime32Array *
garrow_time32_array_new(GArrowTime32DataType *data_type,
gint64 length,
@@ -549,12 +667,16 @@ garrow_time32_array_new(GArrowTime32DataType *data_type,
GArrowBuffer *null_bitmap,
gint64 n_nulls);
+GARROW_AVAILABLE_IN_ALL
gint32
garrow_time32_array_get_value(GArrowTime32Array *array, gint64 i);
+
+GARROW_AVAILABLE_IN_ALL
const gint32 *
garrow_time32_array_get_values(GArrowTime32Array *array, gint64 *length);
#define GARROW_TYPE_TIME64_ARRAY (garrow_time64_array_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowTime64Array, garrow_time64_array, GARROW, TIME64_ARRAY, GArrowNumericArray)
struct _GArrowTime64ArrayClass
@@ -562,6 +684,7 @@ struct _GArrowTime64ArrayClass
GArrowNumericArrayClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowTime64Array *
garrow_time64_array_new(GArrowTime64DataType *data_type,
gint64 length,
@@ -569,12 +692,16 @@ garrow_time64_array_new(GArrowTime64DataType *data_type,
GArrowBuffer *null_bitmap,
gint64 n_nulls);
+GARROW_AVAILABLE_IN_ALL
gint64
garrow_time64_array_get_value(GArrowTime64Array *array, gint64 i);
+
+GARROW_AVAILABLE_IN_ALL
const gint64 *
garrow_time64_array_get_values(GArrowTime64Array *array, gint64 *length);
#define GARROW_TYPE_MONTH_INTERVAL_ARRAY (garrow_month_interval_array_get_type())
+GARROW_AVAILABLE_IN_8_0
G_DECLARE_DERIVABLE_TYPE(GArrowMonthIntervalArray,
garrow_month_interval_array,
GARROW,
@@ -594,11 +721,13 @@ garrow_month_interval_array_new(gint64 length,
GARROW_AVAILABLE_IN_8_0
gint32
garrow_month_interval_array_get_value(GArrowMonthIntervalArray *array, gint64 i);
+
GARROW_AVAILABLE_IN_8_0
const gint32 *
garrow_month_interval_array_get_values(GArrowMonthIntervalArray *array, gint64 *length);
#define GARROW_TYPE_DAY_TIME_INTERVAL_ARRAY (garrow_day_time_interval_array_get_type())
+GARROW_AVAILABLE_IN_8_0
G_DECLARE_DERIVABLE_TYPE(GArrowDayTimeIntervalArray,
garrow_day_time_interval_array,
GARROW,
@@ -618,12 +747,14 @@ garrow_day_time_interval_array_new(gint64 length,
GARROW_AVAILABLE_IN_8_0
GArrowDayMillisecond *
garrow_day_time_interval_array_get_value(GArrowDayTimeIntervalArray *array, gint64 i);
+
GARROW_AVAILABLE_IN_8_0
GList *
garrow_day_time_interval_array_get_values(GArrowDayTimeIntervalArray *array);
#define GARROW_TYPE_MONTH_DAY_NANO_INTERVAL_ARRAY \
(garrow_month_day_nano_interval_array_get_type())
+GARROW_AVAILABLE_IN_8_0
G_DECLARE_DERIVABLE_TYPE(GArrowMonthDayNanoIntervalArray,
garrow_month_day_nano_interval_array,
GARROW,
@@ -649,6 +780,7 @@ GList *
garrow_month_day_nano_interval_array_get_values(GArrowMonthDayNanoIntervalArray *array);
#define GARROW_TYPE_FIXED_SIZE_BINARY_ARRAY (garrow_fixed_size_binary_array_get_type())
+GARROW_AVAILABLE_IN_3_0
G_DECLARE_DERIVABLE_TYPE(GArrowFixedSizeBinaryArray,
garrow_fixed_size_binary_array,
GARROW,
@@ -669,14 +801,17 @@ garrow_fixed_size_binary_array_new(GArrowFixedSizeBinaryDataType *data_type,
GARROW_AVAILABLE_IN_3_0
gint32
garrow_fixed_size_binary_array_get_byte_width(GArrowFixedSizeBinaryArray *array);
+
GARROW_AVAILABLE_IN_3_0
GBytes *
garrow_fixed_size_binary_array_get_value(GArrowFixedSizeBinaryArray *array, gint64 i);
+
GARROW_AVAILABLE_IN_3_0
GBytes *
garrow_fixed_size_binary_array_get_values_bytes(GArrowFixedSizeBinaryArray *array);
#define GARROW_TYPE_DECIMAL128_ARRAY (garrow_decimal128_array_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowDecimal128Array,
garrow_decimal128_array,
GARROW,
@@ -687,12 +822,16 @@ struct _GArrowDecimal128ArrayClass
GArrowFixedSizeBinaryArrayClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
gchar *
garrow_decimal128_array_format_value(GArrowDecimal128Array *array, gint64 i);
+
+GARROW_AVAILABLE_IN_ALL
GArrowDecimal128 *
garrow_decimal128_array_get_value(GArrowDecimal128Array *array, gint64 i);
#define GARROW_TYPE_DECIMAL256_ARRAY (garrow_decimal256_array_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowDecimal256Array,
garrow_decimal256_array,
GARROW,
@@ -703,8 +842,11 @@ struct _GArrowDecimal256ArrayClass
GArrowFixedSizeBinaryArrayClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
gchar *
garrow_decimal256_array_format_value(GArrowDecimal256Array *array, gint64 i);
+
+GARROW_AVAILABLE_IN_ALL
GArrowDecimal256 *
garrow_decimal256_array_get_value(GArrowDecimal256Array *array, gint64 i);
diff --git a/c_glib/arrow-glib/basic-array.hpp b/c_glib/arrow-glib/basic-array.hpp
index f010cf3db4bc3..b2a7ed6ae075f 100644
--- a/c_glib/arrow-glib/basic-array.hpp
+++ b/c_glib/arrow-glib/basic-array.hpp
@@ -23,22 +23,32 @@
#include
+GARROW_EXTERN
arrow::EqualOptions *
garrow_equal_options_get_raw(GArrowEqualOptions *equal_options);
+GARROW_EXTERN
GArrowArray *
garrow_array_new_raw(std::shared_ptr *arrow_array);
+
+GARROW_EXTERN
GArrowArray *
garrow_array_new_raw(std::shared_ptr *arrow_array,
const gchar *first_property_name,
...);
+
+GARROW_EXTERN
GArrowArray *
garrow_array_new_raw_valist(std::shared_ptr *arrow_array,
const gchar *first_property_name,
va_list args);
+
+GARROW_EXTERN
GArrowExtensionArray *
garrow_extension_array_new_raw(std::shared_ptr *arrow_array,
GArrowArray *storage);
+
+GARROW_EXTERN
std::shared_ptr
garrow_array_get_raw(GArrowArray *array);
diff --git a/c_glib/arrow-glib/basic-data-type.cpp b/c_glib/arrow-glib/basic-data-type.cpp
index 36646a9733cd3..d1c06000065dc 100644
--- a/c_glib/arrow-glib/basic-data-type.cpp
+++ b/c_glib/arrow-glib/basic-data-type.cpp
@@ -1801,6 +1801,8 @@ garrow_extension_data_type_wrap_chunked_array(GArrowExtensionDataType *data_type
return garrow_chunked_array_new_raw(&arrow_extension_chunked_array);
}
+G_END_DECLS
+
static std::shared_ptr
garrow_extension_data_type_get_storage_data_type_raw(GArrowExtensionDataType *data_type)
{
@@ -1808,8 +1810,6 @@ garrow_extension_data_type_get_storage_data_type_raw(GArrowExtensionDataType *da
return garrow_data_type_get_raw(priv->storage_data_type);
}
-G_END_DECLS
-
namespace garrow {
GExtensionType::GExtensionType(GArrowExtensionDataType *garrow_data_type)
: arrow::ExtensionType(
diff --git a/c_glib/arrow-glib/basic-data-type.h b/c_glib/arrow-glib/basic-data-type.h
index 01c9e5ef6e40a..77180018c9be8 100644
--- a/c_glib/arrow-glib/basic-data-type.h
+++ b/c_glib/arrow-glib/basic-data-type.h
@@ -28,6 +28,7 @@
G_BEGIN_DECLS
#define GARROW_TYPE_DATA_TYPE (garrow_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowDataType, garrow_data_type, GARROW, DATA_TYPE, GObject)
struct _GArrowDataTypeClass
{
@@ -42,17 +43,24 @@ GARROW_AVAILABLE_IN_6_0
gpointer
garrow_data_type_export(GArrowDataType *data_type, GError **error);
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_data_type_equal(GArrowDataType *data_type, GArrowDataType *other_data_type);
+
+GARROW_AVAILABLE_IN_ALL
gchar *
garrow_data_type_to_string(GArrowDataType *data_type);
+
+GARROW_AVAILABLE_IN_ALL
GArrowType
garrow_data_type_get_id(GArrowDataType *data_type);
+
GARROW_AVAILABLE_IN_3_0
gchar *
garrow_data_type_get_name(GArrowDataType *data_type);
#define GARROW_TYPE_FIXED_WIDTH_DATA_TYPE (garrow_fixed_width_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowFixedWidthDataType,
garrow_fixed_width_data_type,
GARROW,
@@ -63,6 +71,7 @@ struct _GArrowFixedWidthDataTypeClass
GArrowDataTypeClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
gint
garrow_fixed_width_data_type_get_bit_width(GArrowFixedWidthDataType *data_type);
/* TODO:
@@ -71,6 +80,7 @@ GList *garrow_fixed_width_data_type_get_buffer_layout(GArrowFixedWidthDataType
*/
#define GARROW_TYPE_NULL_DATA_TYPE (garrow_null_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowNullDataType, garrow_null_data_type, GARROW, NULL_DATA_TYPE, GArrowDataType)
struct _GArrowNullDataTypeClass
@@ -78,10 +88,12 @@ struct _GArrowNullDataTypeClass
GArrowDataTypeClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowNullDataType *
garrow_null_data_type_new(void);
#define GARROW_TYPE_BOOLEAN_DATA_TYPE (garrow_boolean_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowBooleanDataType,
garrow_boolean_data_type,
GARROW,
@@ -92,10 +104,12 @@ struct _GArrowBooleanDataTypeClass
GArrowFixedWidthDataTypeClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowBooleanDataType *
garrow_boolean_data_type_new(void);
#define GARROW_TYPE_NUMERIC_DATA_TYPE (garrow_numeric_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowNumericDataType,
garrow_numeric_data_type,
GARROW,
@@ -107,6 +121,7 @@ struct _GArrowNumericDataTypeClass
};
#define GARROW_TYPE_INTEGER_DATA_TYPE (garrow_integer_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowIntegerDataType,
garrow_integer_data_type,
GARROW,
@@ -122,6 +137,7 @@ gboolean
garrow_integer_data_type_is_signed(GArrowIntegerDataType *data_type);
#define GARROW_TYPE_INT8_DATA_TYPE (garrow_int8_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowInt8DataType,
garrow_int8_data_type,
GARROW,
@@ -132,10 +148,12 @@ struct _GArrowInt8DataTypeClass
GArrowIntegerDataTypeClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowInt8DataType *
garrow_int8_data_type_new(void);
#define GARROW_TYPE_UINT8_DATA_TYPE (garrow_uint8_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowUInt8DataType,
garrow_uint8_data_type,
GARROW,
@@ -146,10 +164,12 @@ struct _GArrowUInt8DataTypeClass
GArrowIntegerDataTypeClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowUInt8DataType *
garrow_uint8_data_type_new(void);
#define GARROW_TYPE_INT16_DATA_TYPE (garrow_int16_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowInt16DataType,
garrow_int16_data_type,
GARROW,
@@ -160,10 +180,12 @@ struct _GArrowInt16DataTypeClass
GArrowIntegerDataTypeClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowInt16DataType *
garrow_int16_data_type_new(void);
#define GARROW_TYPE_UINT16_DATA_TYPE (garrow_uint16_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowUInt16DataType,
garrow_uint16_data_type,
GARROW,
@@ -174,10 +196,12 @@ struct _GArrowUInt16DataTypeClass
GArrowIntegerDataTypeClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowUInt16DataType *
garrow_uint16_data_type_new(void);
#define GARROW_TYPE_INT32_DATA_TYPE (garrow_int32_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowInt32DataType,
garrow_int32_data_type,
GARROW,
@@ -188,10 +212,12 @@ struct _GArrowInt32DataTypeClass
GArrowIntegerDataTypeClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowInt32DataType *
garrow_int32_data_type_new(void);
#define GARROW_TYPE_UINT32_DATA_TYPE (garrow_uint32_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowUInt32DataType,
garrow_uint32_data_type,
GARROW,
@@ -202,10 +228,12 @@ struct _GArrowUInt32DataTypeClass
GArrowIntegerDataTypeClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowUInt32DataType *
garrow_uint32_data_type_new(void);
#define GARROW_TYPE_INT64_DATA_TYPE (garrow_int64_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowInt64DataType,
garrow_int64_data_type,
GARROW,
@@ -216,10 +244,12 @@ struct _GArrowInt64DataTypeClass
GArrowIntegerDataTypeClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowInt64DataType *
garrow_int64_data_type_new(void);
#define GARROW_TYPE_UINT64_DATA_TYPE (garrow_uint64_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowUInt64DataType,
garrow_uint64_data_type,
GARROW,
@@ -230,10 +260,12 @@ struct _GArrowUInt64DataTypeClass
GArrowIntegerDataTypeClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowUInt64DataType *
garrow_uint64_data_type_new(void);
#define GARROW_TYPE_FLOATING_POINT_DATA_TYPE (garrow_floating_point_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowFloatingPointDataType,
garrow_floating_point_data_type,
GARROW,
@@ -245,6 +277,7 @@ struct _GArrowFloatingPointDataTypeClass
};
#define GARROW_TYPE_HALF_FLOAT_DATA_TYPE (garrow_half_float_data_type_get_type())
+GARROW_AVAILABLE_IN_11_0
G_DECLARE_DERIVABLE_TYPE(GArrowHalfFloatDataType,
garrow_half_float_data_type,
GARROW,
@@ -260,6 +293,7 @@ GArrowHalfFloatDataType *
garrow_half_float_data_type_new(void);
#define GARROW_TYPE_FLOAT_DATA_TYPE (garrow_float_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowFloatDataType,
garrow_float_data_type,
GARROW,
@@ -270,10 +304,12 @@ struct _GArrowFloatDataTypeClass
GArrowFloatingPointDataTypeClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowFloatDataType *
garrow_float_data_type_new(void);
#define GARROW_TYPE_DOUBLE_DATA_TYPE (garrow_double_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowDoubleDataType,
garrow_double_data_type,
GARROW,
@@ -284,10 +320,12 @@ struct _GArrowDoubleDataTypeClass
GArrowFloatingPointDataTypeClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowDoubleDataType *
garrow_double_data_type_new(void);
#define GARROW_TYPE_BINARY_DATA_TYPE (garrow_binary_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowBinaryDataType, garrow_binary_data_type, GARROW, BINARY_DATA_TYPE, GArrowDataType)
struct _GArrowBinaryDataTypeClass
@@ -295,11 +333,13 @@ struct _GArrowBinaryDataTypeClass
GArrowDataTypeClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowBinaryDataType *
garrow_binary_data_type_new(void);
#define GARROW_TYPE_FIXED_SIZE_BINARY_DATA_TYPE \
(garrow_fixed_size_binary_data_type_get_type())
+GARROW_AVAILABLE_IN_0_12
G_DECLARE_DERIVABLE_TYPE(GArrowFixedSizeBinaryDataType,
garrow_fixed_size_binary_data_type,
GARROW,
@@ -319,6 +359,7 @@ garrow_fixed_size_binary_data_type_get_byte_width(
GArrowFixedSizeBinaryDataType *data_type);
#define GARROW_TYPE_LARGE_BINARY_DATA_TYPE (garrow_large_binary_data_type_get_type())
+GARROW_AVAILABLE_IN_0_17
G_DECLARE_DERIVABLE_TYPE(GArrowLargeBinaryDataType,
garrow_large_binary_data_type,
GARROW,
@@ -334,6 +375,7 @@ GArrowLargeBinaryDataType *
garrow_large_binary_data_type_new(void);
#define GARROW_TYPE_STRING_DATA_TYPE (garrow_string_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowStringDataType,
garrow_string_data_type,
GARROW,
@@ -344,10 +386,12 @@ struct _GArrowStringDataTypeClass
GArrowBinaryDataTypeClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowStringDataType *
garrow_string_data_type_new(void);
#define GARROW_TYPE_LARGE_STRING_DATA_TYPE (garrow_large_string_data_type_get_type())
+GARROW_AVAILABLE_IN_0_17
G_DECLARE_DERIVABLE_TYPE(GArrowLargeStringDataType,
garrow_large_string_data_type,
GARROW,
@@ -363,6 +407,7 @@ GArrowLargeStringDataType *
garrow_large_string_data_type_new(void);
#define GARROW_TYPE_TEMPORAL_DATA_TYPE (garrow_temporal_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowTemporalDataType,
garrow_temporal_data_type,
GARROW,
@@ -374,6 +419,7 @@ struct _GArrowTemporalDataTypeClass
};
#define GARROW_TYPE_DATE32_DATA_TYPE (garrow_date32_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowDate32DataType,
garrow_date32_data_type,
GARROW,
@@ -384,10 +430,12 @@ struct _GArrowDate32DataTypeClass
GArrowTemporalDataTypeClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowDate32DataType *
garrow_date32_data_type_new(void);
#define GARROW_TYPE_DATE64_DATA_TYPE (garrow_date64_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowDate64DataType,
garrow_date64_data_type,
GARROW,
@@ -398,10 +446,12 @@ struct _GArrowDate64DataTypeClass
GArrowTemporalDataTypeClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowDate64DataType *
garrow_date64_data_type_new(void);
#define GARROW_TYPE_TIMESTAMP_DATA_TYPE (garrow_timestamp_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowTimestampDataType,
garrow_timestamp_data_type,
GARROW,
@@ -412,12 +462,16 @@ struct _GArrowTimestampDataTypeClass
GArrowTemporalDataTypeClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowTimestampDataType *
garrow_timestamp_data_type_new(GArrowTimeUnit unit, GTimeZone *time_zone);
+
+GARROW_AVAILABLE_IN_ALL
GArrowTimeUnit
garrow_timestamp_data_type_get_unit(GArrowTimestampDataType *data_type);
#define GARROW_TYPE_TIME_DATA_TYPE (garrow_time_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowTimeDataType,
garrow_time_data_type,
GARROW,
@@ -428,10 +482,12 @@ struct _GArrowTimeDataTypeClass
GArrowTemporalDataTypeClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowTimeUnit
garrow_time_data_type_get_unit(GArrowTimeDataType *time_data_type);
#define GARROW_TYPE_TIME32_DATA_TYPE (garrow_time32_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowTime32DataType,
garrow_time32_data_type,
GARROW,
@@ -442,10 +498,12 @@ struct _GArrowTime32DataTypeClass
GArrowTimeDataTypeClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowTime32DataType *
garrow_time32_data_type_new(GArrowTimeUnit unit, GError **error);
#define GARROW_TYPE_TIME64_DATA_TYPE (garrow_time64_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowTime64DataType,
garrow_time64_data_type,
GARROW,
@@ -456,10 +514,12 @@ struct _GArrowTime64DataTypeClass
GArrowTimeDataTypeClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowTime64DataType *
garrow_time64_data_type_new(GArrowTimeUnit unit, GError **error);
#define GARROW_TYPE_INTERVAL_DATA_TYPE (garrow_interval_data_type_get_type())
+GARROW_AVAILABLE_IN_7_0
G_DECLARE_DERIVABLE_TYPE(GArrowIntervalDataType,
garrow_interval_data_type,
GARROW,
@@ -475,6 +535,7 @@ GArrowIntervalType
garrow_interval_data_type_get_interval_type(GArrowIntervalDataType *type);
#define GARROW_TYPE_MONTH_INTERVAL_DATA_TYPE (garrow_month_interval_data_type_get_type())
+GARROW_AVAILABLE_IN_7_0
G_DECLARE_DERIVABLE_TYPE(GArrowMonthIntervalDataType,
garrow_month_interval_data_type,
GARROW,
@@ -491,6 +552,7 @@ garrow_month_interval_data_type_new(void);
#define GARROW_TYPE_DAY_TIME_INTERVAL_DATA_TYPE \
(garrow_day_time_interval_data_type_get_type())
+GARROW_AVAILABLE_IN_7_0
G_DECLARE_DERIVABLE_TYPE(GArrowDayTimeIntervalDataType,
garrow_day_time_interval_data_type,
GARROW,
@@ -507,6 +569,7 @@ garrow_day_time_interval_data_type_new(void);
#define GARROW_TYPE_MONTH_DAY_NANO_INTERVAL_DATA_TYPE \
(garrow_month_day_nano_interval_data_type_get_type())
+GARROW_AVAILABLE_IN_7_0
G_DECLARE_DERIVABLE_TYPE(GArrowMonthDayNanoIntervalDataType,
garrow_month_day_nano_interval_data_type,
GARROW,
@@ -522,6 +585,7 @@ GArrowMonthDayNanoIntervalDataType *
garrow_month_day_nano_interval_data_type_new(void);
#define GARROW_TYPE_DECIMAL_DATA_TYPE (garrow_decimal_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowDecimalDataType,
garrow_decimal_data_type,
GARROW,
@@ -532,14 +596,20 @@ struct _GArrowDecimalDataTypeClass
GArrowFixedSizeBinaryDataTypeClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowDecimalDataType *
garrow_decimal_data_type_new(gint32 precision, gint32 scale, GError **error);
+
+GARROW_AVAILABLE_IN_ALL
gint32
garrow_decimal_data_type_get_precision(GArrowDecimalDataType *decimal_data_type);
+
+GARROW_AVAILABLE_IN_ALL
gint32
garrow_decimal_data_type_get_scale(GArrowDecimalDataType *decimal_data_type);
#define GARROW_TYPE_DECIMAL128_DATA_TYPE (garrow_decimal128_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowDecimal128DataType,
garrow_decimal128_data_type,
GARROW,
@@ -559,6 +629,7 @@ GArrowDecimal128DataType *
garrow_decimal128_data_type_new(gint32 precision, gint32 scale, GError **error);
#define GARROW_TYPE_DECIMAL256_DATA_TYPE (garrow_decimal256_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowDecimal256DataType,
garrow_decimal256_data_type,
GARROW,
@@ -578,6 +649,7 @@ GArrowDecimal256DataType *
garrow_decimal256_data_type_new(gint32 precision, gint32 scale, GError **error);
#define GARROW_TYPE_EXTENSION_DATA_TYPE (garrow_extension_data_type_get_type())
+GARROW_AVAILABLE_IN_3_0
G_DECLARE_DERIVABLE_TYPE(GArrowExtensionDataType,
garrow_extension_data_type,
GARROW,
@@ -628,6 +700,7 @@ garrow_extension_data_type_wrap_chunked_array(GArrowExtensionDataType *data_type
#define GARROW_TYPE_EXTENSION_DATA_TYPE_REGISTRY \
(garrow_extension_data_type_registry_get_type())
+GARROW_AVAILABLE_IN_3_0
G_DECLARE_DERIVABLE_TYPE(GArrowExtensionDataTypeRegistry,
garrow_extension_data_type_registry,
GARROW,
diff --git a/c_glib/arrow-glib/buffer.h b/c_glib/arrow-glib/buffer.h
index 8f93a5ef0ddb2..29308e935aba2 100644
--- a/c_glib/arrow-glib/buffer.h
+++ b/c_glib/arrow-glib/buffer.h
@@ -21,44 +21,70 @@
#include
+#include
+
G_BEGIN_DECLS
#define GARROW_TYPE_BUFFER (garrow_buffer_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowBuffer, garrow_buffer, GARROW, BUFFER, GObject)
struct _GArrowBufferClass
{
GObjectClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowBuffer *
garrow_buffer_new(const guint8 *data, gint64 size);
+
+GARROW_AVAILABLE_IN_ALL
GArrowBuffer *
garrow_buffer_new_bytes(GBytes *data);
+
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_buffer_equal(GArrowBuffer *buffer, GArrowBuffer *other_buffer);
+
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_buffer_equal_n_bytes(GArrowBuffer *buffer,
GArrowBuffer *other_buffer,
gint64 n_bytes);
+
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_buffer_is_mutable(GArrowBuffer *buffer);
+
+GARROW_AVAILABLE_IN_ALL
gint64
garrow_buffer_get_capacity(GArrowBuffer *buffer);
+
+GARROW_AVAILABLE_IN_ALL
GBytes *
garrow_buffer_get_data(GArrowBuffer *buffer);
+
+GARROW_AVAILABLE_IN_ALL
GBytes *
garrow_buffer_get_mutable_data(GArrowBuffer *buffer);
+
+GARROW_AVAILABLE_IN_ALL
gint64
garrow_buffer_get_size(GArrowBuffer *buffer);
+
+GARROW_AVAILABLE_IN_ALL
GArrowBuffer *
garrow_buffer_get_parent(GArrowBuffer *buffer);
+GARROW_AVAILABLE_IN_ALL
GArrowBuffer *
garrow_buffer_copy(GArrowBuffer *buffer, gint64 start, gint64 size, GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GArrowBuffer *
garrow_buffer_slice(GArrowBuffer *buffer, gint64 offset, gint64 size);
#define GARROW_TYPE_MUTABLE_BUFFER (garrow_mutable_buffer_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowMutableBuffer, garrow_mutable_buffer, GARROW, MUTABLE_BUFFER, GArrowBuffer)
struct _GArrowMutableBufferClass
@@ -66,12 +92,19 @@ struct _GArrowMutableBufferClass
GArrowBufferClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowMutableBuffer *
garrow_mutable_buffer_new(guint8 *data, gint64 size);
+
+GARROW_AVAILABLE_IN_ALL
GArrowMutableBuffer *
garrow_mutable_buffer_new_bytes(GBytes *data);
+
+GARROW_AVAILABLE_IN_ALL
GArrowMutableBuffer *
garrow_mutable_buffer_slice(GArrowMutableBuffer *buffer, gint64 offset, gint64 size);
+
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_mutable_buffer_set_data(GArrowMutableBuffer *buffer,
gint64 offset,
@@ -80,6 +113,7 @@ garrow_mutable_buffer_set_data(GArrowMutableBuffer *buffer,
GError **error);
#define GARROW_TYPE_RESIZABLE_BUFFER (garrow_resizable_buffer_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowResizableBuffer,
garrow_resizable_buffer,
GARROW,
@@ -90,12 +124,17 @@ struct _GArrowResizableBufferClass
GArrowMutableBufferClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowResizableBuffer *
garrow_resizable_buffer_new(gint64 initial_size, GError **error);
+
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_resizable_buffer_resize(GArrowResizableBuffer *buffer,
gint64 new_size,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_resizable_buffer_reserve(GArrowResizableBuffer *buffer,
gint64 new_capacity,
diff --git a/c_glib/arrow-glib/buffer.hpp b/c_glib/arrow-glib/buffer.hpp
index 5d922371c3b6b..7e4d7ecee1c1c 100644
--- a/c_glib/arrow-glib/buffer.hpp
+++ b/c_glib/arrow-glib/buffer.hpp
@@ -23,20 +23,32 @@
#include
+GARROW_EXTERN
GArrowBuffer *
garrow_buffer_new_raw(std::shared_ptr *arrow_buffer);
+
+GARROW_EXTERN
GArrowBuffer *
garrow_buffer_new_raw_bytes(std::shared_ptr *arrow_buffer, GBytes *data);
+
+GARROW_EXTERN
GArrowBuffer *
garrow_buffer_new_raw_parent(std::shared_ptr *arrow_buffer,
GArrowBuffer *parent);
+
+GARROW_EXTERN
std::shared_ptr
garrow_buffer_get_raw(GArrowBuffer *buffer);
+GARROW_EXTERN
GArrowMutableBuffer *
garrow_mutable_buffer_new_raw(std::shared_ptr *arrow_buffer);
+
+GARROW_EXTERN
GArrowMutableBuffer *
garrow_mutable_buffer_new_raw_bytes(std::shared_ptr *arrow_buffer,
GBytes *data);
+
+GARROW_EXTERN
GArrowResizableBuffer *
garrow_resizable_buffer_new_raw(std::shared_ptr *arrow_buffer);
diff --git a/c_glib/arrow-glib/chunked-array-definition.h b/c_glib/arrow-glib/chunked-array-definition.h
index b687735419eeb..744f1077ea754 100644
--- a/c_glib/arrow-glib/chunked-array-definition.h
+++ b/c_glib/arrow-glib/chunked-array-definition.h
@@ -24,6 +24,7 @@
G_BEGIN_DECLS
#define GARROW_TYPE_CHUNKED_ARRAY (garrow_chunked_array_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowChunkedArray, garrow_chunked_array, GARROW, CHUNKED_ARRAY, GObject)
struct _GArrowChunkedArrayClass
diff --git a/c_glib/arrow-glib/chunked-array.h b/c_glib/arrow-glib/chunked-array.h
index 6ca497942ff2e..712d16504f624 100644
--- a/c_glib/arrow-glib/chunked-array.h
+++ b/c_glib/arrow-glib/chunked-array.h
@@ -24,42 +24,61 @@
G_BEGIN_DECLS
+GARROW_AVAILABLE_IN_ALL
GArrowChunkedArray *
garrow_chunked_array_new(GList *chunks, GError **error);
+
GARROW_AVAILABLE_IN_11_0
GArrowChunkedArray *
garrow_chunked_array_new_empty(GArrowDataType *data_type, GError **error);
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_chunked_array_equal(GArrowChunkedArray *chunked_array,
GArrowChunkedArray *other_chunked_array);
+GARROW_AVAILABLE_IN_ALL
GArrowDataType *
garrow_chunked_array_get_value_data_type(GArrowChunkedArray *chunked_array);
+
+GARROW_AVAILABLE_IN_ALL
GArrowType
garrow_chunked_array_get_value_type(GArrowChunkedArray *chunked_array);
GARROW_DEPRECATED_IN_0_15_FOR(garrow_chunked_array_get_n_rows)
guint64
garrow_chunked_array_get_length(GArrowChunkedArray *chunked_array);
+
GARROW_AVAILABLE_IN_0_15
guint64
garrow_chunked_array_get_n_rows(GArrowChunkedArray *chunked_array);
+
+GARROW_AVAILABLE_IN_ALL
guint64
garrow_chunked_array_get_n_nulls(GArrowChunkedArray *chunked_array);
+
+GARROW_AVAILABLE_IN_ALL
guint
garrow_chunked_array_get_n_chunks(GArrowChunkedArray *chunked_array);
+GARROW_AVAILABLE_IN_ALL
GArrowArray *
garrow_chunked_array_get_chunk(GArrowChunkedArray *chunked_array, guint i);
+
+GARROW_AVAILABLE_IN_ALL
GList *
garrow_chunked_array_get_chunks(GArrowChunkedArray *chunked_array);
+
+GARROW_AVAILABLE_IN_ALL
GArrowChunkedArray *
garrow_chunked_array_slice(GArrowChunkedArray *chunked_array,
guint64 offset,
guint64 length);
+
+GARROW_AVAILABLE_IN_ALL
gchar *
garrow_chunked_array_to_string(GArrowChunkedArray *chunked_array, GError **error);
+
GARROW_AVAILABLE_IN_4_0
GArrowArray *
garrow_chunked_array_combine(GArrowChunkedArray *chunked_array, GError **error);
diff --git a/c_glib/arrow-glib/chunked-array.hpp b/c_glib/arrow-glib/chunked-array.hpp
index 9ce6cc76adfbf..674ef9606b96e 100644
--- a/c_glib/arrow-glib/chunked-array.hpp
+++ b/c_glib/arrow-glib/chunked-array.hpp
@@ -23,10 +23,15 @@
#include
+GARROW_EXTERN
GArrowChunkedArray *
garrow_chunked_array_new_raw(std::shared_ptr *arrow_chunked_array);
+
+GARROW_EXTERN
GArrowChunkedArray *
garrow_chunked_array_new_raw(std::shared_ptr *arrow_chunked_array,
GArrowDataType *data_type);
+
+GARROW_EXTERN
std::shared_ptr
garrow_chunked_array_get_raw(GArrowChunkedArray *chunked_array);
diff --git a/c_glib/arrow-glib/codec.h b/c_glib/arrow-glib/codec.h
index 9b8611bb0a7ee..5865634a7d8e4 100644
--- a/c_glib/arrow-glib/codec.h
+++ b/c_glib/arrow-glib/codec.h
@@ -50,20 +50,25 @@ typedef enum {
} GArrowCompressionType;
#define GARROW_TYPE_CODEC (garrow_codec_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowCodec, garrow_codec, GARROW, CODEC, GObject)
struct _GArrowCodecClass
{
GObjectClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowCodec *
garrow_codec_new(GArrowCompressionType type, GError **error);
+GARROW_AVAILABLE_IN_ALL
const gchar *
garrow_codec_get_name(GArrowCodec *codec);
+
GARROW_AVAILABLE_IN_2_0
GArrowCompressionType
garrow_codec_get_compression_type(GArrowCodec *codec);
+
GARROW_AVAILABLE_IN_2_0
gint
garrow_codec_get_compression_level(GArrowCodec *codec);
diff --git a/c_glib/arrow-glib/codec.hpp b/c_glib/arrow-glib/codec.hpp
index f4cfaba18a00e..baea842ddf6b5 100644
--- a/c_glib/arrow-glib/codec.hpp
+++ b/c_glib/arrow-glib/codec.hpp
@@ -23,12 +23,18 @@
#include
+GARROW_EXTERN
GArrowCompressionType
garrow_compression_type_from_raw(arrow::Compression::type arrow_type);
+
+GARROW_EXTERN
arrow::Compression::type
garrow_compression_type_to_raw(GArrowCompressionType type);
+GARROW_EXTERN
GArrowCodec *
garrow_codec_new_raw(std::shared_ptr *arrow_codec);
+
+GARROW_EXTERN
std::shared_ptr
garrow_codec_get_raw(GArrowCodec *codec);
diff --git a/c_glib/arrow-glib/composite-array.h b/c_glib/arrow-glib/composite-array.h
index c6e19f1c74e22..b8ba901363d0a 100644
--- a/c_glib/arrow-glib/composite-array.h
+++ b/c_glib/arrow-glib/composite-array.h
@@ -27,6 +27,7 @@
G_BEGIN_DECLS
#define GARROW_TYPE_LIST_ARRAY (garrow_list_array_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowListArray, garrow_list_array, GARROW, LIST_ARRAY, GArrowArray)
struct _GArrowListArrayClass
@@ -34,6 +35,7 @@ struct _GArrowListArrayClass
GArrowArrayClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowListArray *
garrow_list_array_new(GArrowDataType *data_type,
gint64 length,
@@ -42,24 +44,32 @@ garrow_list_array_new(GArrowDataType *data_type,
GArrowBuffer *null_bitmap,
gint64 n_nulls);
+GARROW_AVAILABLE_IN_ALL
GArrowDataType *
garrow_list_array_get_value_type(GArrowListArray *array);
+
+GARROW_AVAILABLE_IN_ALL
GArrowArray *
garrow_list_array_get_value(GArrowListArray *array, gint64 i);
+
GARROW_AVAILABLE_IN_2_0
GArrowArray *
garrow_list_array_get_values(GArrowListArray *array);
+
GARROW_AVAILABLE_IN_2_0
gint32
garrow_list_array_get_value_offset(GArrowListArray *array, gint64 i);
+
GARROW_AVAILABLE_IN_2_0
gint32
garrow_list_array_get_value_length(GArrowListArray *array, gint64 i);
+
GARROW_AVAILABLE_IN_2_0
const gint32 *
garrow_list_array_get_value_offsets(GArrowListArray *array, gint64 *n_offsets);
#define GARROW_TYPE_LARGE_LIST_ARRAY (garrow_large_list_array_get_type())
+GARROW_AVAILABLE_IN_0_16
G_DECLARE_DERIVABLE_TYPE(
GArrowLargeListArray, garrow_large_list_array, GARROW, LARGE_LIST_ARRAY, GArrowArray)
struct _GArrowLargeListArrayClass
@@ -79,23 +89,29 @@ garrow_large_list_array_new(GArrowDataType *data_type,
GARROW_AVAILABLE_IN_0_16
GArrowDataType *
garrow_large_list_array_get_value_type(GArrowLargeListArray *array);
+
GARROW_AVAILABLE_IN_0_16
GArrowArray *
garrow_large_list_array_get_value(GArrowLargeListArray *array, gint64 i);
+
GARROW_AVAILABLE_IN_2_0
GArrowArray *
garrow_large_list_array_get_values(GArrowLargeListArray *array);
+
GARROW_AVAILABLE_IN_2_0
gint64
garrow_large_list_array_get_value_offset(GArrowLargeListArray *array, gint64 i);
+
GARROW_AVAILABLE_IN_2_0
gint64
garrow_large_list_array_get_value_length(GArrowLargeListArray *array, gint64 i);
+
GARROW_AVAILABLE_IN_2_0
const gint64 *
garrow_large_list_array_get_value_offsets(GArrowLargeListArray *array, gint64 *n_offsets);
#define GARROW_TYPE_STRUCT_ARRAY (garrow_struct_array_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowStructArray, garrow_struct_array, GARROW, STRUCT_ARRAY, GArrowArray)
struct _GArrowStructArrayClass
@@ -103,6 +119,7 @@ struct _GArrowStructArrayClass
GArrowArrayClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowStructArray *
garrow_struct_array_new(GArrowDataType *data_type,
gint64 length,
@@ -110,9 +127,11 @@ garrow_struct_array_new(GArrowDataType *data_type,
GArrowBuffer *null_bitmap,
gint64 n_nulls);
+GARROW_AVAILABLE_IN_ALL
GArrowArray *
garrow_struct_array_get_field(GArrowStructArray *array, gint i);
+GARROW_AVAILABLE_IN_ALL
GList *
garrow_struct_array_get_fields(GArrowStructArray *array);
@@ -121,6 +140,7 @@ GList *
garrow_struct_array_flatten(GArrowStructArray *array, GError **error);
#define GARROW_TYPE_MAP_ARRAY (garrow_map_array_get_type())
+GARROW_AVAILABLE_IN_0_17
G_DECLARE_DERIVABLE_TYPE(
GArrowMapArray, garrow_map_array, GARROW, MAP_ARRAY, GArrowListArray)
struct _GArrowMapArrayClass
@@ -134,14 +154,17 @@ garrow_map_array_new(GArrowArray *offsets,
GArrowArray *keys,
GArrowArray *items,
GError **error);
+
GARROW_AVAILABLE_IN_0_17
GArrowArray *
garrow_map_array_get_keys(GArrowMapArray *array);
+
GARROW_AVAILABLE_IN_0_17
GArrowArray *
garrow_map_array_get_items(GArrowMapArray *array);
#define GARROW_TYPE_UNION_ARRAY (garrow_union_array_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowUnionArray, garrow_union_array, GARROW, UNION_ARRAY, GArrowArray)
struct _GArrowUnionArrayClass
@@ -152,13 +175,17 @@ struct _GArrowUnionArrayClass
GARROW_AVAILABLE_IN_12_0
gint8
garrow_union_array_get_type_code(GArrowUnionArray *array, gint64 i);
+
GARROW_AVAILABLE_IN_12_0
gint
garrow_union_array_get_child_id(GArrowUnionArray *array, gint64 i);
+
+GARROW_AVAILABLE_IN_ALL
GArrowArray *
garrow_union_array_get_field(GArrowUnionArray *array, gint i);
#define GARROW_TYPE_SPARSE_UNION_ARRAY (garrow_sparse_union_array_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowSparseUnionArray,
garrow_sparse_union_array,
GARROW,
@@ -169,8 +196,11 @@ struct _GArrowSparseUnionArrayClass
GArrowUnionArrayClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowSparseUnionArray *
garrow_sparse_union_array_new(GArrowInt8Array *type_ids, GList *fields, GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GArrowSparseUnionArray *
garrow_sparse_union_array_new_data_type(GArrowSparseUnionDataType *data_type,
GArrowInt8Array *type_ids,
@@ -178,6 +208,7 @@ garrow_sparse_union_array_new_data_type(GArrowSparseUnionDataType *data_type,
GError **error);
#define GARROW_TYPE_DENSE_UNION_ARRAY (garrow_dense_union_array_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowDenseUnionArray,
garrow_dense_union_array,
GARROW,
@@ -188,22 +219,27 @@ struct _GArrowDenseUnionArrayClass
GArrowUnionArrayClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowDenseUnionArray *
garrow_dense_union_array_new(GArrowInt8Array *type_ids,
GArrowInt32Array *value_offsets,
GList *fields,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GArrowDenseUnionArray *
garrow_dense_union_array_new_data_type(GArrowDenseUnionDataType *data_type,
GArrowInt8Array *type_ids,
GArrowInt32Array *value_offsets,
GList *fields,
GError **error);
+
GARROW_AVAILABLE_IN_12_0
gint32
garrow_dense_union_array_get_value_offset(GArrowDenseUnionArray *array, gint64 i);
#define GARROW_TYPE_DICTIONARY_ARRAY (garrow_dictionary_array_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowDictionaryArray, garrow_dictionary_array, GARROW, DICTIONARY_ARRAY, GArrowArray)
struct _GArrowDictionaryArrayClass
@@ -211,22 +247,29 @@ struct _GArrowDictionaryArrayClass
GArrowArrayClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowDictionaryArray *
garrow_dictionary_array_new(GArrowDataType *data_type,
GArrowArray *indices,
GArrowArray *dictionary,
GError **error);
+GARROW_AVAILABLE_IN_ALL
GArrowArray *
garrow_dictionary_array_get_indices(GArrowDictionaryArray *array);
+
+GARROW_AVAILABLE_IN_ALL
GArrowArray *
garrow_dictionary_array_get_dictionary(GArrowDictionaryArray *array);
+
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_1_0_FOR(garrow_array_get_value_data_type)
GArrowDictionaryDataType *
garrow_dictionary_array_get_dictionary_data_type(GArrowDictionaryArray *array);
#endif
#define GARROW_TYPE_RUN_END_ENCODED_ARRAY (garrow_run_end_encoded_array_get_type())
+GARROW_AVAILABLE_IN_13_0
G_DECLARE_DERIVABLE_TYPE(GArrowRunEndEncodedArray,
garrow_run_end_encoded_array,
GARROW,
@@ -248,9 +291,11 @@ garrow_run_end_encoded_array_new(GArrowDataType *data_type,
GARROW_AVAILABLE_IN_13_0
GArrowArray *
garrow_run_end_encoded_array_get_run_ends(GArrowRunEndEncodedArray *array);
+
GARROW_AVAILABLE_IN_13_0
GArrowArray *
garrow_run_end_encoded_array_get_values(GArrowRunEndEncodedArray *array);
+
GARROW_AVAILABLE_IN_13_0
GArrowArray *
garrow_run_end_encoded_array_get_logical_run_ends(GArrowRunEndEncodedArray *array,
@@ -258,9 +303,11 @@ garrow_run_end_encoded_array_get_logical_run_ends(GArrowRunEndEncodedArray *arra
GARROW_AVAILABLE_IN_13_0
GArrowArray *
garrow_run_end_encoded_array_get_logical_values(GArrowRunEndEncodedArray *array);
+
GARROW_AVAILABLE_IN_13_0
gint64
garrow_run_end_encoded_array_find_physical_offset(GArrowRunEndEncodedArray *array);
+
GARROW_AVAILABLE_IN_13_0
gint64
garrow_run_end_encoded_array_find_physical_length(GArrowRunEndEncodedArray *array);
diff --git a/c_glib/arrow-glib/composite-data-type.h b/c_glib/arrow-glib/composite-data-type.h
index e71d277a305c6..7a0a462af00f9 100644
--- a/c_glib/arrow-glib/composite-data-type.h
+++ b/c_glib/arrow-glib/composite-data-type.h
@@ -27,6 +27,7 @@
G_BEGIN_DECLS
#define GARROW_TYPE_LIST_DATA_TYPE (garrow_list_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowListDataType, garrow_list_data_type, GARROW, LIST_DATA_TYPE, GArrowDataType)
struct _GArrowListDataTypeClass
@@ -34,18 +35,23 @@ struct _GArrowListDataTypeClass
GArrowDataTypeClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowListDataType *
garrow_list_data_type_new(GArrowField *field);
+
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_0_13_FOR(garrow_list_data_type_get_field)
GArrowField *
garrow_list_data_type_get_value_field(GArrowListDataType *list_data_type);
#endif
+
GARROW_AVAILABLE_IN_0_13
GArrowField *
garrow_list_data_type_get_field(GArrowListDataType *list_data_type);
#define GARROW_TYPE_LARGE_LIST_DATA_TYPE (garrow_large_list_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowLargeListDataType,
garrow_large_list_data_type,
GARROW,
@@ -59,11 +65,13 @@ struct _GArrowLargeListDataTypeClass
GARROW_AVAILABLE_IN_0_16
GArrowLargeListDataType *
garrow_large_list_data_type_new(GArrowField *field);
+
GARROW_AVAILABLE_IN_0_16
GArrowField *
garrow_large_list_data_type_get_field(GArrowLargeListDataType *large_list_data_type);
#define GARROW_TYPE_STRUCT_DATA_TYPE (garrow_struct_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowStructDataType, garrow_struct_data_type, GARROW, STRUCT_DATA_TYPE, GArrowDataType)
struct _GArrowStructDataTypeClass
@@ -71,22 +79,34 @@ struct _GArrowStructDataTypeClass
GArrowDataTypeClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowStructDataType *
garrow_struct_data_type_new(GList *fields);
+
+GARROW_AVAILABLE_IN_ALL
gint
garrow_struct_data_type_get_n_fields(GArrowStructDataType *struct_data_type);
+
+GARROW_AVAILABLE_IN_ALL
GList *
garrow_struct_data_type_get_fields(GArrowStructDataType *struct_data_type);
+
+GARROW_AVAILABLE_IN_ALL
GArrowField *
garrow_struct_data_type_get_field(GArrowStructDataType *struct_data_type, gint i);
+
+GARROW_AVAILABLE_IN_ALL
GArrowField *
garrow_struct_data_type_get_field_by_name(GArrowStructDataType *struct_data_type,
const gchar *name);
+
+GARROW_AVAILABLE_IN_ALL
gint
garrow_struct_data_type_get_field_index(GArrowStructDataType *struct_data_type,
const gchar *name);
#define GARROW_TYPE_MAP_DATA_TYPE (garrow_map_data_type_get_type())
+GARROW_AVAILABLE_IN_0_17
G_DECLARE_DERIVABLE_TYPE(
GArrowMapDataType, garrow_map_data_type, GARROW, MAP_DATA_TYPE, GArrowListDataType)
struct _GArrowMapDataTypeClass
@@ -105,6 +125,7 @@ GArrowDataType *
garrow_map_data_type_get_item_type(GArrowMapDataType *map_data_type);
#define GARROW_TYPE_UNION_DATA_TYPE (garrow_union_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowUnionDataType, garrow_union_data_type, GARROW, UNION_DATA_TYPE, GArrowDataType)
struct _GArrowUnionDataTypeClass
@@ -112,17 +133,25 @@ struct _GArrowUnionDataTypeClass
GArrowDataTypeClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
gint
garrow_union_data_type_get_n_fields(GArrowUnionDataType *union_data_type);
+
+GARROW_AVAILABLE_IN_ALL
GList *
garrow_union_data_type_get_fields(GArrowUnionDataType *union_data_type);
+
+GARROW_AVAILABLE_IN_ALL
GArrowField *
garrow_union_data_type_get_field(GArrowUnionDataType *union_data_type, gint i);
+
+GARROW_AVAILABLE_IN_ALL
gint8 *
garrow_union_data_type_get_type_codes(GArrowUnionDataType *union_data_type,
gsize *n_type_codes);
#define GARROW_TYPE_SPARSE_UNION_DATA_TYPE (garrow_sparse_union_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowSparseUnionDataType,
garrow_sparse_union_data_type,
GARROW,
@@ -133,10 +162,12 @@ struct _GArrowSparseUnionDataTypeClass
GArrowUnionDataTypeClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowSparseUnionDataType *
garrow_sparse_union_data_type_new(GList *fields, gint8 *type_codes, gsize n_type_codes);
#define GARROW_TYPE_DENSE_UNION_DATA_TYPE (garrow_dense_union_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowDenseUnionDataType,
garrow_dense_union_data_type,
GARROW,
@@ -147,10 +178,12 @@ struct _GArrowDenseUnionDataTypeClass
GArrowUnionDataTypeClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowDenseUnionDataType *
garrow_dense_union_data_type_new(GList *fields, gint8 *type_codes, gsize n_type_codes);
#define GARROW_TYPE_DICTIONARY_DATA_TYPE (garrow_dictionary_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowDictionaryDataType,
garrow_dictionary_data_type,
GARROW,
@@ -161,22 +194,29 @@ struct _GArrowDictionaryDataTypeClass
GArrowFixedWidthDataTypeClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowDictionaryDataType *
garrow_dictionary_data_type_new(GArrowDataType *index_data_type,
GArrowDataType *value_data_type,
gboolean ordered);
+
+GARROW_AVAILABLE_IN_ALL
GArrowDataType *
garrow_dictionary_data_type_get_index_data_type(
GArrowDictionaryDataType *dictionary_data_type);
+
GARROW_AVAILABLE_IN_0_14
GArrowDataType *
garrow_dictionary_data_type_get_value_data_type(
GArrowDictionaryDataType *dictionary_data_type);
+
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_dictionary_data_type_is_ordered(GArrowDictionaryDataType *dictionary_data_type);
#define GARROW_TYPE_RUN_END_ENCODED_DATA_TYPE \
(garrow_run_end_encoded_data_type_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowRunEndEncodedDataType,
garrow_run_end_encoded_data_type,
GARROW,
@@ -195,6 +235,7 @@ GARROW_AVAILABLE_IN_13_0
GArrowDataType *
garrow_run_end_encoded_data_type_get_run_end_data_type(
GArrowRunEndEncodedDataType *data_type);
+
GARROW_AVAILABLE_IN_13_0
GArrowDataType *
garrow_run_end_encoded_data_type_get_value_data_type(
diff --git a/c_glib/arrow-glib/compute-definition.h b/c_glib/arrow-glib/compute-definition.h
index b699e9e99a9fc..a060f16f62cf6 100644
--- a/c_glib/arrow-glib/compute-definition.h
+++ b/c_glib/arrow-glib/compute-definition.h
@@ -21,9 +21,12 @@
#include
+#include
+
G_BEGIN_DECLS
#define GARROW_TYPE_FUNCTION_OPTIONS (garrow_function_options_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowFunctionOptions, garrow_function_options, GARROW, FUNCTION_OPTIONS, GObject)
struct _GArrowFunctionOptionsClass
@@ -32,6 +35,7 @@ struct _GArrowFunctionOptionsClass
};
#define GARROW_TYPE_CAST_OPTIONS (garrow_cast_options_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowCastOptions, garrow_cast_options, GARROW, CAST_OPTIONS, GArrowFunctionOptions)
struct _GArrowCastOptionsClass
@@ -40,6 +44,7 @@ struct _GArrowCastOptionsClass
};
#define GARROW_TYPE_EXPRESSION (garrow_expression_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowExpression, garrow_expression, GARROW, EXPRESSION, GObject)
struct _GArrowExpressionClass
{
diff --git a/c_glib/arrow-glib/compute.h b/c_glib/arrow-glib/compute.h
index 029cab136ad8f..54b0ddb014fbb 100644
--- a/c_glib/arrow-glib/compute.h
+++ b/c_glib/arrow-glib/compute.h
@@ -26,6 +26,7 @@
G_BEGIN_DECLS
#define GARROW_TYPE_EXECUTE_CONTEXT (garrow_execute_context_get_type())
+GARROW_AVAILABLE_IN_1_0
G_DECLARE_DERIVABLE_TYPE(
GArrowExecuteContext, garrow_execute_context, GARROW, EXECUTE_CONTEXT, GObject)
struct _GArrowExecuteContextClass
@@ -46,6 +47,7 @@ gchar *
garrow_function_options_to_string(GArrowFunctionOptions *options);
#define GARROW_TYPE_FUNCTION_DOC (garrow_function_doc_get_type())
+GARROW_AVAILABLE_IN_6_0
G_DECLARE_DERIVABLE_TYPE(
GArrowFunctionDoc, garrow_function_doc, GARROW, FUNCTION_DOC, GObject)
struct _GArrowFunctionDocClass
@@ -67,6 +69,7 @@ gchar *
garrow_function_doc_get_options_class_name(GArrowFunctionDoc *doc);
#define GARROW_TYPE_FUNCTION (garrow_function_get_type())
+GARROW_AVAILABLE_IN_1_0
G_DECLARE_DERIVABLE_TYPE(GArrowFunction, garrow_function, GARROW, FUNCTION, GObject)
struct _GArrowFunctionClass
{
@@ -110,6 +113,7 @@ gchar *
garrow_function_to_string(GArrowFunction *function);
#define GARROW_TYPE_EXECUTE_NODE_OPTIONS (garrow_execute_node_options_get_type())
+GARROW_AVAILABLE_IN_6_0
G_DECLARE_DERIVABLE_TYPE(GArrowExecuteNodeOptions,
garrow_execute_node_options,
GARROW,
@@ -121,6 +125,7 @@ struct _GArrowExecuteNodeOptionsClass
};
#define GARROW_TYPE_SOURCE_NODE_OPTIONS (garrow_source_node_options_get_type())
+GARROW_AVAILABLE_IN_6_0
G_DECLARE_DERIVABLE_TYPE(GArrowSourceNodeOptions,
garrow_source_node_options,
GARROW,
@@ -142,6 +147,7 @@ GArrowSourceNodeOptions *
garrow_source_node_options_new_table(GArrowTable *table);
#define GARROW_TYPE_FILTER_NODE_OPTIONS (garrow_filter_node_options_get_type())
+GARROW_AVAILABLE_IN_12_0
G_DECLARE_DERIVABLE_TYPE(GArrowFilterNodeOptions,
garrow_filter_node_options,
GARROW,
@@ -157,6 +163,7 @@ GArrowFilterNodeOptions *
garrow_filter_node_options_new(GArrowExpression *expression);
#define GARROW_TYPE_PROJECT_NODE_OPTIONS (garrow_project_node_options_get_type())
+GARROW_AVAILABLE_IN_11_0
G_DECLARE_DERIVABLE_TYPE(GArrowProjectNodeOptions,
garrow_project_node_options,
GARROW,
@@ -172,6 +179,7 @@ GArrowProjectNodeOptions *
garrow_project_node_options_new(GList *expressions, gchar **names, gsize n_names);
#define GARROW_TYPE_AGGREGATION (garrow_aggregation_get_type())
+GARROW_AVAILABLE_IN_6_0
G_DECLARE_DERIVABLE_TYPE(
GArrowAggregation, garrow_aggregation, GARROW, AGGREGATION, GObject)
struct _GArrowAggregationClass
@@ -187,6 +195,7 @@ garrow_aggregation_new(const gchar *function,
const gchar *output);
#define GARROW_TYPE_AGGREGATE_NODE_OPTIONS (garrow_aggregate_node_options_get_type())
+GARROW_AVAILABLE_IN_6_0
G_DECLARE_DERIVABLE_TYPE(GArrowAggregateNodeOptions,
garrow_aggregate_node_options,
GARROW,
@@ -205,6 +214,7 @@ garrow_aggregate_node_options_new(GList *aggregations,
GError **error);
#define GARROW_TYPE_SINK_NODE_OPTIONS (garrow_sink_node_options_get_type())
+GARROW_AVAILABLE_IN_6_0
G_DECLARE_DERIVABLE_TYPE(GArrowSinkNodeOptions,
garrow_sink_node_options,
GARROW,
@@ -249,6 +259,7 @@ typedef enum {
} GArrowJoinType;
#define GARROW_TYPE_HASH_JOIN_NODE_OPTIONS (garrow_hash_join_node_options_get_type())
+GARROW_AVAILABLE_IN_7_0
G_DECLARE_DERIVABLE_TYPE(GArrowHashJoinNodeOptions,
garrow_hash_join_node_options,
GARROW,
@@ -281,6 +292,7 @@ garrow_hash_join_node_options_set_right_outputs(GArrowHashJoinNodeOptions *optio
GError **error);
#define GARROW_TYPE_EXECUTE_NODE (garrow_execute_node_get_type())
+GARROW_AVAILABLE_IN_6_0
G_DECLARE_DERIVABLE_TYPE(
GArrowExecuteNode, garrow_execute_node, GARROW, EXECUTE_NODE, GObject)
struct _GArrowExecuteNodeClass
@@ -296,6 +308,7 @@ GArrowSchema *
garrow_execute_node_get_output_schema(GArrowExecuteNode *node);
#define GARROW_TYPE_EXECUTE_PLAN (garrow_execute_plan_get_type())
+GARROW_AVAILABLE_IN_6_0
G_DECLARE_DERIVABLE_TYPE(
GArrowExecutePlan, garrow_execute_plan, GARROW, EXECUTE_PLAN, GObject)
struct _GArrowExecutePlanClass
@@ -365,10 +378,12 @@ GARROW_AVAILABLE_IN_6_0
gboolean
garrow_execute_plan_wait(GArrowExecutePlan *plan, GError **error);
+GARROW_AVAILABLE_IN_ALL
GArrowCastOptions *
garrow_cast_options_new(void);
#define GARROW_TYPE_SCALAR_AGGREGATE_OPTIONS (garrow_scalar_aggregate_options_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(GArrowScalarAggregateOptions,
garrow_scalar_aggregate_options,
GARROW,
@@ -401,6 +416,7 @@ typedef enum {
} GArrowCountMode;
#define GARROW_TYPE_COUNT_OPTIONS (garrow_count_options_get_type())
+GARROW_AVAILABLE_IN_6_0
G_DECLARE_DERIVABLE_TYPE(
GArrowCountOptions, garrow_count_options, GARROW, COUNT_OPTIONS, GArrowFunctionOptions)
struct _GArrowCountOptionsClass
@@ -428,6 +444,7 @@ typedef enum {
} GArrowFilterNullSelectionBehavior;
#define GARROW_TYPE_FILTER_OPTIONS (garrow_filter_options_get_type())
+GARROW_AVAILABLE_IN_0_17
G_DECLARE_DERIVABLE_TYPE(GArrowFilterOptions,
garrow_filter_options,
GARROW,
@@ -443,6 +460,7 @@ GArrowFilterOptions *
garrow_filter_options_new(void);
#define GARROW_TYPE_TAKE_OPTIONS (garrow_take_options_get_type())
+GARROW_AVAILABLE_IN_0_14
G_DECLARE_DERIVABLE_TYPE(
GArrowTakeOptions, garrow_take_options, GARROW, TAKE_OPTIONS, GArrowFunctionOptions)
struct _GArrowTakeOptionsClass
@@ -487,6 +505,7 @@ typedef enum /**/ {
} GArrowNullPlacement;
#define GARROW_TYPE_ARRAY_SORT_OPTIONS (garrow_array_sort_options_get_type())
+GARROW_AVAILABLE_IN_3_0
G_DECLARE_DERIVABLE_TYPE(GArrowArraySortOptions,
garrow_array_sort_options,
GARROW,
@@ -506,6 +525,7 @@ garrow_array_sort_options_equal(GArrowArraySortOptions *options,
GArrowArraySortOptions *other_options);
#define GARROW_TYPE_SORT_KEY (garrow_sort_key_get_type())
+GARROW_AVAILABLE_IN_3_0
G_DECLARE_DERIVABLE_TYPE(GArrowSortKey, garrow_sort_key, GARROW, SORT_KEY, GObject)
struct _GArrowSortKeyClass
{
@@ -521,6 +541,7 @@ gboolean
garrow_sort_key_equal(GArrowSortKey *sort_key, GArrowSortKey *other_sort_key);
#define GARROW_TYPE_SORT_OPTIONS (garrow_sort_options_get_type())
+GARROW_AVAILABLE_IN_3_0
G_DECLARE_DERIVABLE_TYPE(
GArrowSortOptions, garrow_sort_options, GARROW, SORT_OPTIONS, GArrowFunctionOptions)
struct _GArrowSortOptionsClass
@@ -545,6 +566,7 @@ void
garrow_sort_options_add_sort_key(GArrowSortOptions *options, GArrowSortKey *sort_key);
#define GARROW_TYPE_SET_LOOKUP_OPTIONS (garrow_set_lookup_options_get_type())
+GARROW_AVAILABLE_IN_6_0
G_DECLARE_DERIVABLE_TYPE(GArrowSetLookupOptions,
garrow_set_lookup_options,
GARROW,
@@ -560,6 +582,7 @@ GArrowSetLookupOptions *
garrow_set_lookup_options_new(GArrowDatum *value_set);
#define GARROW_TYPE_VARIANCE_OPTIONS (garrow_variance_options_get_type())
+GARROW_AVAILABLE_IN_6_0
G_DECLARE_DERIVABLE_TYPE(GArrowVarianceOptions,
garrow_variance_options,
GARROW,
@@ -620,6 +643,7 @@ typedef enum {
} GArrowRoundMode;
#define GARROW_TYPE_ROUND_OPTIONS (garrow_round_options_get_type())
+GARROW_AVAILABLE_IN_7_0
G_DECLARE_DERIVABLE_TYPE(
GArrowRoundOptions, garrow_round_options, GARROW, ROUND_OPTIONS, GArrowFunctionOptions)
struct _GArrowRoundOptionsClass
@@ -633,6 +657,7 @@ garrow_round_options_new(void);
#define GARROW_TYPE_ROUND_TO_MULTIPLE_OPTIONS \
(garrow_round_to_multiple_options_get_type())
+GARROW_AVAILABLE_IN_7_0
G_DECLARE_DERIVABLE_TYPE(GArrowRoundToMultipleOptions,
garrow_round_to_multiple_options,
GARROW,
@@ -648,6 +673,7 @@ GArrowRoundToMultipleOptions *
garrow_round_to_multiple_options_new(void);
#define GARROW_TYPE_MATCH_SUBSTRING_OPTIONS (garrow_match_substring_options_get_type())
+GARROW_AVAILABLE_IN_12_0
G_DECLARE_DERIVABLE_TYPE(GArrowMatchSubstringOptions,
garrow_match_substring_options,
GARROW,
@@ -683,6 +709,7 @@ typedef enum /*< underscore_name=garrow_utf8_normalize_form >*/ {
} GArrowUTF8NormalizeForm;
#define GARROW_TYPE_UTF8_NORMALIZE_OPTIONS (garrow_utf8_normalize_options_get_type())
+GARROW_AVAILABLE_IN_8_0
G_DECLARE_DERIVABLE_TYPE(GArrowUTF8NormalizeOptions,
garrow_utf8_normalize_options,
GARROW,
@@ -719,6 +746,7 @@ typedef enum {
} GArrowQuantileInterpolation;
#define GARROW_TYPE_QUANTILE_OPTIONS (garrow_quantile_options_get_type())
+GARROW_AVAILABLE_IN_9_0
G_DECLARE_DERIVABLE_TYPE(GArrowQuantileOptions,
garrow_quantile_options,
GARROW,
@@ -745,6 +773,7 @@ garrow_quantile_options_set_qs(GArrowQuantileOptions *options,
gsize n);
#define GARROW_TYPE_INDEX_OPTIONS (garrow_index_options_get_type())
+GARROW_AVAILABLE_IN_12_0
G_DECLARE_DERIVABLE_TYPE(
GArrowIndexOptions, garrow_index_options, GARROW, INDEX_OPTIONS, GArrowFunctionOptions)
struct _GArrowIndexOptionsClass
@@ -782,6 +811,7 @@ typedef enum {
} GArrowRankTiebreaker;
#define GARROW_TYPE_RANK_OPTIONS (garrow_rank_options_get_type())
+GARROW_AVAILABLE_IN_12_0
G_DECLARE_DERIVABLE_TYPE(
GArrowRankOptions, garrow_rank_options, GARROW, RANK_OPTIONS, GArrowFunctionOptions)
struct _GArrowRankOptionsClass
@@ -805,18 +835,25 @@ GARROW_AVAILABLE_IN_12_0
void
garrow_rank_options_add_sort_key(GArrowRankOptions *options, GArrowSortKey *sort_key);
+GARROW_AVAILABLE_IN_ALL
GArrowArray *
garrow_array_cast(GArrowArray *array,
GArrowDataType *target_data_type,
GArrowCastOptions *options,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GArrowArray *
garrow_array_unique(GArrowArray *array, GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GArrowDictionaryArray *
garrow_array_dictionary_encode(GArrowArray *array, GError **error);
+
GARROW_AVAILABLE_IN_0_13
gint64
garrow_array_count(GArrowArray *array, GArrowCountOptions *options, GError **error);
+
GARROW_AVAILABLE_IN_0_13
GArrowStructArray *
garrow_array_count_values(GArrowArray *array, GError **error);
@@ -987,6 +1024,7 @@ garrow_record_batch_filter(GArrowRecordBatch *record_batch,
GError **error);
#define GARROW_TYPE_RUN_END_ENCODE_OPTIONS (garrow_run_end_encode_options_get_type())
+GARROW_AVAILABLE_IN_13_0
G_DECLARE_DERIVABLE_TYPE(GArrowRunEndEncodeOptions,
garrow_run_end_encode_options,
GARROW,
@@ -1011,6 +1049,7 @@ GArrowArray *
garrow_run_end_encoded_array_decode(GArrowRunEndEncodedArray *array, GError **error);
#define GARROW_TYPE_STRPTIME_OPTIONS (garrow_strptime_options_get_type())
+GARROW_AVAILABLE_IN_16_0
G_DECLARE_DERIVABLE_TYPE(GArrowStrptimeOptions,
garrow_strptime_options,
GARROW,
@@ -1026,6 +1065,7 @@ GArrowStrptimeOptions *
garrow_strptime_options_new(void);
#define GARROW_TYPE_STRFTIME_OPTIONS (garrow_strftime_options_get_type())
+GARROW_AVAILABLE_IN_16_0
G_DECLARE_DERIVABLE_TYPE(GArrowStrftimeOptions,
garrow_strftime_options,
GARROW,
@@ -1041,6 +1081,7 @@ GArrowStrftimeOptions *
garrow_strftime_options_new(void);
#define GARROW_TYPE_SPLIT_PATTERN_OPTIONS (garrow_split_pattern_options_get_type())
+GARROW_AVAILABLE_IN_16_0
G_DECLARE_DERIVABLE_TYPE(GArrowSplitPatternOptions,
garrow_split_pattern_options,
GARROW,
@@ -1056,6 +1097,7 @@ GArrowSplitPatternOptions *
garrow_split_pattern_options_new(void);
#define GARROW_TYPE_STRUCT_FIELD_OPTIONS (garrow_struct_field_options_get_type())
+GARROW_AVAILABLE_IN_16_0
G_DECLARE_DERIVABLE_TYPE(GArrowStructFieldOptions,
garrow_struct_field_options,
GARROW,
diff --git a/c_glib/arrow-glib/datum.h b/c_glib/arrow-glib/datum.h
index df5e9a1c2cf4f..fc9a2fe7ab907 100644
--- a/c_glib/arrow-glib/datum.h
+++ b/c_glib/arrow-glib/datum.h
@@ -28,6 +28,7 @@
G_BEGIN_DECLS
#define GARROW_TYPE_DATUM (garrow_datum_get_type())
+GARROW_AVAILABLE_IN_1_0
G_DECLARE_DERIVABLE_TYPE(GArrowDatum, garrow_datum, GARROW, DATUM, GObject)
struct _GArrowDatumClass
{
@@ -60,6 +61,7 @@ garrow_datum_to_string(GArrowDatum *datum);
/* GARROW_TYPE_NONE_DATUM */
#define GARROW_TYPE_SCALAR_DATUM (garrow_scalar_datum_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(
GArrowScalarDatum, garrow_scalar_datum, GARROW, SCALAR_DATUM, GArrowDatum)
struct _GArrowScalarDatumClass
@@ -72,6 +74,7 @@ GArrowScalarDatum *
garrow_scalar_datum_new(GArrowScalar *value);
#define GARROW_TYPE_ARRAY_DATUM (garrow_array_datum_get_type())
+GARROW_AVAILABLE_IN_1_0
G_DECLARE_DERIVABLE_TYPE(
GArrowArrayDatum, garrow_array_datum, GARROW, ARRAY_DATUM, GArrowDatum)
struct _GArrowArrayDatumClass
@@ -84,6 +87,7 @@ GArrowArrayDatum *
garrow_array_datum_new(GArrowArray *value);
#define GARROW_TYPE_CHUNKED_ARRAY_DATUM (garrow_chunked_array_datum_get_type())
+GARROW_AVAILABLE_IN_1_0
G_DECLARE_DERIVABLE_TYPE(GArrowChunkedArrayDatum,
garrow_chunked_array_datum,
GARROW,
@@ -99,6 +103,7 @@ GArrowChunkedArrayDatum *
garrow_chunked_array_datum_new(GArrowChunkedArray *value);
#define GARROW_TYPE_RECORD_BATCH_DATUM (garrow_record_batch_datum_get_type())
+GARROW_AVAILABLE_IN_1_0
G_DECLARE_DERIVABLE_TYPE(GArrowRecordBatchDatum,
garrow_record_batch_datum,
GARROW,
@@ -114,6 +119,7 @@ GArrowRecordBatchDatum *
garrow_record_batch_datum_new(GArrowRecordBatch *value);
#define GARROW_TYPE_TABLE_DATUM (garrow_table_datum_get_type())
+GARROW_AVAILABLE_IN_1_0
G_DECLARE_DERIVABLE_TYPE(
GArrowTableDatum, garrow_table_datum, GARROW, TABLE_DATUM, GArrowDatum)
struct _GArrowTableDatumClass
diff --git a/c_glib/arrow-glib/decimal.h b/c_glib/arrow-glib/decimal.h
index b967fa36d5611..f64afa800a19b 100644
--- a/c_glib/arrow-glib/decimal.h
+++ b/c_glib/arrow-glib/decimal.h
@@ -27,6 +27,7 @@ G_BEGIN_DECLS
/* Disabled because it conflicts with GARROW_TYPE_DECIMAL128 in GArrowType. */
/* #define GARROW_TYPE_DECIMAL128 (garrow_decimal128_get_type()) */
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowDecimal128, garrow_decimal128, GARROW, DECIMAL128, GObject)
struct _GArrowDecimal128Class
@@ -34,8 +35,10 @@ struct _GArrowDecimal128Class
GObjectClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowDecimal128 *
garrow_decimal128_new_string(const gchar *data, GError **error);
+GARROW_AVAILABLE_IN_ALL
GArrowDecimal128 *
garrow_decimal128_new_integer(const gint64 data);
GARROW_AVAILABLE_IN_3_0
@@ -62,25 +65,34 @@ GARROW_AVAILABLE_IN_0_12
gboolean
garrow_decimal128_greater_than_or_equal(GArrowDecimal128 *decimal,
GArrowDecimal128 *other_decimal);
+GARROW_AVAILABLE_IN_ALL
gchar *
garrow_decimal128_to_string_scale(GArrowDecimal128 *decimal, gint32 scale);
+GARROW_AVAILABLE_IN_ALL
gchar *
garrow_decimal128_to_string(GArrowDecimal128 *decimal);
GARROW_AVAILABLE_IN_3_0
GBytes *
garrow_decimal128_to_bytes(GArrowDecimal128 *decimal);
+GARROW_AVAILABLE_IN_ALL
void
garrow_decimal128_abs(GArrowDecimal128 *decimal);
+GARROW_AVAILABLE_IN_ALL
void
garrow_decimal128_negate(GArrowDecimal128 *decimal);
+GARROW_AVAILABLE_IN_ALL
gint64
garrow_decimal128_to_integer(GArrowDecimal128 *decimal);
+GARROW_AVAILABLE_IN_ALL
GArrowDecimal128 *
garrow_decimal128_plus(GArrowDecimal128 *left, GArrowDecimal128 *right);
+GARROW_AVAILABLE_IN_ALL
GArrowDecimal128 *
garrow_decimal128_minus(GArrowDecimal128 *left, GArrowDecimal128 *right);
+GARROW_AVAILABLE_IN_ALL
GArrowDecimal128 *
garrow_decimal128_multiply(GArrowDecimal128 *left, GArrowDecimal128 *right);
+GARROW_AVAILABLE_IN_ALL
GArrowDecimal128 *
garrow_decimal128_divide(GArrowDecimal128 *left,
GArrowDecimal128 *right,
@@ -95,6 +107,7 @@ garrow_decimal128_rescale(GArrowDecimal128 *decimal,
/* Disabled because it conflicts with GARROW_TYPE_DECIMAL256 in GArrowType. */
/* #define GARROW_TYPE_DECIMAL256 (garrow_decimal256_get_type()) */
+GARROW_AVAILABLE_IN_3_0
G_DECLARE_DERIVABLE_TYPE(GArrowDecimal256, garrow_decimal256, GARROW, DECIMAL256, GObject)
struct _GArrowDecimal256Class
diff --git a/c_glib/arrow-glib/error.h b/c_glib/arrow-glib/error.h
index 4414417a1a25b..e0c6a591a021b 100644
--- a/c_glib/arrow-glib/error.h
+++ b/c_glib/arrow-glib/error.h
@@ -21,6 +21,8 @@
#include
+#include
+
G_BEGIN_DECLS
/**
@@ -66,6 +68,7 @@ typedef enum {
#define GARROW_ERROR garrow_error_quark()
+GARROW_AVAILABLE_IN_ALL
GQuark
garrow_error_quark(void);
diff --git a/c_glib/arrow-glib/error.hpp b/c_glib/arrow-glib/error.hpp
index 90a0f3161878e..c2c9b3c63028a 100644
--- a/c_glib/arrow-glib/error.hpp
+++ b/c_glib/arrow-glib/error.hpp
@@ -23,18 +23,26 @@
#include
+GARROW_EXTERN
gboolean
garrow_error_check(GError **error, const arrow::Status &status, const char *context);
+
+GARROW_EXTERN
GArrowError
garrow_error_from_status(const arrow::Status &status);
+
+GARROW_EXTERN
arrow::StatusCode
garrow_error_to_status_code(GError *error, arrow::StatusCode default_code);
+
+GARROW_EXTERN
arrow::Status
garrow_error_to_status(GError *error,
arrow::StatusCode default_code,
const char *context);
namespace garrow {
+ GARROW_EXTERN
gboolean
check(GError **error, const arrow::Status &status, const char *context);
diff --git a/c_glib/arrow-glib/expression.h b/c_glib/arrow-glib/expression.h
index 3141ed4df18b7..5a6bfb456fc64 100644
--- a/c_glib/arrow-glib/expression.h
+++ b/c_glib/arrow-glib/expression.h
@@ -31,6 +31,7 @@ gboolean
garrow_expression_equal(GArrowExpression *expression, GArrowExpression *other_expression);
#define GARROW_TYPE_LITERAL_EXPRESSION (garrow_literal_expression_get_type())
+GARROW_AVAILABLE_IN_6_0
G_DECLARE_DERIVABLE_TYPE(GArrowLiteralExpression,
garrow_literal_expression,
GARROW,
@@ -46,6 +47,7 @@ GArrowLiteralExpression *
garrow_literal_expression_new(GArrowDatum *datum);
#define GARROW_TYPE_FIELD_EXPRESSION (garrow_field_expression_get_type())
+GARROW_AVAILABLE_IN_6_0
G_DECLARE_DERIVABLE_TYPE(GArrowFieldExpression,
garrow_field_expression,
GARROW,
@@ -61,6 +63,7 @@ GArrowFieldExpression *
garrow_field_expression_new(const gchar *reference, GError **error);
#define GARROW_TYPE_CALL_EXPRESSION (garrow_call_expression_get_type())
+GARROW_AVAILABLE_IN_6_0
G_DECLARE_DERIVABLE_TYPE(
GArrowCallExpression, garrow_call_expression, GARROW, CALL_EXPRESSION, GArrowExpression)
struct _GArrowCallExpressionClass
diff --git a/c_glib/arrow-glib/expression.hpp b/c_glib/arrow-glib/expression.hpp
index 60d5c9fe2f1bd..cc96badbe67aa 100644
--- a/c_glib/arrow-glib/expression.hpp
+++ b/c_glib/arrow-glib/expression.hpp
@@ -23,7 +23,10 @@
#include
+GARROW_EXTERN
GArrowExpression *
garrow_expression_new_raw(const arrow::compute::Expression &arrow_expression);
+
+GARROW_EXTERN
arrow::compute::Expression *
garrow_expression_get_raw(GArrowExpression *expression);
diff --git a/c_glib/arrow-glib/field.h b/c_glib/arrow-glib/field.h
index 8de63757878c9..4be13f6135975 100644
--- a/c_glib/arrow-glib/field.h
+++ b/c_glib/arrow-glib/field.h
@@ -24,6 +24,7 @@
G_BEGIN_DECLS
#define GARROW_TYPE_FIELD (garrow_field_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowField, garrow_field, GARROW, FIELD, GObject)
struct _GArrowFieldClass
{
@@ -34,8 +35,10 @@ GARROW_AVAILABLE_IN_6_0
GArrowField *
garrow_field_import(gpointer c_abi_schema, GError **error);
+GARROW_AVAILABLE_IN_ALL
GArrowField *
garrow_field_new(const gchar *name, GArrowDataType *data_type);
+GARROW_AVAILABLE_IN_ALL
GArrowField *
garrow_field_new_full(const gchar *name, GArrowDataType *data_type, gboolean nullable);
@@ -43,18 +46,26 @@ GARROW_AVAILABLE_IN_6_0
gpointer
garrow_field_export(GArrowField *field, GError **error);
+GARROW_AVAILABLE_IN_ALL
const gchar *
garrow_field_get_name(GArrowField *field);
+
+GARROW_AVAILABLE_IN_ALL
GArrowDataType *
garrow_field_get_data_type(GArrowField *field);
+
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_field_is_nullable(GArrowField *field);
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_field_equal(GArrowField *field, GArrowField *other_field);
+GARROW_AVAILABLE_IN_ALL
gchar *
garrow_field_to_string(GArrowField *field);
+
GARROW_AVAILABLE_IN_3_0
gchar *
garrow_field_to_string_metadata(GArrowField *field, gboolean show_metadata);
diff --git a/c_glib/arrow-glib/file-system.h b/c_glib/arrow-glib/file-system.h
index d3d5fde73fe23..2e500672e145c 100644
--- a/c_glib/arrow-glib/file-system.h
+++ b/c_glib/arrow-glib/file-system.h
@@ -53,6 +53,7 @@ typedef enum {
/* arrow::fs::FileInfo */
#define GARROW_TYPE_FILE_INFO (garrow_file_info_get_type())
+GARROW_AVAILABLE_IN_0_17
G_DECLARE_DERIVABLE_TYPE(GArrowFileInfo, garrow_file_info, GARROW, FILE_INFO, GObject)
struct _GArrowFileInfoClass
{
@@ -80,6 +81,7 @@ garrow_file_info_to_string(GArrowFileInfo *file_info);
/* arrow::fs::FileSelector */
#define GARROW_TYPE_FILE_SELECTOR (garrow_file_selector_get_type())
+GARROW_AVAILABLE_IN_0_17
G_DECLARE_DERIVABLE_TYPE(
GArrowFileSelector, garrow_file_selector, GARROW, FILE_SELECTOR, GObject)
struct _GArrowFileSelectorClass
@@ -90,6 +92,7 @@ struct _GArrowFileSelectorClass
/* arrow::fs::FileSystem */
#define GARROW_TYPE_FILE_SYSTEM (garrow_file_system_get_type())
+GARROW_AVAILABLE_IN_0_17
G_DECLARE_DERIVABLE_TYPE(
GArrowFileSystem, garrow_file_system, GARROW, FILE_SYSTEM, GObject)
struct _GArrowFileSystemClass
@@ -197,6 +200,7 @@ garrow_file_system_open_append_stream(GArrowFileSystem *file_system,
/* arrow::fs::SubTreeFileSystem */
#define GARROW_TYPE_SUB_TREE_FILE_SYSTEM (garrow_sub_tree_file_system_get_type())
+GARROW_AVAILABLE_IN_0_17
G_DECLARE_DERIVABLE_TYPE(GArrowSubTreeFileSystem,
garrow_sub_tree_file_system,
GARROW,
@@ -215,6 +219,7 @@ garrow_sub_tree_file_system_new(const gchar *base_path,
/* arrow::fs::SlowFileSystem */
#define GARROW_TYPE_SLOW_FILE_SYSTEM (garrow_slow_file_system_get_type())
+GARROW_AVAILABLE_IN_0_17
G_DECLARE_DERIVABLE_TYPE(GArrowSlowFileSystem,
garrow_slow_file_system,
GARROW,
@@ -244,6 +249,7 @@ garrow_slow_file_system_new_average_latency_and_seed(GArrowFileSystem *base_file
gint32 seed);
#define GARROW_TYPE_MOCK_FILE_SYSTEM (garrow_mock_file_system_get_type())
+GARROW_AVAILABLE_IN_0_17
G_DECLARE_DERIVABLE_TYPE(GArrowMockFileSystem,
garrow_mock_file_system,
GARROW,
@@ -255,6 +261,7 @@ struct _GArrowMockFileSystemClass
};
#define GARROW_TYPE_HDFS_FILE_SYSTEM (garrow_hdfs_file_system_get_type())
+GARROW_AVAILABLE_IN_0_17
G_DECLARE_DERIVABLE_TYPE(GArrowHDFSFileSystem,
garrow_hdfs_file_system,
GARROW,
@@ -290,6 +297,7 @@ typedef enum {
} GArrowS3LogLevel;
#define GARROW_TYPE_S3_GLOBAL_OPTIONS (garrow_s3_global_options_get_type())
+GARROW_AVAILABLE_IN_7_0
G_DECLARE_DERIVABLE_TYPE(
GArrowS3GlobalOptions, garrow_s3_global_options, GARROW, S3_GLOBAL_OPTIONS, GObject)
struct _GArrowS3GlobalOptionsClass
@@ -312,6 +320,7 @@ gboolean
garrow_s3_finalize(GError **error);
#define GARROW_TYPE_S3_FILE_SYSTEM (garrow_s3_file_system_get_type())
+GARROW_AVAILABLE_IN_7_0
G_DECLARE_DERIVABLE_TYPE(
GArrowS3FileSystem, garrow_s3_file_system, GARROW, S3_FILE_SYSTEM, GArrowFileSystem)
struct _GArrowS3FileSystemClass
@@ -320,6 +329,7 @@ struct _GArrowS3FileSystemClass
};
#define GARROW_TYPE_GCS_FILE_SYSTEM (garrow_gcs_file_system_get_type())
+GARROW_AVAILABLE_IN_7_0
G_DECLARE_DERIVABLE_TYPE(
GArrowGCSFileSystem, garrow_gcs_file_system, GARROW, GCS_FILE_SYSTEM, GArrowFileSystem)
struct _GArrowGCSFileSystemClass
diff --git a/c_glib/arrow-glib/file-system.hpp b/c_glib/arrow-glib/file-system.hpp
index f41fc6e9c75b0..c535958301c5c 100644
--- a/c_glib/arrow-glib/file-system.hpp
+++ b/c_glib/arrow-glib/file-system.hpp
@@ -23,28 +23,35 @@
#include
+GARROW_EXTERN
GArrowFileInfo *
garrow_file_info_new_raw(const arrow::fs::FileInfo &arrow_file_info);
+GARROW_EXTERN
arrow::fs::FileInfo *
garrow_file_info_get_raw(GArrowFileInfo *file_info);
+GARROW_EXTERN
GArrowFileSystem *
garrow_file_system_new_raw(std::shared_ptr *arrow_file_system);
+GARROW_EXTERN
std::shared_ptr
garrow_file_system_get_raw(GArrowFileSystem *file_system);
+GARROW_EXTERN
GArrowSubTreeFileSystem *
garrow_sub_tree_file_system_new_raw(
std::shared_ptr *arrow_file_system,
GArrowFileSystem *base_file_system);
+GARROW_EXTERN
GArrowSlowFileSystem *
garrow_slow_file_system_new_raw(std::shared_ptr *arrow_file_system,
GArrowFileSystem *base_file_system);
#ifdef ARROW_S3
+GARROW_EXTERN
arrow::fs::S3GlobalOptions *
garrow_s3_global_options_get_raw(GArrowS3GlobalOptions *options);
#endif
diff --git a/c_glib/arrow-glib/file.h b/c_glib/arrow-glib/file.h
index 42afed139463c..799dd83b9c243 100644
--- a/c_glib/arrow-glib/file.h
+++ b/c_glib/arrow-glib/file.h
@@ -27,15 +27,22 @@
G_BEGIN_DECLS
#define GARROW_TYPE_FILE (garrow_file_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_INTERFACE(GArrowFile, garrow_file, GARROW, FILE, GObject)
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_file_close(GArrowFile *file, GError **error);
+
GARROW_AVAILABLE_IN_0_13
gboolean
garrow_file_is_closed(GArrowFile *file);
+
+GARROW_AVAILABLE_IN_ALL
gint64
garrow_file_tell(GArrowFile *file, GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GArrowFileMode
garrow_file_get_mode(GArrowFile *file);
diff --git a/c_glib/arrow-glib/input-stream.cpp b/c_glib/arrow-glib/input-stream.cpp
index 03a3f03fff7ce..52c79993e4ca8 100644
--- a/c_glib/arrow-glib/input-stream.cpp
+++ b/c_glib/arrow-glib/input-stream.cpp
@@ -35,6 +35,22 @@
#include
#include
+static std::shared_ptr
+garrow_input_stream_get_raw_file_interface(GArrowFile *file)
+{
+ auto input_stream = GARROW_INPUT_STREAM(file);
+ auto arrow_input_stream = garrow_input_stream_get_raw(input_stream);
+ return arrow_input_stream;
+}
+
+static std::shared_ptr
+garrow_input_stream_get_raw_readable_interface(GArrowReadable *readable)
+{
+ auto input_stream = GARROW_INPUT_STREAM(readable);
+ auto arrow_input_stream = garrow_input_stream_get_raw(input_stream);
+ return arrow_input_stream;
+}
+
G_BEGIN_DECLS
/**
@@ -71,28 +87,12 @@ enum {
PROP_INPUT_STREAM = 1
};
-static std::shared_ptr
-garrow_input_stream_get_raw_file_interface(GArrowFile *file)
-{
- auto input_stream = GARROW_INPUT_STREAM(file);
- auto arrow_input_stream = garrow_input_stream_get_raw(input_stream);
- return arrow_input_stream;
-}
-
static void
garrow_input_stream_file_interface_init(GArrowFileInterface *iface)
{
iface->get_raw = garrow_input_stream_get_raw_file_interface;
}
-static std::shared_ptr
-garrow_input_stream_get_raw_readable_interface(GArrowReadable *readable)
-{
- auto input_stream = GARROW_INPUT_STREAM(readable);
- auto arrow_input_stream = garrow_input_stream_get_raw(input_stream);
- return arrow_input_stream;
-}
-
static void
garrow_input_stream_readable_interface_init(GArrowReadableInterface *iface)
{
diff --git a/c_glib/arrow-glib/input-stream.h b/c_glib/arrow-glib/input-stream.h
index 3e2a2ecdbd4fa..676f2f44b0041 100644
--- a/c_glib/arrow-glib/input-stream.h
+++ b/c_glib/arrow-glib/input-stream.h
@@ -30,6 +30,7 @@
G_BEGIN_DECLS
#define GARROW_TYPE_INPUT_STREAM (garrow_input_stream_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowInputStream, garrow_input_stream, GARROW, INPUT_STREAM, GInputStream)
struct _GArrowInputStreamClass
@@ -37,16 +38,22 @@ struct _GArrowInputStreamClass
GInputStreamClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_input_stream_advance(GArrowInputStream *input_stream,
gint64 n_bytes,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_input_stream_align(GArrowInputStream *input_stream,
gint32 alignment,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GArrowTensor *
garrow_input_stream_read_tensor(GArrowInputStream *input_stream, GError **error);
+
GARROW_AVAILABLE_IN_1_0
GArrowRecordBatch *
garrow_input_stream_read_record_batch(GArrowInputStream *input_stream,
@@ -55,6 +62,7 @@ garrow_input_stream_read_record_batch(GArrowInputStream *input_stream,
GError **error);
#define GARROW_TYPE_SEEKABLE_INPUT_STREAM (garrow_seekable_input_stream_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowSeekableInputStream,
garrow_seekable_input_stream,
GARROW,
@@ -65,12 +73,17 @@ struct _GArrowSeekableInputStreamClass
GArrowInputStreamClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
guint64
garrow_seekable_input_stream_get_size(GArrowSeekableInputStream *input_stream,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_seekable_input_stream_get_support_zero_copy(
GArrowSeekableInputStream *input_stream);
+
+GARROW_AVAILABLE_IN_ALL
GArrowBuffer *
garrow_seekable_input_stream_read_at(GArrowSeekableInputStream *input_stream,
gint64 position,
@@ -89,6 +102,7 @@ garrow_seekable_input_stream_peek(GArrowSeekableInputStream *input_stream,
GError **error);
#define GARROW_TYPE_BUFFER_INPUT_STREAM (garrow_buffer_input_stream_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowBufferInputStream,
garrow_buffer_input_stream,
GARROW,
@@ -99,13 +113,16 @@ struct _GArrowBufferInputStreamClass
GArrowSeekableInputStreamClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowBufferInputStream *
garrow_buffer_input_stream_new(GArrowBuffer *buffer);
+GARROW_AVAILABLE_IN_ALL
GArrowBuffer *
garrow_buffer_input_stream_get_buffer(GArrowBufferInputStream *input_stream);
#define GARROW_TYPE_FILE_INPUT_STREAM (garrow_file_input_stream_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowFileInputStream,
garrow_file_input_stream,
GARROW,
@@ -116,15 +133,21 @@ struct _GArrowFileInputStreamClass
GArrowSeekableInputStreamClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowFileInputStream *
garrow_file_input_stream_new(const gchar *path, GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GArrowFileInputStream *
garrow_file_input_stream_new_file_descriptor(gint file_descriptor, GError **error);
+
+GARROW_AVAILABLE_IN_ALL
gint
garrow_file_input_stream_get_file_descriptor(GArrowFileInputStream *stream);
#define GARROW_TYPE_MEMORY_MAPPED_INPUT_STREAM \
(garrow_memory_mapped_input_stream_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowMemoryMappedInputStream,
garrow_memory_mapped_input_stream,
GARROW,
@@ -135,10 +158,12 @@ struct _GArrowMemoryMappedInputStreamClass
GArrowSeekableInputStreamClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowMemoryMappedInputStream *
garrow_memory_mapped_input_stream_new(const gchar *path, GError **error);
#define GARROW_TYPE_GIO_INPUT_STREAM (garrow_gio_input_stream_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowGIOInputStream,
garrow_gio_input_stream,
GARROW,
@@ -149,15 +174,19 @@ struct _GArrowGIOInputStreamClass
GArrowSeekableInputStreamClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowGIOInputStream *
garrow_gio_input_stream_new(GInputStream *gio_input_stream);
+
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
G_GNUC_DEPRECATED
GInputStream *
garrow_gio_input_stream_get_raw(GArrowGIOInputStream *input_stream);
#endif
#define GARROW_TYPE_COMPRESSED_INPUT_STREAM (garrow_compressed_input_stream_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowCompressedInputStream,
garrow_compressed_input_stream,
GARROW,
@@ -168,6 +197,7 @@ struct _GArrowCompressedInputStreamClass
GArrowInputStreamClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowCompressedInputStream *
garrow_compressed_input_stream_new(GArrowCodec *codec,
GArrowInputStream *raw,
diff --git a/c_glib/arrow-glib/input-stream.hpp b/c_glib/arrow-glib/input-stream.hpp
index 7ae759370ddbd..0400398c4777f 100644
--- a/c_glib/arrow-glib/input-stream.hpp
+++ b/c_glib/arrow-glib/input-stream.hpp
@@ -26,34 +26,48 @@
#include
+GARROW_EXTERN
GArrowInputStream *
garrow_input_stream_new_raw(std::shared_ptr *arrow_input_stream);
+
+GARROW_EXTERN
std::shared_ptr
garrow_input_stream_get_raw(GArrowInputStream *input_stream);
+GARROW_EXTERN
GArrowSeekableInputStream *
garrow_seekable_input_stream_new_raw(
std::shared_ptr *arrow_random_access_file);
+
+GARROW_EXTERN
std::shared_ptr
garrow_seekable_input_stream_get_raw(GArrowSeekableInputStream *input_stream);
+GARROW_EXTERN
GArrowBufferInputStream *
garrow_buffer_input_stream_new_raw(
std::shared_ptr *arrow_buffer_reader, GArrowBuffer *buffer);
+
+GARROW_EXTERN
std::shared_ptr
garrow_buffer_input_stream_get_raw(GArrowBufferInputStream *input_stream);
+GARROW_EXTERN
GArrowFileInputStream *
garrow_file_input_stream_new_raw(std::shared_ptr *arrow_stream);
+GARROW_EXTERN
GArrowMemoryMappedInputStream *
garrow_memory_mapped_input_stream_new_raw(
std::shared_ptr *arrow_stream);
+GARROW_EXTERN
GArrowCompressedInputStream *
garrow_compressed_input_stream_new_raw(
std::shared_ptr *arrow_raw,
GArrowCodec *codec,
GArrowInputStream *raw);
+
+GARROW_EXTERN
std::shared_ptr
garrow_compressed_input_stream_get_raw(GArrowCompressedInputStream *stream);
diff --git a/c_glib/arrow-glib/interval.h b/c_glib/arrow-glib/interval.h
index a6c9e1ff1e1ef..8c23b9a509bb4 100644
--- a/c_glib/arrow-glib/interval.h
+++ b/c_glib/arrow-glib/interval.h
@@ -26,6 +26,7 @@
G_BEGIN_DECLS
#define GARROW_TYPE_DAY_MILLISECOND (garrow_day_millisecond_get_type())
+GARROW_AVAILABLE_IN_8_0
G_DECLARE_DERIVABLE_TYPE(
GArrowDayMillisecond, garrow_day_millisecond, GARROW, DAY_MILLISECOND, GObject)
@@ -47,6 +48,7 @@ garrow_day_millisecond_less_than(GArrowDayMillisecond *day_millisecond,
GArrowDayMillisecond *other_day_millisecond);
#define GARROW_TYPE_MONTH_DAY_NANO (garrow_month_day_nano_get_type())
+GARROW_AVAILABLE_IN_8_0
G_DECLARE_DERIVABLE_TYPE(
GArrowMonthDayNano, garrow_month_day_nano, GARROW, MONTH_DAY_NANO, GObject)
diff --git a/c_glib/arrow-glib/ipc-options.h b/c_glib/arrow-glib/ipc-options.h
index 418b08f080152..1ddff059d2faf 100644
--- a/c_glib/arrow-glib/ipc-options.h
+++ b/c_glib/arrow-glib/ipc-options.h
@@ -26,6 +26,7 @@
G_BEGIN_DECLS
#define GARROW_TYPE_READ_OPTIONS (garrow_read_options_get_type())
+GARROW_AVAILABLE_IN_1_0
G_DECLARE_DERIVABLE_TYPE(
GArrowReadOptions, garrow_read_options, GARROW, READ_OPTIONS, GObject)
struct _GArrowReadOptionsClass
@@ -46,6 +47,7 @@ garrow_read_options_set_included_fields(GArrowReadOptions *options,
gsize n_fields);
#define GARROW_TYPE_WRITE_OPTIONS (garrow_write_options_get_type())
+GARROW_AVAILABLE_IN_1_0
G_DECLARE_DERIVABLE_TYPE(
GArrowWriteOptions, garrow_write_options, GARROW, WRITE_OPTIONS, GObject)
struct _GArrowWriteOptionsClass
diff --git a/c_glib/arrow-glib/ipc-options.hpp b/c_glib/arrow-glib/ipc-options.hpp
index f57fbd3c11e5a..838d05d41dbac 100644
--- a/c_glib/arrow-glib/ipc-options.hpp
+++ b/c_glib/arrow-glib/ipc-options.hpp
@@ -23,10 +23,14 @@
#include
+GARROW_EXTERN
arrow::ipc::IpcReadOptions *
garrow_read_options_get_raw(GArrowReadOptions *options);
+
+GARROW_EXTERN
arrow::ipc::DictionaryMemo *
garrow_read_options_get_dictionary_memo_raw(GArrowReadOptions *options);
+GARROW_EXTERN
arrow::ipc::IpcWriteOptions *
garrow_write_options_get_raw(GArrowWriteOptions *options);
diff --git a/c_glib/arrow-glib/local-file-system.h b/c_glib/arrow-glib/local-file-system.h
index 9af4f8e8b168d..6ad2ee9f231ab 100644
--- a/c_glib/arrow-glib/local-file-system.h
+++ b/c_glib/arrow-glib/local-file-system.h
@@ -27,6 +27,7 @@ G_BEGIN_DECLS
#define GARROW_TYPE_LOCAL_FILE_SYSTEM_OPTIONS \
(garrow_local_file_system_options_get_type())
+GARROW_AVAILABLE_IN_0_17
G_DECLARE_DERIVABLE_TYPE(GArrowLocalFileSystemOptions,
garrow_local_file_system_options,
GARROW,
@@ -44,6 +45,7 @@ garrow_local_file_system_options_new(void);
/* arrow::fs::LocalFileSystem */
#define GARROW_TYPE_LOCAL_FILE_SYSTEM (garrow_local_file_system_get_type())
+GARROW_AVAILABLE_IN_0_17
G_DECLARE_DERIVABLE_TYPE(GArrowLocalFileSystem,
garrow_local_file_system,
GARROW,
diff --git a/c_glib/arrow-glib/memory-pool.h b/c_glib/arrow-glib/memory-pool.h
index de2a5d717a183..7da15a9eb1b47 100644
--- a/c_glib/arrow-glib/memory-pool.h
+++ b/c_glib/arrow-glib/memory-pool.h
@@ -21,9 +21,12 @@
#include
+#include
+
G_BEGIN_DECLS
#define GARROW_TYPE_MEMORY_POOL (garrow_memory_pool_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowMemoryPool, garrow_memory_pool, GARROW, MEMORY_POOL, GObject)
struct _GArrowMemoryPoolClass
@@ -31,12 +34,19 @@ struct _GArrowMemoryPoolClass
GObjectClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowMemoryPool *
garrow_memory_pool_default();
+
+GARROW_AVAILABLE_IN_ALL
gint64
garrow_memory_pool_get_bytes_allocated(GArrowMemoryPool *memory_pool);
+
+GARROW_AVAILABLE_IN_ALL
gint64
garrow_memory_pool_get_max_memory(GArrowMemoryPool *memory_pool);
+
+GARROW_AVAILABLE_IN_ALL
gchar *
garrow_memory_pool_get_backend_name(GArrowMemoryPool *memory_pool);
diff --git a/c_glib/arrow-glib/meson.build b/c_glib/arrow-glib/meson.build
index 67909ff22c428..fd32b35badcb1 100644
--- a/c_glib/arrow-glib/meson.build
+++ b/c_glib/arrow-glib/meson.build
@@ -205,14 +205,12 @@ cpp_internal_headers = files(
'internal-index.hpp',
)
-version_h_conf = configuration_data()
-version_h_conf.set('GARROW_VERSION_MAJOR', version_major)
-version_h_conf.set('GARROW_VERSION_MINOR', version_minor)
-version_h_conf.set('GARROW_VERSION_MICRO', version_micro)
-version_h_conf.set('GARROW_VERSION_TAG', version_tag)
-version_h = configure_file(input: 'version.h.in',
- output: 'version.h',
- configuration: version_h_conf)
+version_h = configure_file(
+ input: 'version.h.in',
+ output: 'version.h',
+ command: [python3, generate_version_header_py, '--library', 'GARROW', '--version', version, '--input', '@INPUT@', '--output', '@OUTPUT@'],
+)
+
c_headers += version_h
enums = gnome.mkenums('enums',
@@ -226,11 +224,9 @@ enums = gnome.mkenums('enums',
enums_source = enums[0]
enums_header = enums[1]
-
headers = c_headers + cpp_headers
install_headers(headers, subdir: meson.project_name())
-
gobject = dependency('gobject-2.0')
gobject_libdir = gobject.get_variable(pkgconfig: 'libdir')
# This is for Homebrew. "pkg-config --cflags gio-2.0" includes the
@@ -253,6 +249,7 @@ libarrow_glib = library('arrow-glib',
dependencies: dependencies,
implicit_include_directories: false,
include_directories: base_include_directories,
+ cpp_args: ['-DGARROW_COMPILATION'],
soversion: so_version,
version: library_version)
arrow_glib = declare_dependency(link_with: libarrow_glib,
diff --git a/c_glib/arrow-glib/orc-file-reader.h b/c_glib/arrow-glib/orc-file-reader.h
index 20089eb2866c6..4eb3df5242e48 100644
--- a/c_glib/arrow-glib/orc-file-reader.h
+++ b/c_glib/arrow-glib/orc-file-reader.h
@@ -24,6 +24,7 @@
G_BEGIN_DECLS
#define GARROW_TYPE_ORC_FILE_READER (garrow_orc_file_reader_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowORCFileReader, garrow_orc_file_reader, GARROW, ORC_FILE_READER, GObject)
struct _GArrowORCFileReaderClass
@@ -31,10 +32,12 @@ struct _GArrowORCFileReaderClass
GObjectClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowORCFileReader *
garrow_orc_file_reader_new(GArrowSeekableInputStream *file, GError **error);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_0_12_FOR(garrow_orc_file_reader_set_field_indices)
void
garrow_orc_file_reader_set_field_indexes(GArrowORCFileReader *reader,
@@ -47,6 +50,7 @@ garrow_orc_file_reader_set_field_indices(GArrowORCFileReader *reader,
const gint *field_indices,
guint n_field_indices);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_0_12_FOR(garrow_orc_file_reader_get_field_indices)
const gint *
garrow_orc_file_reader_get_field_indexes(GArrowORCFileReader *reader,
@@ -56,14 +60,24 @@ GARROW_AVAILABLE_IN_0_12
const gint *
garrow_orc_file_reader_get_field_indices(GArrowORCFileReader *reader,
guint *n_field_indices);
+
+GARROW_AVAILABLE_IN_ALL
GArrowSchema *
garrow_orc_file_reader_read_type(GArrowORCFileReader *reader, GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GArrowTable *
garrow_orc_file_reader_read_stripes(GArrowORCFileReader *reader, GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GArrowRecordBatch *
garrow_orc_file_reader_read_stripe(GArrowORCFileReader *reader, gint64 i, GError **error);
+
+GARROW_AVAILABLE_IN_ALL
gint64
garrow_orc_file_reader_get_n_stripes(GArrowORCFileReader *reader);
+
+GARROW_AVAILABLE_IN_ALL
gint64
garrow_orc_file_reader_get_n_rows(GArrowORCFileReader *reader);
diff --git a/c_glib/arrow-glib/output-stream.cpp b/c_glib/arrow-glib/output-stream.cpp
index 83de2eb38a72a..d9bdf7ad8b786 100644
--- a/c_glib/arrow-glib/output-stream.cpp
+++ b/c_glib/arrow-glib/output-stream.cpp
@@ -33,6 +33,22 @@
#include
#include
+static std::shared_ptr
+garrow_output_stream_get_raw_file_interface(GArrowFile *file)
+{
+ auto output_stream = GARROW_OUTPUT_STREAM(file);
+ auto arrow_output_stream = garrow_output_stream_get_raw(output_stream);
+ return arrow_output_stream;
+}
+
+static std::shared_ptr
+garrow_output_stream_get_raw_writable_interface(GArrowWritable *writable)
+{
+ auto output_stream = GARROW_OUTPUT_STREAM(writable);
+ auto arrow_output_stream = garrow_output_stream_get_raw(output_stream);
+ return arrow_output_stream;
+}
+
G_BEGIN_DECLS
/**
@@ -65,28 +81,12 @@ enum {
PROP_OUTPUT_STREAM
};
-static std::shared_ptr
-garrow_output_stream_get_raw_file_interface(GArrowFile *file)
-{
- auto output_stream = GARROW_OUTPUT_STREAM(file);
- auto arrow_output_stream = garrow_output_stream_get_raw(output_stream);
- return arrow_output_stream;
-}
-
static void
garrow_output_stream_file_interface_init(GArrowFileInterface *iface)
{
iface->get_raw = garrow_output_stream_get_raw_file_interface;
}
-static std::shared_ptr
-garrow_output_stream_get_raw_writable_interface(GArrowWritable *writable)
-{
- auto output_stream = GARROW_OUTPUT_STREAM(writable);
- auto arrow_output_stream = garrow_output_stream_get_raw(output_stream);
- return arrow_output_stream;
-}
-
static void
garrow_output_stream_writable_interface_init(GArrowWritableInterface *iface)
{
diff --git a/c_glib/arrow-glib/output-stream.h b/c_glib/arrow-glib/output-stream.h
index 1b18c08c14a5f..5c8b4b9374fc6 100644
--- a/c_glib/arrow-glib/output-stream.h
+++ b/c_glib/arrow-glib/output-stream.h
@@ -30,6 +30,7 @@
G_BEGIN_DECLS
#define GARROW_TYPE_OUTPUT_STREAM (garrow_output_stream_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowOutputStream, garrow_output_stream, GARROW, OUTPUT_STREAM, GObject)
struct _GArrowOutputStreamClass
@@ -37,8 +38,11 @@ struct _GArrowOutputStreamClass
GObjectClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_output_stream_align(GArrowOutputStream *stream, gint32 alignment, GError **error);
+
+GARROW_AVAILABLE_IN_ALL
gint64
garrow_output_stream_write_tensor(GArrowOutputStream *stream,
GArrowTensor *tensor,
@@ -51,6 +55,7 @@ garrow_output_stream_write_record_batch(GArrowOutputStream *stream,
GError **error);
#define GARROW_TYPE_FILE_OUTPUT_STREAM (garrow_file_output_stream_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowFileOutputStream,
garrow_file_output_stream,
GARROW,
@@ -61,10 +66,12 @@ struct _GArrowFileOutputStreamClass
GArrowOutputStreamClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowFileOutputStream *
garrow_file_output_stream_new(const gchar *path, gboolean append, GError **error);
#define GARROW_TYPE_BUFFER_OUTPUT_STREAM (garrow_buffer_output_stream_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowBufferOutputStream,
garrow_buffer_output_stream,
GARROW,
@@ -75,10 +82,12 @@ struct _GArrowBufferOutputStreamClass
GArrowOutputStreamClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowBufferOutputStream *
garrow_buffer_output_stream_new(GArrowResizableBuffer *buffer);
#define GARROW_TYPE_GIO_OUTPUT_STREAM (garrow_gio_output_stream_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowGIOOutputStream,
garrow_gio_output_stream,
GARROW,
@@ -89,15 +98,19 @@ struct _GArrowGIOOutputStreamClass
GArrowOutputStreamClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowGIOOutputStream *
garrow_gio_output_stream_new(GOutputStream *gio_output_stream);
+
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
G_GNUC_DEPRECATED
GOutputStream *
garrow_gio_output_stream_get_raw(GArrowGIOOutputStream *output_stream);
#endif
#define GARROW_TYPE_COMPRESSED_OUTPUT_STREAM (garrow_compressed_output_stream_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowCompressedOutputStream,
garrow_compressed_output_stream,
GARROW,
@@ -108,6 +121,7 @@ struct _GArrowCompressedOutputStreamClass
GArrowOutputStreamClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowCompressedOutputStream *
garrow_compressed_output_stream_new(GArrowCodec *codec,
GArrowOutputStream *raw,
diff --git a/c_glib/arrow-glib/output-stream.hpp b/c_glib/arrow-glib/output-stream.hpp
index e41c65da88d82..515d969efc245 100644
--- a/c_glib/arrow-glib/output-stream.hpp
+++ b/c_glib/arrow-glib/output-stream.hpp
@@ -25,23 +25,32 @@
#include
+GARROW_EXTERN
GArrowOutputStream *
garrow_output_stream_new_raw(
std::shared_ptr *arrow_output_stream);
+
+GARROW_EXTERN
std::shared_ptr
garrow_output_stream_get_raw(GArrowOutputStream *output_stream);
+GARROW_EXTERN
GArrowFileOutputStream *
garrow_file_output_stream_new_raw(
std::shared_ptr *arrow_file_output_stream);
+
+GARROW_EXTERN
GArrowBufferOutputStream *
garrow_buffer_output_stream_new_raw(
std::shared_ptr *arrow_buffer_output_stream);
+GARROW_EXTERN
GArrowCompressedOutputStream *
garrow_compressed_output_stream_new_raw(
std::shared_ptr *arrow_raw,
GArrowCodec *codec,
GArrowOutputStream *raw);
+
+GARROW_EXTERN
std::shared_ptr
garrow_compressed_output_stream_get_raw(GArrowCompressedOutputStream *stream);
diff --git a/c_glib/arrow-glib/readable.h b/c_glib/arrow-glib/readable.h
index d0b1f5b6a99ee..266b45849057e 100644
--- a/c_glib/arrow-glib/readable.h
+++ b/c_glib/arrow-glib/readable.h
@@ -25,10 +25,13 @@
G_BEGIN_DECLS
#define GARROW_TYPE_READABLE (garrow_readable_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_INTERFACE(GArrowReadable, garrow_readable, GARROW, READABLE, GObject)
+GARROW_AVAILABLE_IN_ALL
GArrowBuffer *
garrow_readable_read(GArrowReadable *readable, gint64 n_bytes, GError **error);
+
GARROW_AVAILABLE_IN_0_17
GBytes *
garrow_readable_read_bytes(GArrowReadable *readable, gint64 n_bytes, GError **error);
diff --git a/c_glib/arrow-glib/reader.h b/c_glib/arrow-glib/reader.h
index 96e4c5bbb5890..5401aa3bb1fc5 100644
--- a/c_glib/arrow-glib/reader.h
+++ b/c_glib/arrow-glib/reader.h
@@ -29,6 +29,7 @@
G_BEGIN_DECLS
#define GARROW_TYPE_RECORD_BATCH_READER (garrow_record_batch_reader_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowRecordBatchReader,
garrow_record_batch_reader,
GARROW,
@@ -53,22 +54,29 @@ GARROW_AVAILABLE_IN_6_0
gpointer
garrow_record_batch_reader_export(GArrowRecordBatchReader *reader, GError **error);
+GARROW_AVAILABLE_IN_ALL
GArrowSchema *
garrow_record_batch_reader_get_schema(GArrowRecordBatchReader *reader);
+
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
G_GNUC_DEPRECATED_FOR(garrow_record_batch_reader_read_next)
GArrowRecordBatch *
garrow_record_batch_reader_get_next_record_batch(GArrowRecordBatchReader *reader,
GError **error);
#endif
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
G_GNUC_DEPRECATED_FOR(garrow_record_batch_reader_read_next)
GArrowRecordBatch *
garrow_record_batch_reader_read_next_record_batch(GArrowRecordBatchReader *reader,
GError **error);
#endif
+
+GARROW_AVAILABLE_IN_ALL
GArrowRecordBatch *
garrow_record_batch_reader_read_next(GArrowRecordBatchReader *reader, GError **error);
+
GARROW_AVAILABLE_IN_6_0
GArrowTable *
garrow_record_batch_reader_read_all(GArrowRecordBatchReader *reader, GError **error);
@@ -78,6 +86,7 @@ GList *
garrow_record_batch_reader_get_sources(GArrowRecordBatchReader *reader);
#define GARROW_TYPE_TABLE_BATCH_READER (garrow_table_batch_reader_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowTableBatchReader,
garrow_table_batch_reader,
GARROW,
@@ -88,6 +97,7 @@ struct _GArrowTableBatchReaderClass
GArrowRecordBatchReaderClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowTableBatchReader *
garrow_table_batch_reader_new(GArrowTable *table);
@@ -98,6 +108,7 @@ garrow_table_batch_reader_set_max_chunk_size(GArrowTableBatchReader *reader,
#define GARROW_TYPE_RECORD_BATCH_STREAM_READER \
(garrow_record_batch_stream_reader_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowRecordBatchStreamReader,
garrow_record_batch_stream_reader,
GARROW,
@@ -108,10 +119,12 @@ struct _GArrowRecordBatchStreamReaderClass
GArrowRecordBatchReaderClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowRecordBatchStreamReader *
garrow_record_batch_stream_reader_new(GArrowInputStream *stream, GError **error);
#define GARROW_TYPE_RECORD_BATCH_FILE_READER (garrow_record_batch_file_reader_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowRecordBatchFileReader,
garrow_record_batch_file_reader,
GARROW,
@@ -122,28 +135,39 @@ struct _GArrowRecordBatchFileReaderClass
GObjectClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowRecordBatchFileReader *
garrow_record_batch_file_reader_new(GArrowSeekableInputStream *file, GError **error);
+GARROW_AVAILABLE_IN_ALL
GArrowSchema *
garrow_record_batch_file_reader_get_schema(GArrowRecordBatchFileReader *reader);
+
+GARROW_AVAILABLE_IN_ALL
guint
garrow_record_batch_file_reader_get_n_record_batches(GArrowRecordBatchFileReader *reader);
+
+GARROW_AVAILABLE_IN_ALL
GArrowMetadataVersion
garrow_record_batch_file_reader_get_version(GArrowRecordBatchFileReader *reader);
+
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
G_GNUC_DEPRECATED_FOR(garrow_record_batch_file_reader_read_record_batch)
GArrowRecordBatch *
garrow_record_batch_file_reader_get_record_batch(GArrowRecordBatchFileReader *reader,
guint i,
GError **error);
#endif
+
+GARROW_AVAILABLE_IN_ALL
GArrowRecordBatch *
garrow_record_batch_file_reader_read_record_batch(GArrowRecordBatchFileReader *reader,
guint i,
GError **error);
#define GARROW_TYPE_FEATHER_FILE_READER (garrow_feather_file_reader_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowFeatherFileReader,
garrow_feather_file_reader,
GARROW,
@@ -154,18 +178,26 @@ struct _GArrowFeatherFileReaderClass
GObjectClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowFeatherFileReader *
garrow_feather_file_reader_new(GArrowSeekableInputStream *file, GError **error);
+GARROW_AVAILABLE_IN_ALL
gint
garrow_feather_file_reader_get_version(GArrowFeatherFileReader *reader);
+
+GARROW_AVAILABLE_IN_ALL
GArrowTable *
garrow_feather_file_reader_read(GArrowFeatherFileReader *reader, GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GArrowTable *
garrow_feather_file_reader_read_indices(GArrowFeatherFileReader *reader,
const gint *indices,
guint n_indices,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GArrowTable *
garrow_feather_file_reader_read_names(GArrowFeatherFileReader *reader,
const gchar **names,
@@ -173,6 +205,7 @@ garrow_feather_file_reader_read_names(GArrowFeatherFileReader *reader,
GError **error);
#define GARROW_TYPE_CSV_READ_OPTIONS (garrow_csv_read_options_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowCSVReadOptions, garrow_csv_read_options, GARROW, CSV_READ_OPTIONS, GObject)
struct _GArrowCSVReadOptionsClass
@@ -180,16 +213,23 @@ struct _GArrowCSVReadOptionsClass
GObjectClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowCSVReadOptions *
garrow_csv_read_options_new(void);
+
+GARROW_AVAILABLE_IN_ALL
void
garrow_csv_read_options_add_column_type(GArrowCSVReadOptions *options,
const gchar *name,
GArrowDataType *data_type);
+GARROW_AVAILABLE_IN_ALL
void
garrow_csv_read_options_add_schema(GArrowCSVReadOptions *options, GArrowSchema *schema);
+
+GARROW_AVAILABLE_IN_ALL
GHashTable *
garrow_csv_read_options_get_column_types(GArrowCSVReadOptions *options);
+
GARROW_AVAILABLE_IN_0_14
void
garrow_csv_read_options_set_null_values(GArrowCSVReadOptions *options,
@@ -251,16 +291,20 @@ garrow_csv_read_options_add_timestamp_parser(GArrowCSVReadOptions *options,
GArrowTimestampParser *parser);
#define GARROW_TYPE_CSV_READER (garrow_csv_reader_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowCSVReader, garrow_csv_reader, GARROW, CSV_READER, GObject)
struct _GArrowCSVReaderClass
{
GObjectClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowCSVReader *
garrow_csv_reader_new(GArrowInputStream *input,
GArrowCSVReadOptions *options,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GArrowTable *
garrow_csv_reader_read(GArrowCSVReader *reader, GError **error);
@@ -279,6 +323,7 @@ typedef enum {
} GArrowJSONReadUnexpectedFieldBehavior;
#define GARROW_TYPE_JSON_READ_OPTIONS (garrow_json_read_options_get_type())
+GARROW_AVAILABLE_IN_0_14
G_DECLARE_DERIVABLE_TYPE(
GArrowJSONReadOptions, garrow_json_read_options, GARROW, JSON_READ_OPTIONS, GObject)
struct _GArrowJSONReadOptionsClass
@@ -291,6 +336,7 @@ GArrowJSONReadOptions *
garrow_json_read_options_new(void);
#define GARROW_TYPE_JSON_READER (garrow_json_reader_get_type())
+GARROW_AVAILABLE_IN_0_14
G_DECLARE_DERIVABLE_TYPE(
GArrowJSONReader, garrow_json_reader, GARROW, JSON_READER, GObject)
struct _GArrowJSONReaderClass
diff --git a/c_glib/arrow-glib/reader.hpp b/c_glib/arrow-glib/reader.hpp
index 192497ef52e31..beec6766af2e6 100644
--- a/c_glib/arrow-glib/reader.hpp
+++ b/c_glib/arrow-glib/reader.hpp
@@ -27,42 +27,61 @@
#include
+GARROW_EXTERN
GArrowRecordBatchReader *
garrow_record_batch_reader_new_raw(
std::shared_ptr *arrow_reader, GList *sources);
+
+GARROW_EXTERN
std::shared_ptr
garrow_record_batch_reader_get_raw(GArrowRecordBatchReader *reader);
+GARROW_EXTERN
GArrowTableBatchReader *
garrow_table_batch_reader_new_raw(std::shared_ptr *arrow_reader,
GArrowTable *table);
+
+GARROW_EXTERN
std::shared_ptr
garrow_table_batch_reader_get_raw(GArrowTableBatchReader *reader);
+GARROW_EXTERN
GArrowRecordBatchStreamReader *
garrow_record_batch_stream_reader_new_raw(
std::shared_ptr *arrow_reader);
+GARROW_EXTERN
GArrowRecordBatchFileReader *
garrow_record_batch_file_reader_new_raw(
std::shared_ptr *arrow_reader);
+
+GARROW_EXTERN
std::shared_ptr
garrow_record_batch_file_reader_get_raw(GArrowRecordBatchFileReader *reader);
+GARROW_EXTERN
GArrowFeatherFileReader *
garrow_feather_file_reader_new_raw(
std::shared_ptr *arrow_reader);
+
+GARROW_EXTERN
std::shared_ptr
garrow_feather_file_reader_get_raw(GArrowFeatherFileReader *reader);
+GARROW_EXTERN
GArrowCSVReader *
garrow_csv_reader_new_raw(std::shared_ptr *arrow_reader,
GArrowInputStream *input);
+
+GARROW_EXTERN
std::shared_ptr
garrow_csv_reader_get_raw(GArrowCSVReader *reader);
+GARROW_EXTERN
GArrowJSONReader *
garrow_json_reader_new_raw(std::shared_ptr *arrow_reader,
GArrowInputStream *input);
+
+GARROW_EXTERN
std::shared_ptr
garrow_json_reader_get_raw(GArrowJSONReader *reader);
diff --git a/c_glib/arrow-glib/record-batch.h b/c_glib/arrow-glib/record-batch.h
index 3c995658224cb..e7ffd83795ed4 100644
--- a/c_glib/arrow-glib/record-batch.h
+++ b/c_glib/arrow-glib/record-batch.h
@@ -26,6 +26,7 @@
G_BEGIN_DECLS
#define GARROW_TYPE_RECORD_BATCH (garrow_record_batch_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowRecordBatch, garrow_record_batch, GARROW, RECORD_BATCH, GObject)
struct _GArrowRecordBatchClass
@@ -37,6 +38,7 @@ GARROW_AVAILABLE_IN_6_0
GArrowRecordBatch *
garrow_record_batch_import(gpointer c_abi_array, GArrowSchema *schema, GError **error);
+GARROW_AVAILABLE_IN_ALL
GArrowRecordBatch *
garrow_record_batch_new(GArrowSchema *schema,
guint32 n_rows,
@@ -50,6 +52,7 @@ garrow_record_batch_export(GArrowRecordBatch *record_batch,
gpointer *c_abi_schema,
GError **error);
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_record_batch_equal(GArrowRecordBatch *record_batch,
GArrowRecordBatch *other_record_batch);
@@ -59,28 +62,43 @@ garrow_record_batch_equal_metadata(GArrowRecordBatch *record_batch,
GArrowRecordBatch *other_record_batch,
gboolean check_metadata);
+GARROW_AVAILABLE_IN_ALL
GArrowSchema *
garrow_record_batch_get_schema(GArrowRecordBatch *record_batch);
+
GARROW_AVAILABLE_IN_0_15
GArrowArray *
garrow_record_batch_get_column_data(GArrowRecordBatch *record_batch, gint i);
+
+GARROW_AVAILABLE_IN_ALL
const gchar *
garrow_record_batch_get_column_name(GArrowRecordBatch *record_batch, gint i);
+
+GARROW_AVAILABLE_IN_ALL
guint
garrow_record_batch_get_n_columns(GArrowRecordBatch *record_batch);
+
+GARROW_AVAILABLE_IN_ALL
gint64
garrow_record_batch_get_n_rows(GArrowRecordBatch *record_batch);
+
+GARROW_AVAILABLE_IN_ALL
GArrowRecordBatch *
garrow_record_batch_slice(GArrowRecordBatch *record_batch, gint64 offset, gint64 length);
+GARROW_AVAILABLE_IN_ALL
gchar *
garrow_record_batch_to_string(GArrowRecordBatch *record_batch, GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GArrowRecordBatch *
garrow_record_batch_add_column(GArrowRecordBatch *record_batch,
guint i,
GArrowField *field,
GArrowArray *column,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GArrowRecordBatch *
garrow_record_batch_remove_column(GArrowRecordBatch *record_batch,
guint i,
@@ -92,6 +110,7 @@ garrow_record_batch_serialize(GArrowRecordBatch *record_batch,
GError **error);
#define GARROW_TYPE_RECORD_BATCH_ITERATOR (garrow_record_batch_iterator_get_type())
+GARROW_AVAILABLE_IN_0_17
G_DECLARE_DERIVABLE_TYPE(GArrowRecordBatchIterator,
garrow_record_batch_iterator,
GARROW,
diff --git a/c_glib/arrow-glib/record-batch.hpp b/c_glib/arrow-glib/record-batch.hpp
index 4c3e5e8a78231..75c0432b390ba 100644
--- a/c_glib/arrow-glib/record-batch.hpp
+++ b/c_glib/arrow-glib/record-batch.hpp
@@ -23,13 +23,18 @@
#include
+GARROW_EXTERN
GArrowRecordBatch *
garrow_record_batch_new_raw(std::shared_ptr *arrow_record_batch);
+
+GARROW_EXTERN
std::shared_ptr
garrow_record_batch_get_raw(GArrowRecordBatch *record_batch);
+GARROW_EXTERN
GArrowRecordBatchIterator *
garrow_record_batch_iterator_new_raw(arrow::RecordBatchIterator *arrow_iterator);
+GARROW_EXTERN
arrow::RecordBatchIterator *
garrow_record_batch_iterator_get_raw(GArrowRecordBatchIterator *iterator);
diff --git a/c_glib/arrow-glib/scalar.h b/c_glib/arrow-glib/scalar.h
index b4a6229c62fd1..5f9015d29c61c 100644
--- a/c_glib/arrow-glib/scalar.h
+++ b/c_glib/arrow-glib/scalar.h
@@ -25,6 +25,7 @@
G_BEGIN_DECLS
#define GARROW_TYPE_SCALAR (garrow_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(GArrowScalar, garrow_scalar, GARROW, SCALAR, GObject)
struct _GArrowScalarClass
{
@@ -64,6 +65,7 @@ garrow_scalar_cast(GArrowScalar *scalar,
GError **error);
#define GARROW_TYPE_NULL_SCALAR (garrow_null_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(
GArrowNullScalar, garrow_null_scalar, GARROW, NULL_SCALAR, GArrowScalar)
struct _GArrowNullScalarClass
@@ -76,6 +78,7 @@ GArrowNullScalar *
garrow_null_scalar_new(void);
#define GARROW_TYPE_BOOLEAN_SCALAR (garrow_boolean_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(
GArrowBooleanScalar, garrow_boolean_scalar, GARROW, BOOLEAN_SCALAR, GArrowScalar)
struct _GArrowBooleanScalarClass
@@ -91,6 +94,7 @@ gboolean
garrow_boolean_scalar_get_value(GArrowBooleanScalar *scalar);
#define GARROW_TYPE_INT8_SCALAR (garrow_int8_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(
GArrowInt8Scalar, garrow_int8_scalar, GARROW, INT8_SCALAR, GArrowScalar)
struct _GArrowInt8ScalarClass
@@ -106,6 +110,7 @@ gint8
garrow_int8_scalar_get_value(GArrowInt8Scalar *scalar);
#define GARROW_TYPE_INT16_SCALAR (garrow_int16_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(
GArrowInt16Scalar, garrow_int16_scalar, GARROW, INT16_SCALAR, GArrowScalar)
struct _GArrowInt16ScalarClass
@@ -121,6 +126,7 @@ gint16
garrow_int16_scalar_get_value(GArrowInt16Scalar *scalar);
#define GARROW_TYPE_INT32_SCALAR (garrow_int32_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(
GArrowInt32Scalar, garrow_int32_scalar, GARROW, INT32_SCALAR, GArrowScalar)
struct _GArrowInt32ScalarClass
@@ -136,6 +142,7 @@ gint32
garrow_int32_scalar_get_value(GArrowInt32Scalar *scalar);
#define GARROW_TYPE_INT64_SCALAR (garrow_int64_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(
GArrowInt64Scalar, garrow_int64_scalar, GARROW, INT64_SCALAR, GArrowScalar)
struct _GArrowInt64ScalarClass
@@ -151,6 +158,7 @@ gint64
garrow_int64_scalar_get_value(GArrowInt64Scalar *scalar);
#define GARROW_TYPE_UINT8_SCALAR (garrow_uint8_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(
GArrowUInt8Scalar, garrow_uint8_scalar, GARROW, UINT8_SCALAR, GArrowScalar)
struct _GArrowUInt8ScalarClass
@@ -166,6 +174,7 @@ guint8
garrow_uint8_scalar_get_value(GArrowUInt8Scalar *scalar);
#define GARROW_TYPE_UINT16_SCALAR (garrow_uint16_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(
GArrowUInt16Scalar, garrow_uint16_scalar, GARROW, UINT16_SCALAR, GArrowScalar)
struct _GArrowUInt16ScalarClass
@@ -181,6 +190,7 @@ guint16
garrow_uint16_scalar_get_value(GArrowUInt16Scalar *scalar);
#define GARROW_TYPE_UINT32_SCALAR (garrow_uint32_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(
GArrowUInt32Scalar, garrow_uint32_scalar, GARROW, UINT32_SCALAR, GArrowScalar)
struct _GArrowUInt32ScalarClass
@@ -196,6 +206,7 @@ guint32
garrow_uint32_scalar_get_value(GArrowUInt32Scalar *scalar);
#define GARROW_TYPE_UINT64_SCALAR (garrow_uint64_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(
GArrowUInt64Scalar, garrow_uint64_scalar, GARROW, UINT64_SCALAR, GArrowScalar)
struct _GArrowUInt64ScalarClass
@@ -211,6 +222,7 @@ guint64
garrow_uint64_scalar_get_value(GArrowUInt64Scalar *scalar);
#define GARROW_TYPE_HALF_FLOAT_SCALAR (garrow_half_float_scalar_get_type())
+GARROW_AVAILABLE_IN_11_0
G_DECLARE_DERIVABLE_TYPE(GArrowHalfFloatScalar,
garrow_half_float_scalar,
GARROW,
@@ -229,6 +241,7 @@ guint16
garrow_half_float_scalar_get_value(GArrowHalfFloatScalar *scalar);
#define GARROW_TYPE_FLOAT_SCALAR (garrow_float_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(
GArrowFloatScalar, garrow_float_scalar, GARROW, FLOAT_SCALAR, GArrowScalar)
struct _GArrowFloatScalarClass
@@ -244,6 +257,7 @@ gfloat
garrow_float_scalar_get_value(GArrowFloatScalar *scalar);
#define GARROW_TYPE_DOUBLE_SCALAR (garrow_double_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(
GArrowDoubleScalar, garrow_double_scalar, GARROW, DOUBLE_SCALAR, GArrowScalar)
struct _GArrowDoubleScalarClass
@@ -259,6 +273,7 @@ gdouble
garrow_double_scalar_get_value(GArrowDoubleScalar *scalar);
#define GARROW_TYPE_BASE_BINARY_SCALAR (garrow_base_binary_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(GArrowBaseBinaryScalar,
garrow_base_binary_scalar,
GARROW,
@@ -274,6 +289,7 @@ GArrowBuffer *
garrow_base_binary_scalar_get_value(GArrowBaseBinaryScalar *scalar);
#define GARROW_TYPE_BINARY_SCALAR (garrow_binary_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(
GArrowBinaryScalar, garrow_binary_scalar, GARROW, BINARY_SCALAR, GArrowBaseBinaryScalar)
struct _GArrowBinaryScalarClass
@@ -286,6 +302,7 @@ GArrowBinaryScalar *
garrow_binary_scalar_new(GArrowBuffer *value);
#define GARROW_TYPE_STRING_SCALAR (garrow_string_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(
GArrowStringScalar, garrow_string_scalar, GARROW, STRING_SCALAR, GArrowBaseBinaryScalar)
struct _GArrowStringScalarClass
@@ -298,6 +315,7 @@ GArrowStringScalar *
garrow_string_scalar_new(GArrowBuffer *value);
#define GARROW_TYPE_LARGE_BINARY_SCALAR (garrow_large_binary_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(GArrowLargeBinaryScalar,
garrow_large_binary_scalar,
GARROW,
@@ -313,6 +331,7 @@ GArrowLargeBinaryScalar *
garrow_large_binary_scalar_new(GArrowBuffer *value);
#define GARROW_TYPE_LARGE_STRING_SCALAR (garrow_large_string_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(GArrowLargeStringScalar,
garrow_large_string_scalar,
GARROW,
@@ -328,6 +347,7 @@ GArrowLargeStringScalar *
garrow_large_string_scalar_new(GArrowBuffer *value);
#define GARROW_TYPE_FIXED_SIZE_BINARY_SCALAR (garrow_fixed_size_binary_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(GArrowFixedSizeBinaryScalar,
garrow_fixed_size_binary_scalar,
GARROW,
@@ -344,6 +364,7 @@ garrow_fixed_size_binary_scalar_new(GArrowFixedSizeBinaryDataType *data_type,
GArrowBuffer *value);
#define GARROW_TYPE_DATE32_SCALAR (garrow_date32_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(
GArrowDate32Scalar, garrow_date32_scalar, GARROW, DATE32_SCALAR, GArrowScalar)
struct _GArrowDate32ScalarClass
@@ -359,6 +380,7 @@ gint32
garrow_date32_scalar_get_value(GArrowDate32Scalar *scalar);
#define GARROW_TYPE_DATE64_SCALAR (garrow_date64_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(
GArrowDate64Scalar, garrow_date64_scalar, GARROW, DATE64_SCALAR, GArrowScalar)
struct _GArrowDate64ScalarClass
@@ -374,6 +396,7 @@ gint64
garrow_date64_scalar_get_value(GArrowDate64Scalar *scalar);
#define GARROW_TYPE_TIME32_SCALAR (garrow_time32_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(
GArrowTime32Scalar, garrow_time32_scalar, GARROW, TIME32_SCALAR, GArrowScalar)
struct _GArrowTime32ScalarClass
@@ -389,6 +412,7 @@ gint32
garrow_time32_scalar_get_value(GArrowTime32Scalar *scalar);
#define GARROW_TYPE_TIME64_SCALAR (garrow_time64_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(
GArrowTime64Scalar, garrow_time64_scalar, GARROW, TIME64_SCALAR, GArrowScalar)
struct _GArrowTime64ScalarClass
@@ -404,6 +428,7 @@ gint64
garrow_time64_scalar_get_value(GArrowTime64Scalar *scalar);
#define GARROW_TYPE_TIMESTAMP_SCALAR (garrow_timestamp_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(
GArrowTimestampScalar, garrow_timestamp_scalar, GARROW, TIMESTAMP_SCALAR, GArrowScalar)
struct _GArrowTimestampScalarClass
@@ -419,6 +444,7 @@ gint64
garrow_timestamp_scalar_get_value(GArrowTimestampScalar *scalar);
#define GARROW_TYPE_MONTH_INTERVAL_SCALAR (garrow_month_interval_scalar_get_type())
+GARROW_AVAILABLE_IN_8_0
G_DECLARE_DERIVABLE_TYPE(GArrowMonthIntervalScalar,
garrow_month_interval_scalar,
GARROW,
@@ -437,6 +463,7 @@ gint32
garrow_month_interval_scalar_get_value(GArrowMonthIntervalScalar *scalar);
#define GARROW_TYPE_DAY_TIME_INTERVAL_SCALAR (garrow_day_time_interval_scalar_get_type())
+GARROW_AVAILABLE_IN_8_0
G_DECLARE_DERIVABLE_TYPE(GArrowDayTimeIntervalScalar,
garrow_day_time_interval_scalar,
GARROW,
@@ -456,6 +483,7 @@ garrow_day_time_interval_scalar_get_value(GArrowDayTimeIntervalScalar *scalar);
#define GARROW_TYPE_MONTH_DAY_NANO_INTERVAL_SCALAR \
(garrow_month_day_nano_interval_scalar_get_type())
+GARROW_AVAILABLE_IN_8_0
G_DECLARE_DERIVABLE_TYPE(GArrowMonthDayNanoIntervalScalar,
garrow_month_day_nano_interval_scalar,
GARROW,
@@ -474,6 +502,7 @@ GArrowMonthDayNano *
garrow_month_day_nano_interval_scalar_get_value(GArrowMonthDayNanoIntervalScalar *scalar);
#define GARROW_TYPE_DECIMAL128_SCALAR (garrow_decimal128_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(GArrowDecimal128Scalar,
garrow_decimal128_scalar,
GARROW,
@@ -493,6 +522,7 @@ GArrowDecimal128 *
garrow_decimal128_scalar_get_value(GArrowDecimal128Scalar *scalar);
#define GARROW_TYPE_DECIMAL256_SCALAR (garrow_decimal256_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(GArrowDecimal256Scalar,
garrow_decimal256_scalar,
GARROW,
@@ -512,6 +542,7 @@ GArrowDecimal256 *
garrow_decimal256_scalar_get_value(GArrowDecimal256Scalar *scalar);
#define GARROW_TYPE_BASE_LIST_SCALAR (garrow_base_list_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(
GArrowBaseListScalar, garrow_base_list_scalar, GARROW, BASE_LIST_SCALAR, GArrowScalar)
struct _GArrowBaseListScalarClass
@@ -524,6 +555,7 @@ GArrowArray *
garrow_base_list_scalar_get_value(GArrowBaseListScalar *scalar);
#define GARROW_TYPE_LIST_SCALAR (garrow_list_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(
GArrowListScalar, garrow_list_scalar, GARROW, LIST_SCALAR, GArrowBaseListScalar)
struct _GArrowListScalarClass
@@ -536,6 +568,7 @@ GArrowListScalar *
garrow_list_scalar_new(GArrowListArray *value);
#define GARROW_TYPE_LARGE_LIST_SCALAR (garrow_large_list_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(GArrowLargeListScalar,
garrow_large_list_scalar,
GARROW,
@@ -551,6 +584,7 @@ GArrowLargeListScalar *
garrow_large_list_scalar_new(GArrowLargeListArray *value);
#define GARROW_TYPE_MAP_SCALAR (garrow_map_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(
GArrowMapScalar, garrow_map_scalar, GARROW, MAP_SCALAR, GArrowBaseListScalar)
struct _GArrowMapScalarClass
@@ -563,6 +597,7 @@ GArrowMapScalar *
garrow_map_scalar_new(GArrowStructArray *value);
#define GARROW_TYPE_STRUCT_SCALAR (garrow_struct_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(
GArrowStructScalar, garrow_struct_scalar, GARROW, STRUCT_SCALAR, GArrowScalar)
struct _GArrowStructScalarClass
@@ -578,6 +613,7 @@ GList *
garrow_struct_scalar_get_value(GArrowStructScalar *scalar);
#define GARROW_TYPE_UNION_SCALAR (garrow_union_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(
GArrowUnionScalar, garrow_union_scalar, GARROW, UNION_SCALAR, GArrowScalar)
struct _GArrowUnionScalarClass
@@ -593,6 +629,7 @@ GArrowScalar *
garrow_union_scalar_get_value(GArrowUnionScalar *scalar);
#define GARROW_TYPE_SPARSE_UNION_SCALAR (garrow_sparse_union_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(GArrowSparseUnionScalar,
garrow_sparse_union_scalar,
GARROW,
@@ -610,6 +647,7 @@ garrow_sparse_union_scalar_new(GArrowSparseUnionDataType *data_type,
GArrowScalar *value);
#define GARROW_TYPE_DENSE_UNION_SCALAR (garrow_dense_union_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(GArrowDenseUnionScalar,
garrow_dense_union_scalar,
GARROW,
@@ -627,6 +665,7 @@ garrow_dense_union_scalar_new(GArrowDenseUnionDataType *data_type,
GArrowScalar *value);
#define GARROW_TYPE_EXTENSION_SCALAR (garrow_extension_scalar_get_type())
+GARROW_AVAILABLE_IN_5_0
G_DECLARE_DERIVABLE_TYPE(
GArrowExtensionScalar, garrow_extension_scalar, GARROW, EXTENSION_SCALAR, GArrowScalar)
struct _GArrowExtensionScalarClass
diff --git a/c_glib/arrow-glib/schema.h b/c_glib/arrow-glib/schema.h
index 93cd5bd542cf8..aab740397b7d6 100644
--- a/c_glib/arrow-glib/schema.h
+++ b/c_glib/arrow-glib/schema.h
@@ -24,6 +24,7 @@
G_BEGIN_DECLS
#define GARROW_TYPE_SCHEMA (garrow_schema_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowSchema, garrow_schema, GARROW, SCHEMA, GObject)
struct _GArrowSchemaClass
{
@@ -34,6 +35,7 @@ GARROW_AVAILABLE_IN_6_0
GArrowSchema *
garrow_schema_import(gpointer c_abi_schema, GError **error);
+GARROW_AVAILABLE_IN_ALL
GArrowSchema *
garrow_schema_new(GList *fields);
@@ -41,34 +43,48 @@ GARROW_AVAILABLE_IN_6_0
gpointer
garrow_schema_export(GArrowSchema *schema, GError **error);
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_schema_equal(GArrowSchema *schema, GArrowSchema *other_schema);
+
+GARROW_AVAILABLE_IN_ALL
GArrowField *
garrow_schema_get_field(GArrowSchema *schema, guint i);
+
+GARROW_AVAILABLE_IN_ALL
GArrowField *
garrow_schema_get_field_by_name(GArrowSchema *schema, const gchar *name);
GARROW_AVAILABLE_IN_0_15
gint
garrow_schema_get_field_index(GArrowSchema *schema, const gchar *name);
+GARROW_AVAILABLE_IN_ALL
guint
garrow_schema_n_fields(GArrowSchema *schema);
+
+GARROW_AVAILABLE_IN_ALL
GList *
garrow_schema_get_fields(GArrowSchema *schema);
+GARROW_AVAILABLE_IN_ALL
gchar *
garrow_schema_to_string(GArrowSchema *schema);
+
GARROW_AVAILABLE_IN_0_17
gchar *
garrow_schema_to_string_metadata(GArrowSchema *schema, gboolean show_metadata);
+GARROW_AVAILABLE_IN_ALL
GArrowSchema *
garrow_schema_add_field(GArrowSchema *schema,
guint i,
GArrowField *field,
GError **error);
+GARROW_AVAILABLE_IN_ALL
GArrowSchema *
garrow_schema_remove_field(GArrowSchema *schema, guint i, GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GArrowSchema *
garrow_schema_replace_field(GArrowSchema *schema,
guint i,
diff --git a/c_glib/arrow-glib/schema.hpp b/c_glib/arrow-glib/schema.hpp
index 333f73391c900..ba6c459495461 100644
--- a/c_glib/arrow-glib/schema.hpp
+++ b/c_glib/arrow-glib/schema.hpp
@@ -23,7 +23,10 @@
#include
+GARROW_EXTERN
GArrowSchema *
garrow_schema_new_raw(std::shared_ptr *arrow_schema);
+
+GARROW_EXTERN
std::shared_ptr
garrow_schema_get_raw(GArrowSchema *schema);
diff --git a/c_glib/arrow-glib/table-builder.h b/c_glib/arrow-glib/table-builder.h
index 0e13352bbdde3..6fad1ae79a40f 100644
--- a/c_glib/arrow-glib/table-builder.h
+++ b/c_glib/arrow-glib/table-builder.h
@@ -26,6 +26,7 @@
G_BEGIN_DECLS
#define GARROW_TYPE_RECORD_BATCH_BUILDER (garrow_record_batch_builder_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowRecordBatchBuilder,
garrow_record_batch_builder,
GARROW,
@@ -36,34 +37,45 @@ struct _GArrowRecordBatchBuilderClass
GObjectClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowRecordBatchBuilder *
garrow_record_batch_builder_new(GArrowSchema *schema, GError **error);
+GARROW_AVAILABLE_IN_ALL
gint64
garrow_record_batch_builder_get_initial_capacity(GArrowRecordBatchBuilder *builder);
+
+GARROW_AVAILABLE_IN_ALL
void
garrow_record_batch_builder_set_initial_capacity(GArrowRecordBatchBuilder *builder,
gint64 capacity);
+GARROW_AVAILABLE_IN_ALL
GArrowSchema *
garrow_record_batch_builder_get_schema(GArrowRecordBatchBuilder *builder);
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_0_13_FOR(garrow_record_batch_builder_get_n_columns)
gint
garrow_record_batch_builder_get_n_fields(GArrowRecordBatchBuilder *builder);
#endif
+
GARROW_AVAILABLE_IN_0_13
gint
garrow_record_batch_builder_get_n_columns(GArrowRecordBatchBuilder *builder);
+
#ifndef GARROW_DISABLE_DEPRECATED
+GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_0_13_FOR(garrow_record_batch_builder_get_column_builder)
GArrowArrayBuilder *
garrow_record_batch_builder_get_field(GArrowRecordBatchBuilder *builder, gint i);
#endif
+
GARROW_AVAILABLE_IN_0_13
GArrowArrayBuilder *
garrow_record_batch_builder_get_column_builder(GArrowRecordBatchBuilder *builder, gint i);
+GARROW_AVAILABLE_IN_ALL
GArrowRecordBatch *
garrow_record_batch_builder_flush(GArrowRecordBatchBuilder *builder, GError **error);
diff --git a/c_glib/arrow-glib/table.h b/c_glib/arrow-glib/table.h
index 1bf64d25a4f3f..d790e413df5fc 100644
--- a/c_glib/arrow-glib/table.h
+++ b/c_glib/arrow-glib/table.h
@@ -29,6 +29,7 @@ G_BEGIN_DECLS
#define GARROW_TYPE_TABLE_CONCATENATE_OPTIONS \
(garrow_table_concatenate_options_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowTableConcatenateOptions,
garrow_table_concatenate_options,
GARROW,
@@ -44,6 +45,7 @@ GArrowTableConcatenateOptions *
garrow_table_concatenate_options_new(void);
#define GARROW_TYPE_TABLE (garrow_table_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowTable, garrow_table, GARROW, TABLE, GObject)
struct _GArrowTableClass
{
@@ -53,18 +55,21 @@ struct _GArrowTableClass
GARROW_AVAILABLE_IN_0_12
GArrowTable *
garrow_table_new_values(GArrowSchema *schema, GList *values, GError **error);
+
GARROW_AVAILABLE_IN_0_15
GArrowTable *
garrow_table_new_chunked_arrays(GArrowSchema *schema,
GArrowChunkedArray **chunked_arrays,
gsize n_chunked_arrays,
GError **error);
+
GARROW_AVAILABLE_IN_0_12
GArrowTable *
garrow_table_new_arrays(GArrowSchema *schema,
GArrowArray **arrays,
gsize n_arrays,
GError **error);
+
GARROW_AVAILABLE_IN_0_12
GArrowTable *
garrow_table_new_record_batches(GArrowSchema *schema,
@@ -72,22 +77,29 @@ garrow_table_new_record_batches(GArrowSchema *schema,
gsize n_record_batches,
GError **error);
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_table_equal(GArrowTable *table, GArrowTable *other_table);
+
GARROW_AVAILABLE_IN_0_17
gboolean
garrow_table_equal_metadata(GArrowTable *table,
GArrowTable *other_table,
gboolean check_metadata);
+GARROW_AVAILABLE_IN_ALL
GArrowSchema *
garrow_table_get_schema(GArrowTable *table);
+
GARROW_AVAILABLE_IN_0_15
GArrowChunkedArray *
garrow_table_get_column_data(GArrowTable *table, gint i);
+GARROW_AVAILABLE_IN_ALL
guint
garrow_table_get_n_columns(GArrowTable *table);
+
+GARROW_AVAILABLE_IN_ALL
guint64
garrow_table_get_n_rows(GArrowTable *table);
@@ -98,8 +110,11 @@ garrow_table_add_column(GArrowTable *table,
GArrowField *field,
GArrowChunkedArray *chunked_array,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
GArrowTable *
garrow_table_remove_column(GArrowTable *table, guint i, GError **error);
+
GARROW_AVAILABLE_IN_0_15
GArrowTable *
garrow_table_replace_column(GArrowTable *table,
@@ -107,22 +122,28 @@ garrow_table_replace_column(GArrowTable *table,
GArrowField *field,
GArrowChunkedArray *chunked_array,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
gchar *
garrow_table_to_string(GArrowTable *table, GError **error);
+
GARROW_AVAILABLE_IN_0_14
GArrowTable *
garrow_table_concatenate(GArrowTable *table,
GList *other_tables,
GArrowTableConcatenateOptions *options,
GError **error);
+
GARROW_AVAILABLE_IN_0_14
GArrowTable *
garrow_table_slice(GArrowTable *table, gint64 offset, gint64 length);
+
GARROW_AVAILABLE_IN_0_16
GArrowTable *
garrow_table_combine_chunks(GArrowTable *table, GError **error);
#define GARROW_TYPE_FEATHER_WRITE_PROPERTIES (garrow_feather_write_properties_get_type())
+GARROW_AVAILABLE_IN_0_17
G_DECLARE_DERIVABLE_TYPE(GArrowFeatherWriteProperties,
garrow_feather_write_properties,
GARROW,
diff --git a/c_glib/arrow-glib/table.hpp b/c_glib/arrow-glib/table.hpp
index 3077c2ece9b37..79fc97471a42c 100644
--- a/c_glib/arrow-glib/table.hpp
+++ b/c_glib/arrow-glib/table.hpp
@@ -24,10 +24,14 @@
#include
+GARROW_EXTERN
GArrowTable *
garrow_table_new_raw(std::shared_ptr *arrow_table);
+
+GARROW_EXTERN
std::shared_ptr
garrow_table_get_raw(GArrowTable *table);
+GARROW_EXTERN
arrow::ipc::feather::WriteProperties *
garrow_feather_write_properties_get_raw(GArrowFeatherWriteProperties *properties);
diff --git a/c_glib/arrow-glib/tensor.h b/c_glib/arrow-glib/tensor.h
index a6d11b248110e..5971c3af12600 100644
--- a/c_glib/arrow-glib/tensor.h
+++ b/c_glib/arrow-glib/tensor.h
@@ -25,12 +25,14 @@
G_BEGIN_DECLS
#define GARROW_TYPE_TENSOR (garrow_tensor_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowTensor, garrow_tensor, GARROW, TENSOR, GObject)
struct _GArrowTensorClass
{
GObjectClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowTensor *
garrow_tensor_new(GArrowDataType *data_type,
GArrowBuffer *data,
@@ -40,30 +42,55 @@ garrow_tensor_new(GArrowDataType *data_type,
gsize n_strides,
gchar **dimension_names,
gsize n_dimension_names);
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_tensor_equal(GArrowTensor *tensor, GArrowTensor *other_tensor);
+
+GARROW_AVAILABLE_IN_ALL
GArrowDataType *
garrow_tensor_get_value_data_type(GArrowTensor *tensor);
+
+GARROW_AVAILABLE_IN_ALL
GArrowType
garrow_tensor_get_value_type(GArrowTensor *tensor);
+
+GARROW_AVAILABLE_IN_ALL
GArrowBuffer *
garrow_tensor_get_buffer(GArrowTensor *tensor);
+
+GARROW_AVAILABLE_IN_ALL
gint64 *
garrow_tensor_get_shape(GArrowTensor *tensor, gint *n_dimensions);
+
+GARROW_AVAILABLE_IN_ALL
gint64 *
garrow_tensor_get_strides(GArrowTensor *tensor, gint *n_strides);
+
+GARROW_AVAILABLE_IN_ALL
gint
garrow_tensor_get_n_dimensions(GArrowTensor *tensor);
+
+GARROW_AVAILABLE_IN_ALL
const gchar *
garrow_tensor_get_dimension_name(GArrowTensor *tensor, gint i);
+
+GARROW_AVAILABLE_IN_ALL
gint64
garrow_tensor_get_size(GArrowTensor *tensor);
+
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_tensor_is_mutable(GArrowTensor *tensor);
+
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_tensor_is_contiguous(GArrowTensor *tensor);
+
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_tensor_is_row_major(GArrowTensor *tensor);
+
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_tensor_is_column_major(GArrowTensor *tensor);
diff --git a/c_glib/arrow-glib/timestamp-parser.h b/c_glib/arrow-glib/timestamp-parser.h
index 05cad54746eeb..a7265d6ef46fb 100644
--- a/c_glib/arrow-glib/timestamp-parser.h
+++ b/c_glib/arrow-glib/timestamp-parser.h
@@ -26,6 +26,7 @@
G_BEGIN_DECLS
#define GARROW_TYPE_TIMESTAMP_PARSER (garrow_timestamp_parser_get_type())
+GARROW_AVAILABLE_IN_16_0
G_DECLARE_DERIVABLE_TYPE(
GArrowTimestampParser, garrow_timestamp_parser, GARROW, TIMESTAMP_PARSER, GObject)
struct _GArrowTimestampParserClass
@@ -39,6 +40,7 @@ garrow_timestamp_parser_get_kind(GArrowTimestampParser *parser);
#define GARROW_TYPE_STRPTIME_TIMESTAMP_PARSER \
(garrow_strptime_timestamp_parser_get_type())
+GARROW_AVAILABLE_IN_16_0
G_DECLARE_DERIVABLE_TYPE(GArrowStrptimeTimestampParser,
garrow_strptime_timestamp_parser,
GARROW,
@@ -58,6 +60,7 @@ const gchar *
garrow_strptime_timestamp_parser_get_format(GArrowStrptimeTimestampParser *parser);
#define GARROW_TYPE_ISO8601_TIMESTAMP_PARSER (garrow_iso8601_timestamp_parser_get_type())
+GARROW_AVAILABLE_IN_16_0
G_DECLARE_DERIVABLE_TYPE(GArrowISO8601TimestampParser,
garrow_iso8601_timestamp_parser,
GARROW,
diff --git a/c_glib/arrow-glib/version.h.in b/c_glib/arrow-glib/version.h.in
index a83c68a2a16dc..b530a088c8e38 100644
--- a/c_glib/arrow-glib/version.h.in
+++ b/c_glib/arrow-glib/version.h.in
@@ -19,6 +19,8 @@
#pragma once
+#include
+
/**
* SECTION: version
* @section_id: version-macros
@@ -36,7 +38,7 @@
*
* Since: 0.10.0
*/
-#define GARROW_VERSION_MAJOR (@GARROW_VERSION_MAJOR@)
+#define GARROW_VERSION_MAJOR (@VERSION_MAJOR@)
/**
* GARROW_VERSION_MINOR:
@@ -45,7 +47,7 @@
*
* Since: 0.10.0
*/
-#define GARROW_VERSION_MINOR (@GARROW_VERSION_MINOR@)
+#define GARROW_VERSION_MINOR (@VERSION_MINOR@)
/**
* GARROW_VERSION_MICRO:
@@ -54,7 +56,7 @@
*
* Since: 0.10.0
*/
-#define GARROW_VERSION_MICRO (@GARROW_VERSION_MICRO@)
+#define GARROW_VERSION_MICRO (@VERSION_MICRO@)
/**
* GARROW_VERSION_TAG:
@@ -64,7 +66,7 @@
*
* Since: 0.10.0
*/
-#define GARROW_VERSION_TAG "@GARROW_VERSION_TAG@"
+#define GARROW_VERSION_TAG "@VERSION_TAG@"
/**
* GARROW_VERSION_CHECK:
@@ -108,212 +110,7 @@
# define GARROW_UNAVAILABLE(major, minor) G_UNAVAILABLE(major, minor)
#endif
-/**
- * GARROW_VERSION_16_0:
- *
- * You can use this macro value for compile time API version check.
- *
- * Since: 16.0.0
- */
-#define GARROW_VERSION_16_0 G_ENCODE_VERSION(16, 0)
-
-/**
- * GARROW_VERSION_15_0:
- *
- * You can use this macro value for compile time API version check.
- *
- * Since: 15.0.0
- */
-#define GARROW_VERSION_15_0 G_ENCODE_VERSION(15, 0)
-
-/**
- * GARROW_VERSION_14_0:
- *
- * You can use this macro value for compile time API version check.
- *
- * Since: 14.0.0
- */
-#define GARROW_VERSION_14_0 G_ENCODE_VERSION(14, 0)
-
-/**
- * GARROW_VERSION_13_0:
- *
- * You can use this macro value for compile time API version check.
- *
- * Since: 13.0.0
- */
-#define GARROW_VERSION_13_0 G_ENCODE_VERSION(13, 0)
-
-/**
- * GARROW_VERSION_12_0:
- *
- * You can use this macro value for compile time API version check.
- *
- * Since: 12.0.0
- */
-#define GARROW_VERSION_12_0 G_ENCODE_VERSION(12, 0)
-
-/**
- * GARROW_VERSION_11_0:
- *
- * You can use this macro value for compile time API version check.
- *
- * Since: 11.0.0
- */
-#define GARROW_VERSION_11_0 G_ENCODE_VERSION(11, 0)
-
-/**
- * GARROW_VERSION_10_0:
- *
- * You can use this macro value for compile time API version check.
- *
- * Since: 10.0.0
- */
-#define GARROW_VERSION_10_0 G_ENCODE_VERSION(10, 0)
-
-/**
- * GARROW_VERSION_9_0:
- *
- * You can use this macro value for compile time API version check.
- *
- * Since: 9.0.0
- */
-#define GARROW_VERSION_9_0 G_ENCODE_VERSION(9, 0)
-
-/**
- * GARROW_VERSION_8_0:
- *
- * You can use this macro value for compile time API version check.
- *
- * Since: 8.0.0
- */
-#define GARROW_VERSION_8_0 G_ENCODE_VERSION(8, 0)
-
-/**
- * GARROW_VERSION_7_0:
- *
- * You can use this macro value for compile time API version check.
- *
- * Since: 7.0.0
- */
-#define GARROW_VERSION_7_0 G_ENCODE_VERSION(7, 0)
-
-/**
- * GARROW_VERSION_6_0:
- *
- * You can use this macro value for compile time API version check.
- *
- * Since: 6.0.0
- */
-#define GARROW_VERSION_6_0 G_ENCODE_VERSION(6, 0)
-
-/**
- * GARROW_VERSION_5_0:
- *
- * You can use this macro value for compile time API version check.
- *
- * Since: 5.0.0
- */
-#define GARROW_VERSION_5_0 G_ENCODE_VERSION(5, 0)
-
-/**
- * GARROW_VERSION_4_0:
- *
- * You can use this macro value for compile time API version check.
- *
- * Since: 4.0.0
- */
-#define GARROW_VERSION_4_0 G_ENCODE_VERSION(4, 0)
-
-/**
- * GARROW_VERSION_3_0:
- *
- * You can use this macro value for compile time API version check.
- *
- * Since: 3.0.0
- */
-#define GARROW_VERSION_3_0 G_ENCODE_VERSION(3, 0)
-
-/**
- * GARROW_VERSION_2_0:
- *
- * You can use this macro value for compile time API version check.
- *
- * Since: 2.0.0
- */
-#define GARROW_VERSION_2_0 G_ENCODE_VERSION(2, 0)
-
-/**
- * GARROW_VERSION_1_0:
- *
- * You can use this macro value for compile time API version check.
- *
- * Since: 1.0.0
- */
-#define GARROW_VERSION_1_0 G_ENCODE_VERSION(1, 0)
-
-/**
- * GARROW_VERSION_0_17:
- *
- * You can use this macro value for compile time API version check.
- *
- * Since: 0.17.0
- */
-#define GARROW_VERSION_0_17 G_ENCODE_VERSION(0, 17)
-
-/**
- * GARROW_VERSION_0_16:
- *
- * You can use this macro value for compile time API version check.
- *
- * Since: 0.16.0
- */
-#define GARROW_VERSION_0_16 G_ENCODE_VERSION(0, 16)
-
-/**
- * GARROW_VERSION_0_15:
- *
- * You can use this macro value for compile time API version check.
- *
- * Since: 0.15.0
- */
-#define GARROW_VERSION_0_15 G_ENCODE_VERSION(0, 15)
-
-/**
- * GARROW_VERSION_0_14:
- *
- * You can use this macro value for compile time API version check.
- *
- * Since: 0.14.0
- */
-#define GARROW_VERSION_0_14 G_ENCODE_VERSION(0, 14)
-
-/**
- * GARROW_VERSION_0_13:
- *
- * You can use this macro value for compile time API version check.
- *
- * Since: 0.13.0
- */
-#define GARROW_VERSION_0_13 G_ENCODE_VERSION(0, 13)
-
-/**
- * GARROW_VERSION_0_12:
- *
- * You can use this macro value for compile time API version check.
- *
- * Since: 0.12.0
- */
-#define GARROW_VERSION_0_12 G_ENCODE_VERSION(0, 12)
-
-/**
- * GARROW_VERSION_0_10:
- *
- * You can use this macro value for compile time API version check.
- *
- * Since: 0.10.0
- */
-#define GARROW_VERSION_0_10 G_ENCODE_VERSION(0, 10)
+@ENCODED_VERSIONS@
/**
* GARROW_VERSION_MIN_REQUIRED:
@@ -359,327 +156,6 @@
G_ENCODE_VERSION(GARROW_VERSION_MAJOR, GARROW_VERSION_MINOR)
#endif
+@VISIBILITY_MACROS@
-#define GARROW_AVAILABLE_IN_ALL
-
-#if GARROW_VERSION_MIN_REQUIRED >= GARROW_VERSION_16_0
-# define GARROW_DEPRECATED_IN_16_0 GARROW_DEPRECATED
-# define GARROW_DEPRECATED_IN_16_0_FOR(function) GARROW_DEPRECATED_FOR(function)
-#else
-# define GARROW_DEPRECATED_IN_16_0
-# define GARROW_DEPRECATED_IN_16_0_FOR(function)
-#endif
-
-#if GARROW_VERSION_MAX_ALLOWED < GARROW_VERSION_16_0
-# define GARROW_AVAILABLE_IN_16_0 GARROW_UNAVAILABLE(16, 0)
-#else
-# define GARROW_AVAILABLE_IN_16_0
-#endif
-
-#if GARROW_VERSION_MIN_REQUIRED >= GARROW_VERSION_15_0
-# define GARROW_DEPRECATED_IN_15_0 GARROW_DEPRECATED
-# define GARROW_DEPRECATED_IN_15_0_FOR(function) GARROW_DEPRECATED_FOR(function)
-#else
-# define GARROW_DEPRECATED_IN_15_0
-# define GARROW_DEPRECATED_IN_15_0_FOR(function)
-#endif
-
-#if GARROW_VERSION_MAX_ALLOWED < GARROW_VERSION_15_0
-# define GARROW_AVAILABLE_IN_15_0 GARROW_UNAVAILABLE(15, 0)
-#else
-# define GARROW_AVAILABLE_IN_15_0
-#endif
-
-#if GARROW_VERSION_MIN_REQUIRED >= GARROW_VERSION_14_0
-# define GARROW_DEPRECATED_IN_14_0 GARROW_DEPRECATED
-# define GARROW_DEPRECATED_IN_14_0_FOR(function) GARROW_DEPRECATED_FOR(function)
-#else
-# define GARROW_DEPRECATED_IN_14_0
-# define GARROW_DEPRECATED_IN_14_0_FOR(function)
-#endif
-
-#if GARROW_VERSION_MAX_ALLOWED < GARROW_VERSION_14_0
-# define GARROW_AVAILABLE_IN_14_0 GARROW_UNAVAILABLE(14, 0)
-#else
-# define GARROW_AVAILABLE_IN_14_0
-#endif
-
-#if GARROW_VERSION_MIN_REQUIRED >= GARROW_VERSION_13_0
-# define GARROW_DEPRECATED_IN_13_0 GARROW_DEPRECATED
-# define GARROW_DEPRECATED_IN_13_0_FOR(function) GARROW_DEPRECATED_FOR(function)
-#else
-# define GARROW_DEPRECATED_IN_13_0
-# define GARROW_DEPRECATED_IN_13_0_FOR(function)
-#endif
-
-#if GARROW_VERSION_MAX_ALLOWED < GARROW_VERSION_13_0
-# define GARROW_AVAILABLE_IN_13_0 GARROW_UNAVAILABLE(13, 0)
-#else
-# define GARROW_AVAILABLE_IN_13_0
-#endif
-
-#if GARROW_VERSION_MIN_REQUIRED >= GARROW_VERSION_12_0
-# define GARROW_DEPRECATED_IN_12_0 GARROW_DEPRECATED
-# define GARROW_DEPRECATED_IN_12_0_FOR(function) GARROW_DEPRECATED_FOR(function)
-#else
-# define GARROW_DEPRECATED_IN_12_0
-# define GARROW_DEPRECATED_IN_12_0_FOR(function)
-#endif
-
-#if GARROW_VERSION_MAX_ALLOWED < GARROW_VERSION_12_0
-# define GARROW_AVAILABLE_IN_12_0 GARROW_UNAVAILABLE(12, 0)
-#else
-# define GARROW_AVAILABLE_IN_12_0
-#endif
-
-#if GARROW_VERSION_MIN_REQUIRED >= GARROW_VERSION_11_0
-# define GARROW_DEPRECATED_IN_11_0 GARROW_DEPRECATED
-# define GARROW_DEPRECATED_IN_11_0_FOR(function) GARROW_DEPRECATED_FOR(function)
-#else
-# define GARROW_DEPRECATED_IN_11_0
-# define GARROW_DEPRECATED_IN_11_0_FOR(function)
-#endif
-
-#if GARROW_VERSION_MAX_ALLOWED < GARROW_VERSION_11_0
-# define GARROW_AVAILABLE_IN_11_0 GARROW_UNAVAILABLE(11, 0)
-#else
-# define GARROW_AVAILABLE_IN_11_0
-#endif
-
-#if GARROW_VERSION_MIN_REQUIRED >= GARROW_VERSION_10_0
-# define GARROW_DEPRECATED_IN_10_0 GARROW_DEPRECATED
-# define GARROW_DEPRECATED_IN_10_0_FOR(function) GARROW_DEPRECATED_FOR(function)
-#else
-# define GARROW_DEPRECATED_IN_10_0
-# define GARROW_DEPRECATED_IN_10_0_FOR(function)
-#endif
-
-#if GARROW_VERSION_MAX_ALLOWED < GARROW_VERSION_10_0
-# define GARROW_AVAILABLE_IN_10_0 GARROW_UNAVAILABLE(10, 0)
-#else
-# define GARROW_AVAILABLE_IN_10_0
-#endif
-
-#if GARROW_VERSION_MIN_REQUIRED >= GARROW_VERSION_9_0
-# define GARROW_DEPRECATED_IN_9_0 GARROW_DEPRECATED
-# define GARROW_DEPRECATED_IN_9_0_FOR(function) GARROW_DEPRECATED_FOR(function)
-#else
-# define GARROW_DEPRECATED_IN_9_0
-# define GARROW_DEPRECATED_IN_9_0_FOR(function)
-#endif
-
-#if GARROW_VERSION_MAX_ALLOWED < GARROW_VERSION_9_0
-# define GARROW_AVAILABLE_IN_9_0 GARROW_UNAVAILABLE(9, 0)
-#else
-# define GARROW_AVAILABLE_IN_9_0
-#endif
-
-#if GARROW_VERSION_MIN_REQUIRED >= GARROW_VERSION_8_0
-# define GARROW_DEPRECATED_IN_8_0 GARROW_DEPRECATED
-# define GARROW_DEPRECATED_IN_8_0_FOR(function) GARROW_DEPRECATED_FOR(function)
-#else
-# define GARROW_DEPRECATED_IN_8_0
-# define GARROW_DEPRECATED_IN_8_0_FOR(function)
-#endif
-
-#if GARROW_VERSION_MAX_ALLOWED < GARROW_VERSION_8_0
-# define GARROW_AVAILABLE_IN_8_0 GARROW_UNAVAILABLE(8, 0)
-#else
-# define GARROW_AVAILABLE_IN_8_0
-#endif
-
-#if GARROW_VERSION_MIN_REQUIRED >= GARROW_VERSION_7_0
-# define GARROW_DEPRECATED_IN_7_0 GARROW_DEPRECATED
-# define GARROW_DEPRECATED_IN_7_0_FOR(function) GARROW_DEPRECATED_FOR(function)
-#else
-# define GARROW_DEPRECATED_IN_7_0
-# define GARROW_DEPRECATED_IN_7_0_FOR(function)
-#endif
-
-#if GARROW_VERSION_MAX_ALLOWED < GARROW_VERSION_7_0
-# define GARROW_AVAILABLE_IN_7_0 GARROW_UNAVAILABLE(7, 0)
-#else
-# define GARROW_AVAILABLE_IN_7_0
-#endif
-
-#if GARROW_VERSION_MIN_REQUIRED >= GARROW_VERSION_6_0
-# define GARROW_DEPRECATED_IN_6_0 GARROW_DEPRECATED
-# define GARROW_DEPRECATED_IN_6_0_FOR(function) GARROW_DEPRECATED_FOR(function)
-#else
-# define GARROW_DEPRECATED_IN_6_0
-# define GARROW_DEPRECATED_IN_6_0_FOR(function)
-#endif
-
-#if GARROW_VERSION_MAX_ALLOWED < GARROW_VERSION_6_0
-# define GARROW_AVAILABLE_IN_6_0 GARROW_UNAVAILABLE(6, 0)
-#else
-# define GARROW_AVAILABLE_IN_6_0
-#endif
-
-#if GARROW_VERSION_MIN_REQUIRED >= GARROW_VERSION_5_0
-# define GARROW_DEPRECATED_IN_5_0 GARROW_DEPRECATED
-# define GARROW_DEPRECATED_IN_5_0_FOR(function) GARROW_DEPRECATED_FOR(function)
-#else
-# define GARROW_DEPRECATED_IN_5_0
-# define GARROW_DEPRECATED_IN_5_0_FOR(function)
-#endif
-
-#if GARROW_VERSION_MAX_ALLOWED < GARROW_VERSION_5_0
-# define GARROW_AVAILABLE_IN_5_0 GARROW_UNAVAILABLE(5, 0)
-#else
-# define GARROW_AVAILABLE_IN_5_0
-#endif
-
-#if GARROW_VERSION_MIN_REQUIRED >= GARROW_VERSION_4_0
-# define GARROW_DEPRECATED_IN_4_0 GARROW_DEPRECATED
-# define GARROW_DEPRECATED_IN_4_0_FOR(function) GARROW_DEPRECATED_FOR(function)
-#else
-# define GARROW_DEPRECATED_IN_4_0
-# define GARROW_DEPRECATED_IN_4_0_FOR(function)
-#endif
-
-#if GARROW_VERSION_MAX_ALLOWED < GARROW_VERSION_4_0
-# define GARROW_AVAILABLE_IN_4_0 GARROW_UNAVAILABLE(4, 0)
-#else
-# define GARROW_AVAILABLE_IN_4_0
-#endif
-
-#if GARROW_VERSION_MIN_REQUIRED >= GARROW_VERSION_3_0
-# define GARROW_DEPRECATED_IN_3_0 GARROW_DEPRECATED
-# define GARROW_DEPRECATED_IN_3_0_FOR(function) GARROW_DEPRECATED_FOR(function)
-#else
-# define GARROW_DEPRECATED_IN_3_0
-# define GARROW_DEPRECATED_IN_3_0_FOR(function)
-#endif
-
-#if GARROW_VERSION_MAX_ALLOWED < GARROW_VERSION_3_0
-# define GARROW_AVAILABLE_IN_3_0 GARROW_UNAVAILABLE(3, 0)
-#else
-# define GARROW_AVAILABLE_IN_3_0
-#endif
-
-#if GARROW_VERSION_MIN_REQUIRED >= GARROW_VERSION_2_0
-# define GARROW_DEPRECATED_IN_2_0 GARROW_DEPRECATED
-# define GARROW_DEPRECATED_IN_2_0_FOR(function) GARROW_DEPRECATED_FOR(function)
-#else
-# define GARROW_DEPRECATED_IN_2_0
-# define GARROW_DEPRECATED_IN_2_0_FOR(function)
-#endif
-
-#if GARROW_VERSION_MAX_ALLOWED < GARROW_VERSION_2_0
-# define GARROW_AVAILABLE_IN_2_0 GARROW_UNAVAILABLE(2, 0)
-#else
-# define GARROW_AVAILABLE_IN_2_0
-#endif
-
-#if GARROW_VERSION_MIN_REQUIRED >= GARROW_VERSION_1_0
-# define GARROW_DEPRECATED_IN_1_0 GARROW_DEPRECATED
-# define GARROW_DEPRECATED_IN_1_0_FOR(function) GARROW_DEPRECATED_FOR(function)
-#else
-# define GARROW_DEPRECATED_IN_1_0
-# define GARROW_DEPRECATED_IN_1_0_FOR(function)
-#endif
-
-#if GARROW_VERSION_MAX_ALLOWED < GARROW_VERSION_1_0
-# define GARROW_AVAILABLE_IN_1_0 GARROW_UNAVAILABLE(1, 0)
-#else
-# define GARROW_AVAILABLE_IN_1_0
-#endif
-
-#if GARROW_VERSION_MIN_REQUIRED >= GARROW_VERSION_0_17
-# define GARROW_DEPRECATED_IN_0_17 GARROW_DEPRECATED
-# define GARROW_DEPRECATED_IN_0_17_FOR(function) GARROW_DEPRECATED_FOR(function)
-#else
-# define GARROW_DEPRECATED_IN_0_17
-# define GARROW_DEPRECATED_IN_0_17_FOR(function)
-#endif
-
-#if GARROW_VERSION_MAX_ALLOWED < GARROW_VERSION_0_17
-# define GARROW_AVAILABLE_IN_0_17 GARROW_UNAVAILABLE(0, 17)
-#else
-# define GARROW_AVAILABLE_IN_0_17
-#endif
-
-#if GARROW_VERSION_MIN_REQUIRED >= GARROW_VERSION_0_16
-# define GARROW_DEPRECATED_IN_0_16 GARROW_DEPRECATED
-# define GARROW_DEPRECATED_IN_0_16_FOR(function) GARROW_DEPRECATED_FOR(function)
-#else
-# define GARROW_DEPRECATED_IN_0_16
-# define GARROW_DEPRECATED_IN_0_16_FOR(function)
-#endif
-
-#if GARROW_VERSION_MAX_ALLOWED < GARROW_VERSION_0_16
-# define GARROW_AVAILABLE_IN_0_16 GARROW_UNAVAILABLE(0, 16)
-#else
-# define GARROW_AVAILABLE_IN_0_16
-#endif
-
-#if GARROW_VERSION_MIN_REQUIRED >= GARROW_VERSION_0_15
-# define GARROW_DEPRECATED_IN_0_15 GARROW_DEPRECATED
-# define GARROW_DEPRECATED_IN_0_15_FOR(function) GARROW_DEPRECATED_FOR(function)
-#else
-# define GARROW_DEPRECATED_IN_0_15
-# define GARROW_DEPRECATED_IN_0_15_FOR(function)
-#endif
-
-#if GARROW_VERSION_MAX_ALLOWED < GARROW_VERSION_0_15
-# define GARROW_AVAILABLE_IN_0_15 GARROW_UNAVAILABLE(0, 15)
-#else
-# define GARROW_AVAILABLE_IN_0_15
-#endif
-
-#if GARROW_VERSION_MIN_REQUIRED >= GARROW_VERSION_0_14
-# define GARROW_DEPRECATED_IN_0_14 GARROW_DEPRECATED
-# define GARROW_DEPRECATED_IN_0_14_FOR(function) GARROW_DEPRECATED_FOR(function)
-#else
-# define GARROW_DEPRECATED_IN_0_14
-# define GARROW_DEPRECATED_IN_0_14_FOR(function)
-#endif
-
-#if GARROW_VERSION_MAX_ALLOWED < GARROW_VERSION_0_14
-# define GARROW_AVAILABLE_IN_0_14 GARROW_UNAVAILABLE(0, 14)
-#else
-# define GARROW_AVAILABLE_IN_0_14
-#endif
-
-#if GARROW_VERSION_MIN_REQUIRED >= GARROW_VERSION_0_13
-# define GARROW_DEPRECATED_IN_0_13 GARROW_DEPRECATED
-# define GARROW_DEPRECATED_IN_0_13_FOR(function) GARROW_DEPRECATED_FOR(function)
-#else
-# define GARROW_DEPRECATED_IN_0_13
-# define GARROW_DEPRECATED_IN_0_13_FOR(function)
-#endif
-
-#if GARROW_VERSION_MAX_ALLOWED < GARROW_VERSION_0_13
-# define GARROW_AVAILABLE_IN_0_13 GARROW_UNAVAILABLE(0, 13)
-#else
-# define GARROW_AVAILABLE_IN_0_13
-#endif
-
-#if GARROW_VERSION_MIN_REQUIRED >= GARROW_VERSION_0_12
-# define GARROW_DEPRECATED_IN_0_12 GARROW_DEPRECATED
-# define GARROW_DEPRECATED_IN_0_12_FOR(function) GARROW_DEPRECATED_FOR(function)
-#else
-# define GARROW_DEPRECATED_IN_0_12
-# define GARROW_DEPRECATED_IN_0_12_FOR(function)
-#endif
-
-#if GARROW_VERSION_MAX_ALLOWED < GARROW_VERSION_0_12
-# define GARROW_AVAILABLE_IN_0_12 GARROW_UNAVAILABLE(0, 12)
-#else
-# define GARROW_AVAILABLE_IN_0_12
-#endif
-
-#if GARROW_VERSION_MIN_REQUIRED >= GARROW_VERSION_0_10
-# define GARROW_DEPRECATED_IN_0_10 GARROW_DEPRECATED
-# define GARROW_DEPRECATED_IN_0_10_FOR(function) GARROW_DEPRECATED_FOR(function)
-#else
-# define GARROW_DEPRECATED_IN_0_10
-# define GARROW_DEPRECATED_IN_0_10_FOR(function)
-#endif
-
-#if GARROW_VERSION_MAX_ALLOWED < GARROW_VERSION_0_10
-# define GARROW_AVAILABLE_IN_0_10 GARROW_UNAVAILABLE(0, 10)
-#else
-# define GARROW_AVAILABLE_IN_0_10
-#endif
+@AVAILABILITY_MACROS@
diff --git a/c_glib/arrow-glib/writable-file.h b/c_glib/arrow-glib/writable-file.h
index 555705767e4aa..e9aa9122e92fa 100644
--- a/c_glib/arrow-glib/writable-file.h
+++ b/c_glib/arrow-glib/writable-file.h
@@ -24,9 +24,11 @@
G_BEGIN_DECLS
#define GARROW_TYPE_WRITABLE_FILE (garrow_writable_file_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_INTERFACE(
GArrowWritableFile, garrow_writable_file, GARROW, WRITABLE_FILE, GObject)
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_writable_file_write_at(GArrowWritableFile *writable_file,
gint64 position,
diff --git a/c_glib/arrow-glib/writable.h b/c_glib/arrow-glib/writable.h
index a556443967b5a..dcc1e67668e78 100644
--- a/c_glib/arrow-glib/writable.h
+++ b/c_glib/arrow-glib/writable.h
@@ -24,13 +24,17 @@
G_BEGIN_DECLS
#define GARROW_TYPE_WRITABLE (garrow_writable_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_INTERFACE(GArrowWritable, garrow_writable, GARROW, WRITABLE, GObject)
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_writable_write(GArrowWritable *writable,
const guint8 *data,
gint64 n_bytes,
GError **error);
+
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_writable_flush(GArrowWritable *writable, GError **error);
diff --git a/c_glib/arrow-glib/writer.h b/c_glib/arrow-glib/writer.h
index 30b0ea987da39..46bbdddec8c9d 100644
--- a/c_glib/arrow-glib/writer.h
+++ b/c_glib/arrow-glib/writer.h
@@ -28,6 +28,7 @@
G_BEGIN_DECLS
#define GARROW_TYPE_RECORD_BATCH_WRITER (garrow_record_batch_writer_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowRecordBatchWriter,
garrow_record_batch_writer,
GARROW,
@@ -38,19 +39,23 @@ struct _GArrowRecordBatchWriterClass
GObjectClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_record_batch_writer_write_record_batch(GArrowRecordBatchWriter *writer,
GArrowRecordBatch *record_batch,
GError **error);
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_record_batch_writer_write_table(GArrowRecordBatchWriter *writer,
GArrowTable *table,
GError **error);
+GARROW_AVAILABLE_IN_ALL
gboolean
garrow_record_batch_writer_close(GArrowRecordBatchWriter *writer, GError **error);
#define GARROW_TYPE_RECORD_BATCH_STREAM_WRITER \
(garrow_record_batch_stream_writer_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowRecordBatchStreamWriter,
garrow_record_batch_stream_writer,
GARROW,
@@ -61,12 +66,14 @@ struct _GArrowRecordBatchStreamWriterClass
GArrowRecordBatchWriterClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowRecordBatchStreamWriter *
garrow_record_batch_stream_writer_new(GArrowOutputStream *sink,
GArrowSchema *schema,
GError **error);
#define GARROW_TYPE_RECORD_BATCH_FILE_WRITER (garrow_record_batch_file_writer_get_type())
+GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowRecordBatchFileWriter,
garrow_record_batch_file_writer,
GARROW,
@@ -77,6 +84,7 @@ struct _GArrowRecordBatchFileWriterClass
GArrowRecordBatchStreamWriterClass parent_class;
};
+GARROW_AVAILABLE_IN_ALL
GArrowRecordBatchFileWriter *
garrow_record_batch_file_writer_new(GArrowOutputStream *sink,
GArrowSchema *schema,
diff --git a/c_glib/gandiva-glib/expression.h b/c_glib/gandiva-glib/expression.h
index f8f061ceb08fa..bb7eb22ac01dc 100644
--- a/c_glib/gandiva-glib/expression.h
+++ b/c_glib/gandiva-glib/expression.h
@@ -26,6 +26,7 @@
G_BEGIN_DECLS
#define GGANDIVA_TYPE_EXPRESSION (ggandiva_expression_get_type())
+GGANDIVA_AVAILABLE_IN_0_12
G_DECLARE_DERIVABLE_TYPE(
GGandivaExpression, ggandiva_expression, GGANDIVA, EXPRESSION, GObject)
@@ -34,12 +35,16 @@ struct _GGandivaExpressionClass
GObjectClass parent_class;
};
+GGANDIVA_AVAILABLE_IN_0_12
GGandivaExpression *
ggandiva_expression_new(GGandivaNode *root_node, GArrowField *result_field);
+
+GGANDIVA_AVAILABLE_IN_0_12
gchar *
ggandiva_expression_to_string(GGandivaExpression *expression);
#define GGANDIVA_TYPE_CONDITION (ggandiva_condition_get_type())
+GGANDIVA_AVAILABLE_IN_4_0
G_DECLARE_DERIVABLE_TYPE(
GGandivaCondition, ggandiva_condition, GGANDIVA, CONDITION, GGandivaExpression)
diff --git a/c_glib/gandiva-glib/filter.h b/c_glib/gandiva-glib/filter.h
index b95981198e0c4..0a2199ccfa106 100644
--- a/c_glib/gandiva-glib/filter.h
+++ b/c_glib/gandiva-glib/filter.h
@@ -25,6 +25,7 @@
G_BEGIN_DECLS
#define GGANDIVA_TYPE_FILTER (ggandiva_filter_get_type())
+GGANDIVA_AVAILABLE_IN_4_0
G_DECLARE_DERIVABLE_TYPE(GGandivaFilter, ggandiva_filter, GGANDIVA, FILTER, GObject)
struct _GGandivaFilterClass
@@ -32,8 +33,11 @@ struct _GGandivaFilterClass
GObjectClass parent_class;
};
+GGANDIVA_AVAILABLE_IN_4_0
GGandivaFilter *
ggandiva_filter_new(GArrowSchema *schema, GGandivaCondition *condition, GError **error);
+
+GGANDIVA_AVAILABLE_IN_4_0
gboolean
ggandiva_filter_evaluate(GGandivaFilter *filter,
GArrowRecordBatch *record_batch,
diff --git a/c_glib/gandiva-glib/function-registry.h b/c_glib/gandiva-glib/function-registry.h
index ed21e120a2533..e13f4b36d28dc 100644
--- a/c_glib/gandiva-glib/function-registry.h
+++ b/c_glib/gandiva-glib/function-registry.h
@@ -24,6 +24,7 @@
G_BEGIN_DECLS
#define GGANDIVA_TYPE_FUNCTION_REGISTRY (ggandiva_function_registry_get_type())
+GGANDIVA_AVAILABLE_IN_14_0
G_DECLARE_DERIVABLE_TYPE(GGandivaFunctionRegistry,
ggandiva_function_registry,
GGANDIVA,
@@ -35,14 +36,20 @@ struct _GGandivaFunctionRegistryClass
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_15_0
+GGANDIVA_AVAILABLE_IN_15_0
GGandivaFunctionRegistry *
ggandiva_function_registry_default(void);
+
+GGANDIVA_AVAILABLE_IN_14_0
GGandivaFunctionRegistry *
ggandiva_function_registry_new(void);
+
+GGANDIVA_AVAILABLE_IN_14_0
GGandivaNativeFunction *
ggandiva_function_registry_lookup(GGandivaFunctionRegistry *function_registry,
GGandivaFunctionSignature *function_signature);
+
+GGANDIVA_AVAILABLE_IN_14_0
GList *
ggandiva_function_registry_get_native_functions(
GGandivaFunctionRegistry *function_registry);
diff --git a/c_glib/gandiva-glib/function-signature.h b/c_glib/gandiva-glib/function-signature.h
index ef6834ea85723..4fd8cc8a7e761 100644
--- a/c_glib/gandiva-glib/function-signature.h
+++ b/c_glib/gandiva-glib/function-signature.h
@@ -21,9 +21,12 @@
#include
+#include
+
G_BEGIN_DECLS
#define GGANDIVA_TYPE_FUNCTION_SIGNATURE (ggandiva_function_signature_get_type())
+GGANDIVA_AVAILABLE_IN_14_0
G_DECLARE_DERIVABLE_TYPE(GGandivaFunctionSignature,
ggandiva_function_signature,
GGANDIVA,
@@ -35,20 +38,31 @@ struct _GGandivaFunctionSignatureClass
GObjectClass parent_class;
};
+GGANDIVA_AVAILABLE_IN_14_0
GGandivaFunctionSignature *
ggandiva_function_signature_new(const gchar *base_name,
GList *parameter_types,
GArrowDataType *return_type);
+
+GGANDIVA_AVAILABLE_IN_14_0
gboolean
ggandiva_function_signature_equal(GGandivaFunctionSignature *function_signature,
GGandivaFunctionSignature *other_function_signature);
+
+GGANDIVA_AVAILABLE_IN_14_0
gchar *
ggandiva_function_signature_to_string(GGandivaFunctionSignature *function_signature);
+
+GGANDIVA_AVAILABLE_IN_14_0
GArrowDataType *
ggandiva_function_signature_get_return_type(
GGandivaFunctionSignature *function_signature);
+
+GGANDIVA_AVAILABLE_IN_14_0
gchar *
ggandiva_function_signature_get_base_name(GGandivaFunctionSignature *function_signature);
+
+GGANDIVA_AVAILABLE_IN_14_0
GList *
ggandiva_function_signature_get_param_types(
GGandivaFunctionSignature *function_signature);
diff --git a/c_glib/gandiva-glib/meson.build b/c_glib/gandiva-glib/meson.build
index d5cab109dcf89..8cd00b3805b91 100644
--- a/c_glib/gandiva-glib/meson.build
+++ b/c_glib/gandiva-glib/meson.build
@@ -53,14 +53,12 @@ cpp_headers = files(
'selection-vector.hpp',
)
-version_h_conf = configuration_data()
-version_h_conf.set('GGANDIVA_VERSION_MAJOR', version_major)
-version_h_conf.set('GGANDIVA_VERSION_MINOR', version_minor)
-version_h_conf.set('GGANDIVA_VERSION_MICRO', version_micro)
-version_h_conf.set('GGANDIVA_VERSION_TAG', version_tag)
-version_h = configure_file(input: 'version.h.in',
- output: 'version.h',
- configuration: version_h_conf)
+version_h = configure_file(
+ input: 'version.h.in',
+ output: 'version.h',
+ command: [python3, generate_version_header_py, '--library', 'GGANDIVA', '--version', version, '--input', '@INPUT@', '--output', '@OUTPUT@'],
+)
+
c_headers += version_h
enums = gnome.mkenums('enums',
@@ -87,6 +85,7 @@ libgandiva_glib = library('gandiva-glib',
dependencies: dependencies,
implicit_include_directories: false,
include_directories: base_include_directories,
+ cpp_args: ['-DGGANDIVA_COMPILATION'],
soversion: so_version,
version: library_version)
gandiva_glib = declare_dependency(link_with: libgandiva_glib,
diff --git a/c_glib/gandiva-glib/native-function.h b/c_glib/gandiva-glib/native-function.h
index 5ceef396ef40c..934d29ab7e33b 100644
--- a/c_glib/gandiva-glib/native-function.h
+++ b/c_glib/gandiva-glib/native-function.h
@@ -40,6 +40,7 @@ typedef enum {
} GGandivaResultNullableType;
#define GGANDIVA_TYPE_NATIVE_FUNCTION (ggandiva_native_function_get_type())
+GGANDIVA_AVAILABLE_IN_14_0
G_DECLARE_DERIVABLE_TYPE(
GGandivaNativeFunction, ggandiva_native_function, GGANDIVA, NATIVE_FUNCTION, GObject)
@@ -48,20 +49,33 @@ struct _GGandivaNativeFunctionClass
GObjectClass parent_class;
};
+GGANDIVA_AVAILABLE_IN_14_0
GList *
ggandiva_native_function_get_signatures(GGandivaNativeFunction *native_function);
+
+GGANDIVA_AVAILABLE_IN_14_0
gboolean
ggandiva_native_function_equal(GGandivaNativeFunction *native_function,
GGandivaNativeFunction *other_native_function);
+
+GGANDIVA_AVAILABLE_IN_14_0
gchar *
ggandiva_native_function_to_string(GGandivaNativeFunction *native_function);
+
+GGANDIVA_AVAILABLE_IN_14_0
GGandivaResultNullableType
ggandiva_native_function_get_result_nullable_type(
GGandivaNativeFunction *native_function);
+
+GGANDIVA_AVAILABLE_IN_14_0
gboolean
ggandiva_native_function_need_context(GGandivaNativeFunction *native_function);
+
+GGANDIVA_AVAILABLE_IN_14_0
gboolean
ggandiva_native_function_need_function_holder(GGandivaNativeFunction *native_function);
+
+GGANDIVA_AVAILABLE_IN_14_0
gboolean
ggandiva_native_function_can_return_errors(GGandivaNativeFunction *native_function);
diff --git a/c_glib/gandiva-glib/node.h b/c_glib/gandiva-glib/node.h
index 715a3d6ebaf18..1733cac918c51 100644
--- a/c_glib/gandiva-glib/node.h
+++ b/c_glib/gandiva-glib/node.h
@@ -26,6 +26,7 @@
G_BEGIN_DECLS
#define GGANDIVA_TYPE_NODE (ggandiva_node_get_type())
+GGANDIVA_AVAILABLE_IN_0_12
G_DECLARE_DERIVABLE_TYPE(GGandivaNode, ggandiva_node, GGANDIVA, NODE, GObject)
struct _GGandivaNodeClass
@@ -33,10 +34,12 @@ struct _GGandivaNodeClass
GObjectClass parent_class;
};
+GGANDIVA_AVAILABLE_IN_0_16
gchar *
ggandiva_node_to_string(GGandivaNode *node);
#define GGANDIVA_TYPE_FIELD_NODE (ggandiva_field_node_get_type())
+GGANDIVA_AVAILABLE_IN_0_12
G_DECLARE_DERIVABLE_TYPE(
GGandivaFieldNode, ggandiva_field_node, GGANDIVA, FIELD_NODE, GGandivaNode)
struct _GGandivaFieldNodeClass
@@ -44,10 +47,12 @@ struct _GGandivaFieldNodeClass
GGandivaNodeClass parent_class;
};
+GGANDIVA_AVAILABLE_IN_0_12
GGandivaFieldNode *
ggandiva_field_node_new(GArrowField *field);
#define GGANDIVA_TYPE_FUNCTION_NODE (ggandiva_function_node_get_type())
+GGANDIVA_AVAILABLE_IN_0_12
G_DECLARE_DERIVABLE_TYPE(
GGandivaFunctionNode, ggandiva_function_node, GGANDIVA, FUNCTION_NODE, GGandivaNode)
struct _GGandivaFunctionNodeClass
@@ -55,14 +60,18 @@ struct _GGandivaFunctionNodeClass
GGandivaNodeClass parent_class;
};
+GGANDIVA_AVAILABLE_IN_0_12
GGandivaFunctionNode *
ggandiva_function_node_new(const gchar *name,
GList *parameters,
GArrowDataType *return_type);
+
+GGANDIVA_AVAILABLE_IN_0_12
GList *
ggandiva_function_node_get_parameters(GGandivaFunctionNode *node);
#define GGANDIVA_TYPE_LITERAL_NODE (ggandiva_literal_node_get_type())
+GGANDIVA_AVAILABLE_IN_0_12
G_DECLARE_DERIVABLE_TYPE(
GGandivaLiteralNode, ggandiva_literal_node, GGANDIVA, LITERAL_NODE, GGandivaNode)
struct _GGandivaLiteralNodeClass
@@ -71,6 +80,7 @@ struct _GGandivaLiteralNodeClass
};
#define GGANDIVA_TYPE_NULL_LITERAL_NODE (ggandiva_null_literal_node_get_type())
+GGANDIVA_AVAILABLE_IN_0_12
G_DECLARE_DERIVABLE_TYPE(GGandivaNullLiteralNode,
ggandiva_null_literal_node,
GGANDIVA,
@@ -81,10 +91,12 @@ struct _GGandivaNullLiteralNodeClass
GGandivaLiteralNodeClass parent_class;
};
+GGANDIVA_AVAILABLE_IN_0_12
GGandivaNullLiteralNode *
ggandiva_null_literal_node_new(GArrowDataType *return_type, GError **error);
#define GGANDIVA_TYPE_BOOLEAN_LITERAL_NODE (ggandiva_boolean_literal_node_get_type())
+GGANDIVA_AVAILABLE_IN_0_12
G_DECLARE_DERIVABLE_TYPE(GGandivaBooleanLiteralNode,
ggandiva_boolean_literal_node,
GGANDIVA,
@@ -95,12 +107,16 @@ struct _GGandivaBooleanLiteralNodeClass
GGandivaLiteralNodeClass parent_class;
};
+GGANDIVA_AVAILABLE_IN_0_12
GGandivaBooleanLiteralNode *
ggandiva_boolean_literal_node_new(gboolean value);
+
+GGANDIVA_AVAILABLE_IN_0_12
gboolean
ggandiva_boolean_literal_node_get_value(GGandivaBooleanLiteralNode *node);
#define GGANDIVA_TYPE_INT8_LITERAL_NODE (ggandiva_int8_literal_node_get_type())
+GGANDIVA_AVAILABLE_IN_0_12
G_DECLARE_DERIVABLE_TYPE(GGandivaInt8LiteralNode,
ggandiva_int8_literal_node,
GGANDIVA,
@@ -111,12 +127,16 @@ struct _GGandivaInt8LiteralNodeClass
GGandivaLiteralNodeClass parent_class;
};
+GGANDIVA_AVAILABLE_IN_0_12
GGandivaInt8LiteralNode *
ggandiva_int8_literal_node_new(gint8 value);
+
+GGANDIVA_AVAILABLE_IN_0_12
gint8
ggandiva_int8_literal_node_get_value(GGandivaInt8LiteralNode *node);
#define GGANDIVA_TYPE_UINT8_LITERAL_NODE (ggandiva_uint8_literal_node_get_type())
+GGANDIVA_AVAILABLE_IN_0_12
G_DECLARE_DERIVABLE_TYPE(GGandivaUInt8LiteralNode,
ggandiva_uint8_literal_node,
GGANDIVA,
@@ -127,12 +147,16 @@ struct _GGandivaUInt8LiteralNodeClass
GGandivaLiteralNodeClass parent_class;
};
+GGANDIVA_AVAILABLE_IN_0_12
GGandivaUInt8LiteralNode *
ggandiva_uint8_literal_node_new(guint8 value);
+
+GGANDIVA_AVAILABLE_IN_0_12
guint8
ggandiva_uint8_literal_node_get_value(GGandivaUInt8LiteralNode *node);
#define GGANDIVA_TYPE_INT16_LITERAL_NODE (ggandiva_int16_literal_node_get_type())
+GGANDIVA_AVAILABLE_IN_0_12
G_DECLARE_DERIVABLE_TYPE(GGandivaInt16LiteralNode,
ggandiva_int16_literal_node,
GGANDIVA,
@@ -143,12 +167,16 @@ struct _GGandivaInt16LiteralNodeClass
GGandivaLiteralNodeClass parent_class;
};
+GGANDIVA_AVAILABLE_IN_0_12
GGandivaInt16LiteralNode *
ggandiva_int16_literal_node_new(gint16 value);
+
+GGANDIVA_AVAILABLE_IN_0_12
gint16
ggandiva_int16_literal_node_get_value(GGandivaInt16LiteralNode *node);
#define GGANDIVA_TYPE_UINT16_LITERAL_NODE (ggandiva_uint16_literal_node_get_type())
+GGANDIVA_AVAILABLE_IN_0_12
G_DECLARE_DERIVABLE_TYPE(GGandivaUInt16LiteralNode,
ggandiva_uint16_literal_node,
GGANDIVA,
@@ -159,12 +187,16 @@ struct _GGandivaUInt16LiteralNodeClass
GGandivaLiteralNodeClass parent_class;
};
+GGANDIVA_AVAILABLE_IN_0_12
GGandivaUInt16LiteralNode *
ggandiva_uint16_literal_node_new(guint16 value);
+
+GGANDIVA_AVAILABLE_IN_0_12
guint16
ggandiva_uint16_literal_node_get_value(GGandivaUInt16LiteralNode *node);
#define GGANDIVA_TYPE_INT32_LITERAL_NODE (ggandiva_int32_literal_node_get_type())
+GGANDIVA_AVAILABLE_IN_0_12
G_DECLARE_DERIVABLE_TYPE(GGandivaInt32LiteralNode,
ggandiva_int32_literal_node,
GGANDIVA,
@@ -175,12 +207,16 @@ struct _GGandivaInt32LiteralNodeClass
GGandivaLiteralNodeClass parent_class;
};
+GGANDIVA_AVAILABLE_IN_0_12
GGandivaInt32LiteralNode *
ggandiva_int32_literal_node_new(gint32 value);
+
+GGANDIVA_AVAILABLE_IN_0_12
gint32
ggandiva_int32_literal_node_get_value(GGandivaInt32LiteralNode *node);
#define GGANDIVA_TYPE_UINT32_LITERAL_NODE (ggandiva_uint32_literal_node_get_type())
+GGANDIVA_AVAILABLE_IN_0_12
G_DECLARE_DERIVABLE_TYPE(GGandivaUInt32LiteralNode,
ggandiva_uint32_literal_node,
GGANDIVA,
@@ -191,12 +227,16 @@ struct _GGandivaUInt32LiteralNodeClass
GGandivaLiteralNodeClass parent_class;
};
+GGANDIVA_AVAILABLE_IN_0_12
GGandivaUInt32LiteralNode *
ggandiva_uint32_literal_node_new(guint32 value);
+
+GGANDIVA_AVAILABLE_IN_0_12
guint32
ggandiva_uint32_literal_node_get_value(GGandivaUInt32LiteralNode *node);
#define GGANDIVA_TYPE_INT64_LITERAL_NODE (ggandiva_int64_literal_node_get_type())
+GGANDIVA_AVAILABLE_IN_0_12
G_DECLARE_DERIVABLE_TYPE(GGandivaInt64LiteralNode,
ggandiva_int64_literal_node,
GGANDIVA,
@@ -207,12 +247,16 @@ struct _GGandivaInt64LiteralNodeClass
GGandivaLiteralNodeClass parent_class;
};
+GGANDIVA_AVAILABLE_IN_0_12
GGandivaInt64LiteralNode *
ggandiva_int64_literal_node_new(gint64 value);
+
+GGANDIVA_AVAILABLE_IN_0_12
gint64
ggandiva_int64_literal_node_get_value(GGandivaInt64LiteralNode *node);
#define GGANDIVA_TYPE_UINT64_LITERAL_NODE (ggandiva_uint64_literal_node_get_type())
+GGANDIVA_AVAILABLE_IN_0_12
G_DECLARE_DERIVABLE_TYPE(GGandivaUInt64LiteralNode,
ggandiva_uint64_literal_node,
GGANDIVA,
@@ -223,12 +267,16 @@ struct _GGandivaUInt64LiteralNodeClass
GGandivaLiteralNodeClass parent_class;
};
+GGANDIVA_AVAILABLE_IN_0_12
GGandivaUInt64LiteralNode *
ggandiva_uint64_literal_node_new(guint64 value);
+
+GGANDIVA_AVAILABLE_IN_0_12
guint64
ggandiva_uint64_literal_node_get_value(GGandivaUInt64LiteralNode *node);
#define GGANDIVA_TYPE_FLOAT_LITERAL_NODE (ggandiva_float_literal_node_get_type())
+GGANDIVA_AVAILABLE_IN_0_12
G_DECLARE_DERIVABLE_TYPE(GGandivaFloatLiteralNode,
ggandiva_float_literal_node,
GGANDIVA,
@@ -239,12 +287,16 @@ struct _GGandivaFloatLiteralNodeClass
GGandivaLiteralNodeClass parent_class;
};
+GGANDIVA_AVAILABLE_IN_0_12
GGandivaFloatLiteralNode *
ggandiva_float_literal_node_new(gfloat value);
+
+GGANDIVA_AVAILABLE_IN_0_12
gfloat
ggandiva_float_literal_node_get_value(GGandivaFloatLiteralNode *node);
#define GGANDIVA_TYPE_DOUBLE_LITERAL_NODE (ggandiva_double_literal_node_get_type())
+GGANDIVA_AVAILABLE_IN_0_12
G_DECLARE_DERIVABLE_TYPE(GGandivaDoubleLiteralNode,
ggandiva_double_literal_node,
GGANDIVA,
@@ -255,12 +307,16 @@ struct _GGandivaDoubleLiteralNodeClass
GGandivaLiteralNodeClass parent_class;
};
+GGANDIVA_AVAILABLE_IN_0_12
GGandivaDoubleLiteralNode *
ggandiva_double_literal_node_new(gdouble value);
+
+GGANDIVA_AVAILABLE_IN_0_12
gdouble
ggandiva_double_literal_node_get_value(GGandivaDoubleLiteralNode *node);
#define GGANDIVA_TYPE_BINARY_LITERAL_NODE (ggandiva_binary_literal_node_get_type())
+GGANDIVA_AVAILABLE_IN_0_12
G_DECLARE_DERIVABLE_TYPE(GGandivaBinaryLiteralNode,
ggandiva_binary_literal_node,
GGANDIVA,
@@ -271,14 +327,20 @@ struct _GGandivaBinaryLiteralNodeClass
GGandivaLiteralNodeClass parent_class;
};
+GGANDIVA_AVAILABLE_IN_0_12
GGandivaBinaryLiteralNode *
ggandiva_binary_literal_node_new(const guint8 *value, gsize size);
+
+GGANDIVA_AVAILABLE_IN_0_12
GGandivaBinaryLiteralNode *
ggandiva_binary_literal_node_new_bytes(GBytes *value);
+
+GGANDIVA_AVAILABLE_IN_0_12
GBytes *
ggandiva_binary_literal_node_get_value(GGandivaBinaryLiteralNode *node);
#define GGANDIVA_TYPE_STRING_LITERAL_NODE (ggandiva_string_literal_node_get_type())
+GGANDIVA_AVAILABLE_IN_0_12
G_DECLARE_DERIVABLE_TYPE(GGandivaStringLiteralNode,
ggandiva_string_literal_node,
GGANDIVA,
@@ -289,12 +351,16 @@ struct _GGandivaStringLiteralNodeClass
GGandivaLiteralNodeClass parent_class;
};
+GGANDIVA_AVAILABLE_IN_0_12
GGandivaStringLiteralNode *
ggandiva_string_literal_node_new(const gchar *value);
+
+GGANDIVA_AVAILABLE_IN_0_12
const gchar *
ggandiva_string_literal_node_get_value(GGandivaStringLiteralNode *node);
#define GGANDIVA_TYPE_IF_NODE (ggandiva_if_node_get_type())
+GGANDIVA_AVAILABLE_IN_0_12
G_DECLARE_DERIVABLE_TYPE(
GGandivaIfNode, ggandiva_if_node, GGANDIVA, IF_NODE, GGandivaNode)
struct _GGandivaIfNodeClass
@@ -302,6 +368,7 @@ struct _GGandivaIfNodeClass
GGandivaNodeClass parent_class;
};
+GGANDIVA_AVAILABLE_IN_0_12
GGandivaIfNode *
ggandiva_if_node_new(GGandivaNode *condition_node,
GGandivaNode *then_node,
@@ -310,6 +377,7 @@ ggandiva_if_node_new(GGandivaNode *condition_node,
GError **error);
#define GGANDIVA_TYPE_BOOLEAN_NODE (ggandiva_boolean_node_get_type())
+GGANDIVA_AVAILABLE_IN_0_17
G_DECLARE_DERIVABLE_TYPE(
GGandivaBooleanNode, ggandiva_boolean_node, GGANDIVA, BOOLEAN_NODE, GGandivaNode)
@@ -323,6 +391,7 @@ GList *
ggandiva_boolean_node_get_children(GGandivaBooleanNode *node);
#define GGANDIVA_TYPE_AND_NODE (ggandiva_and_node_get_type())
+GGANDIVA_AVAILABLE_IN_0_17
G_DECLARE_DERIVABLE_TYPE(
GGandivaAndNode, ggandiva_and_node, GGANDIVA, AND_NODE, GGandivaBooleanNode)
struct _GGandivaAndNodeClass
@@ -335,6 +404,7 @@ GGandivaAndNode *
ggandiva_and_node_new(GList *children);
#define GGANDIVA_TYPE_OR_NODE (ggandiva_or_node_get_type())
+GGANDIVA_AVAILABLE_IN_0_17
G_DECLARE_DERIVABLE_TYPE(
GGandivaOrNode, ggandiva_or_node, GGANDIVA, OR_NODE, GGandivaBooleanNode)
struct _GGandivaOrNodeClass
diff --git a/c_glib/gandiva-glib/projector.h b/c_glib/gandiva-glib/projector.h
index e0afec5cb1ba1..5fbf9c290beab 100644
--- a/c_glib/gandiva-glib/projector.h
+++ b/c_glib/gandiva-glib/projector.h
@@ -24,6 +24,7 @@
G_BEGIN_DECLS
#define GGANDIVA_TYPE_PROJECTOR (ggandiva_projector_get_type())
+GGANDIVA_AVAILABLE_IN_0_12
G_DECLARE_DERIVABLE_TYPE(
GGandivaProjector, ggandiva_projector, GGANDIVA, PROJECTOR, GObject)
@@ -32,14 +33,18 @@ struct _GGandivaProjectorClass
GObjectClass parent_class;
};
+GGANDIVA_AVAILABLE_IN_0_12
GGandivaProjector *
ggandiva_projector_new(GArrowSchema *schema, GList *expressions, GError **error);
+
+GGANDIVA_AVAILABLE_IN_0_12
GList *
ggandiva_projector_evaluate(GGandivaProjector *projector,
GArrowRecordBatch *record_batch,
GError **error);
#define GGANDIVA_TYPE_SELECTABLE_PROJECTOR (ggandiva_selectable_projector_get_type())
+GGANDIVA_AVAILABLE_IN_4_0
G_DECLARE_DERIVABLE_TYPE(GGandivaSelectableProjector,
ggandiva_selectable_projector,
GGANDIVA,
diff --git a/c_glib/gandiva-glib/selection-vector.h b/c_glib/gandiva-glib/selection-vector.h
index 6d78192e35e28..558b9b950cf84 100644
--- a/c_glib/gandiva-glib/selection-vector.h
+++ b/c_glib/gandiva-glib/selection-vector.h
@@ -47,6 +47,7 @@ typedef enum {
} GGandivaSelectionVectorMode;
#define GGANDIVA_TYPE_SELECTION_VECTOR (ggandiva_selection_vector_get_type())
+GGANDIVA_AVAILABLE_IN_4_0
G_DECLARE_DERIVABLE_TYPE(
GGandivaSelectionVector, ggandiva_selection_vector, GGANDIVA, SELECTION_VECTOR, GObject)
@@ -65,6 +66,7 @@ ggandiva_selection_vector_to_array(GGandivaSelectionVector *selection_vector);
#define GGANDIVA_TYPE_UINT16_SELECTION_VECTOR \
(ggandiva_uint16_selection_vector_get_type())
+GGANDIVA_AVAILABLE_IN_4_0
G_DECLARE_DERIVABLE_TYPE(GGandivaUInt16SelectionVector,
ggandiva_uint16_selection_vector,
GGANDIVA,
@@ -82,6 +84,7 @@ ggandiva_uint16_selection_vector_new(gint64 max_slots, GError **error);
#define GGANDIVA_TYPE_UINT32_SELECTION_VECTOR \
(ggandiva_uint32_selection_vector_get_type())
+GGANDIVA_AVAILABLE_IN_4_0
G_DECLARE_DERIVABLE_TYPE(GGandivaUInt32SelectionVector,
ggandiva_uint32_selection_vector,
GGANDIVA,
@@ -99,6 +102,7 @@ ggandiva_uint32_selection_vector_new(gint64 max_slots, GError **error);
#define GGANDIVA_TYPE_UINT64_SELECTION_VECTOR \
(ggandiva_uint64_selection_vector_get_type())
+GGANDIVA_AVAILABLE_IN_4_0
G_DECLARE_DERIVABLE_TYPE(GGandivaUInt64SelectionVector,
ggandiva_uint64_selection_vector,
GGANDIVA,
diff --git a/c_glib/gandiva-glib/version.h.in b/c_glib/gandiva-glib/version.h.in
index 3c9e87c9d52e1..857c7367bd7e2 100644
--- a/c_glib/gandiva-glib/version.h.in
+++ b/c_glib/gandiva-glib/version.h.in
@@ -38,7 +38,7 @@
*
* Since: 1.0.0
*/
-#define GGANDIVA_VERSION_MAJOR (@GGANDIVA_VERSION_MAJOR@)
+#define GGANDIVA_VERSION_MAJOR (@VERSION_MAJOR@)
/**
* GGANDIVA_VERSION_MINOR:
@@ -47,7 +47,7 @@
*
* Since: 1.0.0
*/
-#define GGANDIVA_VERSION_MINOR (@GGANDIVA_VERSION_MINOR@)
+#define GGANDIVA_VERSION_MINOR (@VERSION_MINOR@)
/**
* GGANDIVA_VERSION_MICRO:
@@ -56,7 +56,7 @@
*
* Since: 1.0.0
*/
-#define GGANDIVA_VERSION_MICRO (@GGANDIVA_VERSION_MICRO@)
+#define GGANDIVA_VERSION_MICRO (@VERSION_MICRO@)
/**
* GGANDIVA_VERSION_TAG:
@@ -66,7 +66,7 @@
*
* Since: 1.0.0
*/
-#define GGANDIVA_VERSION_TAG "@GGANDIVA_VERSION_TAG@"
+#define GGANDIVA_VERSION_TAG "@VERSION_TAG@"
/**
* GGANDIVA_VERSION_CHECK:
@@ -110,23 +110,7 @@
# define GGANDIVA_UNAVAILABLE(major, minor) G_UNAVAILABLE(major, minor)
#endif
-/**
- * GGANDIVA_VERSION_1_0:
- *
- * You can use this macro value for compile time API version check.
- *
- * Since: 1.0.0
- */
-#define GGANDIVA_VERSION_1_0 G_ENCODE_VERSION(1, 0)
-
-/**
- * GGANDIVA_VERSION_4_0:
- *
- * You can use this macro value for compile time API version check.
- *
- * Since: 4.0.0
- */
-#define GGANDIVA_VERSION_4_0 G_ENCODE_VERSION(4, 0)
+@ENCODED_VERSIONS@
/**
* GGANDIVA_VERSION_MIN_REQUIRED:
@@ -172,47 +156,6 @@
G_ENCODE_VERSION(GGANDIVA_VERSION_MAJOR, GGANDIVA_VERSION_MINOR)
#endif
+@VISIBILITY_MACROS@
-#define GGANDIVA_AVAILABLE_IN_ALL
-
-#if GGANDIVA_VERSION_MIN_REQUIRED >= GGANDIVA_VERSION_4_0
-# define GGANDIVA_DEPRECATED_IN_4_0 GGANDIVA_DEPRECATED
-# define GGANDIVA_DEPRECATED_IN_4_0_FOR(function) GGANDIVA_DEPRECATED_FOR(function)
-#else
-# define GGANDIVA_DEPRECATED_IN_4_0
-# define GGANDIVA_DEPRECATED_IN_4_0_FOR(function)
-#endif
-
-#if GGANDIVA_VERSION_MAX_ALLOWED < GGANDIVA_VERSION_4_0
-# define GGANDIVA_AVAILABLE_IN_4_0 GGANDIVA_UNAVAILABLE(4, 0)
-#else
-# define GGANDIVA_AVAILABLE_IN_4_0
-#endif
-
-#if GGANDIVA_VERSION_MIN_REQUIRED >= GGANDIVA_VERSION_1_0
-# define GGANDIVA_DEPRECATED_IN_1_0 GGANDIVA_DEPRECATED
-# define GGANDIVA_DEPRECATED_IN_1_0_FOR(function) GGANDIVA_DEPRECATED_FOR(function)
-#else
-# define GGANDIVA_DEPRECATED_IN_1_0
-# define GGANDIVA_DEPRECATED_IN_1_0_FOR(function)
-#endif
-
-#if GGANDIVA_VERSION_MAX_ALLOWED < GGANDIVA_VERSION_1_0
-# define GGANDIVA_AVAILABLE_IN_1_0 GGANDIVA_UNAVAILABLE(1, 0)
-#else
-# define GGANDIVA_AVAILABLE_IN_1_0
-#endif
-
-#if GGANDIVA_VERSION_MIN_REQUIRED >= GGANDIVA_VERSION_0_17
-# define GGANDIVA_DEPRECATED_IN_0_17 GGANDIVA_DEPRECATED
-# define GGANDIVA_DEPRECATED_IN_0_17_FOR(function) GGANDIVA_DEPRECATED_FOR(function)
-#else
-# define GGANDIVA_DEPRECATED_IN_0_17
-# define GGANDIVA_DEPRECATED_IN_0_17_FOR(function)
-#endif
-
-#if GGANDIVA_VERSION_MAX_ALLOWED < GGANDIVA_VERSION_0_17
-# define GGANDIVA_AVAILABLE_IN_0_17 GGANDIVA_UNAVAILABLE(0, 17)
-#else
-# define GGANDIVA_AVAILABLE_IN_0_17
-#endif
+@AVAILABILITY_MACROS@
diff --git a/c_glib/meson.build b/c_glib/meson.build
index 08a9cd182e02e..06aa5b941e77c 100644
--- a/c_glib/meson.build
+++ b/c_glib/meson.build
@@ -171,6 +171,10 @@ if cxx.get_id() != 'msvc'
endif
add_project_arguments(cxx.get_supported_arguments(cxx_flags), language: 'cpp')
+python = import('python')
+python3 = python.find_installation('python3')
+generate_version_header_py = project_source_root / 'tool' / 'generate-version-header.py'
+
subdir('arrow-glib')
if arrow_cuda.found()
subdir('arrow-cuda-glib')
diff --git a/c_glib/parquet-glib/arrow-file-reader.h b/c_glib/parquet-glib/arrow-file-reader.h
index 63c14ac71da86..52d7293bad0fa 100644
--- a/c_glib/parquet-glib/arrow-file-reader.h
+++ b/c_glib/parquet-glib/arrow-file-reader.h
@@ -24,6 +24,7 @@
G_BEGIN_DECLS
#define GPARQUET_TYPE_ARROW_FILE_READER (gparquet_arrow_file_reader_get_type())
+GPARQUET_AVAILABLE_IN_0_11
G_DECLARE_DERIVABLE_TYPE(GParquetArrowFileReader,
gparquet_arrow_file_reader,
GPARQUET,
@@ -34,15 +35,19 @@ struct _GParquetArrowFileReaderClass
GObjectClass parent_class;
};
+GPARQUET_AVAILABLE_IN_0_11
GParquetArrowFileReader *
gparquet_arrow_file_reader_new_arrow(GArrowSeekableInputStream *source, GError **error);
+
+GPARQUET_AVAILABLE_IN_0_11
GParquetArrowFileReader *
gparquet_arrow_file_reader_new_path(const gchar *path, GError **error);
+GPARQUET_AVAILABLE_IN_0_11
GArrowTable *
gparquet_arrow_file_reader_read_table(GParquetArrowFileReader *reader, GError **error);
-GARROW_AVAILABLE_IN_1_0
+GPARQUET_AVAILABLE_IN_1_0
GArrowTable *
gparquet_arrow_file_reader_read_row_group(GParquetArrowFileReader *reader,
gint row_group_index,
@@ -50,26 +55,30 @@ gparquet_arrow_file_reader_read_row_group(GParquetArrowFileReader *reader,
gsize n_column_indices,
GError **error);
+GPARQUET_AVAILABLE_IN_0_12
GArrowSchema *
gparquet_arrow_file_reader_get_schema(GParquetArrowFileReader *reader, GError **error);
+GPARQUET_AVAILABLE_IN_0_15
GArrowChunkedArray *
gparquet_arrow_file_reader_read_column_data(GParquetArrowFileReader *reader,
gint i,
GError **error);
+GPARQUET_AVAILABLE_IN_0_11
gint
gparquet_arrow_file_reader_get_n_row_groups(GParquetArrowFileReader *reader);
-GARROW_AVAILABLE_IN_6_0
+GPARQUET_AVAILABLE_IN_6_0
gint64
gparquet_arrow_file_reader_get_n_rows(GParquetArrowFileReader *reader);
+GPARQUET_AVAILABLE_IN_0_11
void
gparquet_arrow_file_reader_set_use_threads(GParquetArrowFileReader *reader,
gboolean use_threads);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
GParquetFileMetadata *
gparquet_arrow_file_reader_get_metadata(GParquetArrowFileReader *reader);
diff --git a/c_glib/parquet-glib/arrow-file-writer.h b/c_glib/parquet-glib/arrow-file-writer.h
index 592ea4ae3f1ba..71cbfa195e842 100644
--- a/c_glib/parquet-glib/arrow-file-writer.h
+++ b/c_glib/parquet-glib/arrow-file-writer.h
@@ -20,10 +20,12 @@
#pragma once
#include
+#include
G_BEGIN_DECLS
#define GPARQUET_TYPE_WRITER_PROPERTIES (gparquet_writer_properties_get_type())
+GPARQUET_AVAILABLE_IN_0_17
G_DECLARE_DERIVABLE_TYPE(GParquetWriterProperties,
gparquet_writer_properties,
GPARQUET,
@@ -34,61 +36,62 @@ struct _GParquetWriterPropertiesClass
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_0_17
+GPARQUET_AVAILABLE_IN_0_17
GParquetWriterProperties *
gparquet_writer_properties_new(void);
-GARROW_AVAILABLE_IN_0_17
+GPARQUET_AVAILABLE_IN_0_17
void
gparquet_writer_properties_set_compression(GParquetWriterProperties *properties,
GArrowCompressionType compression_type,
const gchar *path);
-GARROW_AVAILABLE_IN_0_17
+GPARQUET_AVAILABLE_IN_0_17
GArrowCompressionType
gparquet_writer_properties_get_compression_path(GParquetWriterProperties *properties,
const gchar *path);
-GARROW_AVAILABLE_IN_0_17
+GPARQUET_AVAILABLE_IN_0_17
void
gparquet_writer_properties_enable_dictionary(GParquetWriterProperties *properties,
const gchar *path);
-GARROW_AVAILABLE_IN_0_17
+GPARQUET_AVAILABLE_IN_0_17
void
gparquet_writer_properties_disable_dictionary(GParquetWriterProperties *properties,
const gchar *path);
-GARROW_AVAILABLE_IN_0_17
+GPARQUET_AVAILABLE_IN_0_17
gboolean
gparquet_writer_properties_is_dictionary_enabled(GParquetWriterProperties *properties,
const gchar *path);
-GARROW_AVAILABLE_IN_0_17
+GPARQUET_AVAILABLE_IN_0_17
void
gparquet_writer_properties_set_dictionary_page_size_limit(
GParquetWriterProperties *properties, gint64 limit);
-GARROW_AVAILABLE_IN_0_17
+GPARQUET_AVAILABLE_IN_0_17
gint64
gparquet_writer_properties_get_dictionary_page_size_limit(
GParquetWriterProperties *properties);
-GARROW_AVAILABLE_IN_0_17
+GPARQUET_AVAILABLE_IN_0_17
void
gparquet_writer_properties_set_batch_size(GParquetWriterProperties *properties,
gint64 batch_size);
-GARROW_AVAILABLE_IN_0_17
+GPARQUET_AVAILABLE_IN_0_17
gint64
gparquet_writer_properties_get_batch_size(GParquetWriterProperties *properties);
-GARROW_AVAILABLE_IN_0_17
+GPARQUET_AVAILABLE_IN_0_17
void
gparquet_writer_properties_set_max_row_group_length(GParquetWriterProperties *properties,
gint64 length);
-GARROW_AVAILABLE_IN_0_17
+GPARQUET_AVAILABLE_IN_0_17
gint64
gparquet_writer_properties_get_max_row_group_length(GParquetWriterProperties *properties);
-GARROW_AVAILABLE_IN_0_17
+GPARQUET_AVAILABLE_IN_0_17
void
gparquet_writer_properties_set_data_page_size(GParquetWriterProperties *properties,
gint64 data_page_size);
-GARROW_AVAILABLE_IN_0_17
+GPARQUET_AVAILABLE_IN_0_17
gint64
gparquet_writer_properties_get_data_page_size(GParquetWriterProperties *properties);
#define GPARQUET_TYPE_ARROW_FILE_WRITER (gparquet_arrow_file_writer_get_type())
+GPARQUET_AVAILABLE_IN_0_11
G_DECLARE_DERIVABLE_TYPE(GParquetArrowFileWriter,
gparquet_arrow_file_writer,
GPARQUET,
@@ -99,23 +102,28 @@ struct _GParquetArrowFileWriterClass
GObjectClass parent_class;
};
+GPARQUET_AVAILABLE_IN_0_11
GParquetArrowFileWriter *
gparquet_arrow_file_writer_new_arrow(GArrowSchema *schema,
GArrowOutputStream *sink,
GParquetWriterProperties *writer_properties,
GError **error);
+
+GPARQUET_AVAILABLE_IN_0_11
GParquetArrowFileWriter *
gparquet_arrow_file_writer_new_path(GArrowSchema *schema,
const gchar *path,
GParquetWriterProperties *writer_properties,
GError **error);
+GPARQUET_AVAILABLE_IN_0_11
gboolean
gparquet_arrow_file_writer_write_table(GParquetArrowFileWriter *writer,
GArrowTable *table,
guint64 chunk_size,
GError **error);
+GPARQUET_AVAILABLE_IN_0_11
gboolean
gparquet_arrow_file_writer_close(GParquetArrowFileWriter *writer, GError **error);
diff --git a/c_glib/parquet-glib/meson.build b/c_glib/parquet-glib/meson.build
index 67de0bf2d91fb..a3de1d0933f7f 100644
--- a/c_glib/parquet-glib/meson.build
+++ b/c_glib/parquet-glib/meson.build
@@ -42,10 +42,17 @@ cpp_headers = files(
'parquet-glib.hpp',
)
+version_h = configure_file(
+ input: 'version.h.in',
+ output: 'version.h',
+ command: [python3, generate_version_header_py, '--library', 'GPARQUET', '--version', version, '--input', '@INPUT@', '--output', '@OUTPUT@'],
+)
+
+c_headers += version_h
+
headers = c_headers + cpp_headers
install_headers(headers, subdir: project_name)
-
dependencies = [
arrow,
parquet,
@@ -57,6 +64,7 @@ libparquet_glib = library('parquet-glib',
dependencies: dependencies,
implicit_include_directories: false,
include_directories: base_include_directories,
+ cpp_args: ['-DGPARQUET_COMPILATION'],
soversion: so_version,
version: library_version)
parquet_glib = declare_dependency(link_with: libparquet_glib,
diff --git a/c_glib/parquet-glib/metadata.h b/c_glib/parquet-glib/metadata.h
index 1c9fce7cc778d..d79bf009751ca 100644
--- a/c_glib/parquet-glib/metadata.h
+++ b/c_glib/parquet-glib/metadata.h
@@ -24,6 +24,7 @@
G_BEGIN_DECLS
#define GPARQUET_TYPE_COLUMN_CHUNK_METADATA (gparquet_column_chunk_metadata_get_type())
+GPARQUET_AVAILABLE_IN_8_0
G_DECLARE_DERIVABLE_TYPE(GParquetColumnChunkMetadata,
gparquet_column_chunk_metadata,
GPARQUET,
@@ -34,28 +35,29 @@ struct _GParquetColumnChunkMetadataClass
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gboolean
gparquet_column_chunk_metadata_equal(GParquetColumnChunkMetadata *metadata,
GParquetColumnChunkMetadata *other_metadata);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gint64
gparquet_column_chunk_metadata_get_total_size(GParquetColumnChunkMetadata *metadata);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gint64
gparquet_column_chunk_metadata_get_total_compressed_size(
GParquetColumnChunkMetadata *metadata);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gint64
gparquet_column_chunk_metadata_get_file_offset(GParquetColumnChunkMetadata *metadata);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gboolean
gparquet_column_chunk_metadata_can_decompress(GParquetColumnChunkMetadata *metadata);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
GParquetStatistics *
gparquet_column_chunk_metadata_get_statistics(GParquetColumnChunkMetadata *metadata);
#define GPARQUET_TYPE_ROW_GROUP_METADATA (gparquet_row_group_metadata_get_type())
+GPARQUET_AVAILABLE_IN_8_0
G_DECLARE_DERIVABLE_TYPE(GParquetRowGroupMetadata,
gparquet_row_group_metadata,
GPARQUET,
@@ -66,35 +68,36 @@ struct _GParquetRowGroupMetadataClass
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gboolean
gparquet_row_group_metadata_equal(GParquetRowGroupMetadata *metadata,
GParquetRowGroupMetadata *other_metadata);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gint
gparquet_row_group_metadata_get_n_columns(GParquetRowGroupMetadata *metadata);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
GParquetColumnChunkMetadata *
gparquet_row_group_metadata_get_column_chunk(GParquetRowGroupMetadata *metadata,
gint index,
GError **error);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gint64
gparquet_row_group_metadata_get_n_rows(GParquetRowGroupMetadata *metadata);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gint64
gparquet_row_group_metadata_get_total_size(GParquetRowGroupMetadata *metadata);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gint64
gparquet_row_group_metadata_get_total_compressed_size(GParquetRowGroupMetadata *metadata);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gint64
gparquet_row_group_metadata_get_file_offset(GParquetRowGroupMetadata *metadata);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gboolean
gparquet_row_group_metadata_can_decompress(GParquetRowGroupMetadata *metadata);
#define GPARQUET_TYPE_FILE_METADATA (gparquet_file_metadata_get_type())
+GPARQUET_AVAILABLE_IN_8_0
G_DECLARE_DERIVABLE_TYPE(
GParquetFileMetadata, gparquet_file_metadata, GPARQUET, FILE_METADATA, GObject)
struct _GParquetFileMetadataClass
@@ -102,34 +105,34 @@ struct _GParquetFileMetadataClass
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gboolean
gparquet_file_metadata_equal(GParquetFileMetadata *metadata,
GParquetFileMetadata *other_metadata);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gint
gparquet_file_metadata_get_n_columns(GParquetFileMetadata *metadata);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gint
gparquet_file_metadata_get_n_schema_elements(GParquetFileMetadata *metadata);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gint64
gparquet_file_metadata_get_n_rows(GParquetFileMetadata *metadata);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gint
gparquet_file_metadata_get_n_row_groups(GParquetFileMetadata *metadata);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
GParquetRowGroupMetadata *
gparquet_file_metadata_get_row_group(GParquetFileMetadata *metadata,
gint index,
GError **error);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
const gchar *
gparquet_file_metadata_get_created_by(GParquetFileMetadata *metadata);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
guint32
gparquet_file_metadata_get_size(GParquetFileMetadata *metadata);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gboolean
gparquet_file_metadata_can_decompress(GParquetFileMetadata *metadata);
diff --git a/c_glib/parquet-glib/parquet-glib.h b/c_glib/parquet-glib/parquet-glib.h
index 23659421ce3d8..308adb87a7ed2 100644
--- a/c_glib/parquet-glib/parquet-glib.h
+++ b/c_glib/parquet-glib/parquet-glib.h
@@ -19,6 +19,8 @@
#pragma once
+#include
+
#include
#include
#include
diff --git a/c_glib/parquet-glib/statistics.h b/c_glib/parquet-glib/statistics.h
index f28e2a3713638..25e02df8774b2 100644
--- a/c_glib/parquet-glib/statistics.h
+++ b/c_glib/parquet-glib/statistics.h
@@ -21,9 +21,12 @@
#include
+#include
+
G_BEGIN_DECLS
#define GPARQUET_TYPE_STATISTICS (gparquet_statistics_get_type())
+GPARQUET_AVAILABLE_IN_8_0
G_DECLARE_DERIVABLE_TYPE(
GParquetStatistics, gparquet_statistics, GPARQUET, STATISTICS, GObject)
struct _GParquetStatisticsClass
@@ -31,30 +34,31 @@ struct _GParquetStatisticsClass
GObjectClass parent_class;
};
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gboolean
gparquet_statistics_equal(GParquetStatistics *statistics,
GParquetStatistics *other_statistics);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gboolean
gparquet_statistics_has_n_nulls(GParquetStatistics *statistics);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gint64
gparquet_statistics_get_n_nulls(GParquetStatistics *statistics);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gboolean
gparquet_statistics_has_n_distinct_values(GParquetStatistics *statistics);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gint64
gparquet_statistics_get_n_distinct_values(GParquetStatistics *statistics);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gint64
gparquet_statistics_get_n_values(GParquetStatistics *statistics);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gboolean
gparquet_statistics_has_min_max(GParquetStatistics *statistics);
#define GPARQUET_TYPE_BOOLEAN_STATISTICS (gparquet_boolean_statistics_get_type())
+GPARQUET_AVAILABLE_IN_8_0
G_DECLARE_DERIVABLE_TYPE(GParquetBooleanStatistics,
gparquet_boolean_statistics,
GPARQUET,
@@ -65,14 +69,15 @@ struct _GParquetBooleanStatisticsClass
GParquetStatisticsClass parent_class;
};
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gboolean
gparquet_boolean_statistics_get_min(GParquetBooleanStatistics *statistics);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gboolean
gparquet_boolean_statistics_get_max(GParquetBooleanStatistics *statistics);
#define GPARQUET_TYPE_INT32_STATISTICS (gparquet_int32_statistics_get_type())
+GPARQUET_AVAILABLE_IN_8_0
G_DECLARE_DERIVABLE_TYPE(GParquetInt32Statistics,
gparquet_int32_statistics,
GPARQUET,
@@ -83,14 +88,15 @@ struct _GParquetInt32StatisticsClass
GParquetStatisticsClass parent_class;
};
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gint32
gparquet_int32_statistics_get_min(GParquetInt32Statistics *statistics);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gint32
gparquet_int32_statistics_get_max(GParquetInt32Statistics *statistics);
#define GPARQUET_TYPE_INT64_STATISTICS (gparquet_int64_statistics_get_type())
+GPARQUET_AVAILABLE_IN_8_0
G_DECLARE_DERIVABLE_TYPE(GParquetInt64Statistics,
gparquet_int64_statistics,
GPARQUET,
@@ -101,14 +107,15 @@ struct _GParquetInt64StatisticsClass
GParquetStatisticsClass parent_class;
};
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gint64
gparquet_int64_statistics_get_min(GParquetInt64Statistics *statistics);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gint64
gparquet_int64_statistics_get_max(GParquetInt64Statistics *statistics);
#define GPARQUET_TYPE_FLOAT_STATISTICS (gparquet_float_statistics_get_type())
+GPARQUET_AVAILABLE_IN_8_0
G_DECLARE_DERIVABLE_TYPE(GParquetFloatStatistics,
gparquet_float_statistics,
GPARQUET,
@@ -119,14 +126,15 @@ struct _GParquetFloatStatisticsClass
GParquetStatisticsClass parent_class;
};
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gfloat
gparquet_float_statistics_get_min(GParquetFloatStatistics *statistics);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gfloat
gparquet_float_statistics_get_max(GParquetFloatStatistics *statistics);
#define GPARQUET_TYPE_DOUBLE_STATISTICS (gparquet_double_statistics_get_type())
+GPARQUET_AVAILABLE_IN_8_0
G_DECLARE_DERIVABLE_TYPE(GParquetDoubleStatistics,
gparquet_double_statistics,
GPARQUET,
@@ -137,14 +145,15 @@ struct _GParquetDoubleStatisticsClass
GParquetStatisticsClass parent_class;
};
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gdouble
gparquet_double_statistics_get_min(GParquetDoubleStatistics *statistics);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
gdouble
gparquet_double_statistics_get_max(GParquetDoubleStatistics *statistics);
#define GPARQUET_TYPE_BYTE_ARRAY_STATISTICS (gparquet_byte_array_statistics_get_type())
+GPARQUET_AVAILABLE_IN_8_0
G_DECLARE_DERIVABLE_TYPE(GParquetByteArrayStatistics,
gparquet_byte_array_statistics,
GPARQUET,
@@ -155,15 +164,16 @@ struct _GParquetByteArrayStatisticsClass
GParquetStatisticsClass parent_class;
};
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
GBytes *
gparquet_byte_array_statistics_get_min(GParquetByteArrayStatistics *statistics);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
GBytes *
gparquet_byte_array_statistics_get_max(GParquetByteArrayStatistics *statistics);
#define GPARQUET_TYPE_FIXED_LENGTH_BYTE_ARRAY_STATISTICS \
(gparquet_fixed_length_byte_array_statistics_get_type())
+GPARQUET_AVAILABLE_IN_8_0
G_DECLARE_DERIVABLE_TYPE(GParquetFixedLengthByteArrayStatistics,
gparquet_fixed_length_byte_array_statistics,
GPARQUET,
@@ -174,11 +184,11 @@ struct _GParquetFixedLengthByteArrayStatisticsClass
GParquetStatisticsClass parent_class;
};
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
GBytes *
gparquet_fixed_length_byte_array_statistics_get_min(
GParquetFixedLengthByteArrayStatistics *statistics);
-GARROW_AVAILABLE_IN_8_0
+GPARQUET_AVAILABLE_IN_8_0
GBytes *
gparquet_fixed_length_byte_array_statistics_get_max(
GParquetFixedLengthByteArrayStatistics *statistics);
diff --git a/c_glib/parquet-glib/version.h.in b/c_glib/parquet-glib/version.h.in
new file mode 100644
index 0000000000000..142b3b83e0f3d
--- /dev/null
+++ b/c_glib/parquet-glib/version.h.in
@@ -0,0 +1,159 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#pragma once
+
+#include
+
+/**
+ * SECTION: version
+ * @section_id: version-macros
+ * @title: Version related macros
+ * @include: parquet-glib/parquet-glib.h
+ *
+ * Parquet GLib provides macros that can be used by C pre-processor.
+ * They are useful to check version related things at compile time.
+ */
+
+/**
+ * GPARQUET_VERSION_MAJOR:
+ *
+ * The major version.
+ *
+ * Since: 17.0.0
+ */
+#define GPARQUET_VERSION_MAJOR (@VERSION_MAJOR@)
+
+/**
+ * GPARQUET_VERSION_MINOR:
+ *
+ * The minor version.
+ *
+ * Since: 17.0.0
+ */
+#define GPARQUET_VERSION_MINOR (@VERSION_MINOR@)
+
+/**
+ * GPARQUET_VERSION_MICRO:
+ *
+ * The micro version.
+ *
+ * Since: 17.0.0
+ */
+#define GPARQUET_VERSION_MICRO (@VERSION_MICRO@)
+
+/**
+ * GPARQUET_VERSION_TAG:
+ *
+ * The version tag. Normally, it's an empty string. It's "SNAPSHOT"
+ * for snapshot version.
+ *
+ * Since: 17.0.0
+ */
+#define GPARQUET_VERSION_TAG "@VERSION_TAG@"
+
+/**
+ * GPARQUET_VERSION_CHECK:
+ * @major: A major version to check for.
+ * @minor: A minor version to check for.
+ * @micro: A micro version to check for.
+ *
+ * You can use this macro in C pre-processor.
+ *
+ * Returns: %TRUE if the compile time Apache Arrow GLib version is the
+ * same as or newer than the passed version, %FALSE otherwise.
+ *
+ * Since: 17.0.0
+ */
+#define GPARQUET_VERSION_CHECK(major, minor, micro) \
+ (GPARQUET_VERSION_MAJOR > (major) || \
+ (GPARQUET_VERSION_MAJOR == (major) && \
+ GPARQUET_VERSION_MINOR > (minor)) || \
+ (GPARQUET_VERSION_MAJOR == (major) && \
+ GPARQUET_VERSION_MINOR == (minor) && \
+ GPARQUET_VERSION_MICRO >= (micro)))
+
+/**
+ * GPARQUET_DISABLE_DEPRECATION_WARNINGS:
+ *
+ * If this macro is defined, no deprecated warnings are produced.
+ *
+ * You must define this macro before including the
+ * arrow-glib/arrow-glib.h header.
+ *
+ * Since: 17.0.0
+ */
+
+#ifdef GPARQUET_DISABLE_DEPRECATION_WARNINGS
+# define GPARQUET_DEPRECATED
+# define GPARQUET_DEPRECATED_FOR(function)
+# define GPARQUET_UNAVAILABLE(major, minor)
+#else
+# define GPARQUET_DEPRECATED G_DEPRECATED
+# define GPARQUET_DEPRECATED_FOR(function) G_DEPRECATED_FOR(function)
+# define GPARQUET_UNAVAILABLE(major, minor) G_UNAVAILABLE(major, minor)
+#endif
+
+@ENCODED_VERSIONS@
+
+/**
+ * GPARQUET_VERSION_MIN_REQUIRED:
+ *
+ * You can use this macro for compile time API version check.
+ *
+ * This macro value must be one of the predefined version macros such
+ * as %GPARQUET_VERSION_0_10.
+ *
+ * If you use any functions that is defined by newer version than
+ * %GPARQUET_VERSION_MIN_REQUIRED, deprecated warnings are produced at
+ * compile time.
+ *
+ * You must define this macro before including the
+ * parquet-glib/parquet-glib.h header.
+ *
+ * Since: 17.0.0
+ */
+#ifndef GPARQUET_VERSION_MIN_REQUIRED
+# define GPARQUET_VERSION_MIN_REQUIRED GARROW_VERSION_MIN_REQUIRED
+#endif
+
+/**
+ * GPARQUET_VERSION_MAX_ALLOWED:
+ *
+ * You can use this macro for compile time API version check.
+ *
+ * This macro value must be one of the predefined version macros such
+ * as %GPARQUET_VERSION_0_10.
+ *
+ * If you use any functions that is defined by newer version than
+ * %GPARQUET_VERSION_MAX_ALLOWED, deprecated warnings are produced at
+ * compile time.
+ *
+ * You must define this macro before including the
+ * parquet-glib/parquet-glib.h header.
+ *
+ * Since: 17.0.0
+ */
+#ifndef GPARQUET_VERSION_MAX_ALLOWED
+# define GPARQUET_VERSION_MAX_ALLOWED GARROW_VERSION_MAX_ALLOWED
+#endif
+
+@VISIBILITY_MACROS@
+
+@AVAILABILITY_MACROS@
diff --git a/c_glib/tool/generate-version-header.py b/c_glib/tool/generate-version-header.py
new file mode 100755
index 0000000000000..f2fc26132c143
--- /dev/null
+++ b/c_glib/tool/generate-version-header.py
@@ -0,0 +1,172 @@
+#!/usr/bin/env python3
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+import argparse
+from io import TextIOBase
+from pathlib import Path
+import re
+
+
+def main():
+ parser = argparse.ArgumentParser(
+ description="Generate C header with version macros")
+ parser.add_argument(
+ "--library",
+ required=True,
+ help="The library name to use in macro prefixes")
+ parser.add_argument(
+ "--version",
+ required=True,
+ help="The library version number")
+ parser.add_argument(
+ "--input",
+ type=Path,
+ required=True,
+ help="Path to the input template file")
+ parser.add_argument(
+ "--output",
+ type=Path,
+ required=True,
+ help="Path to the output file to generate")
+
+ args = parser.parse_args()
+
+ with open(args.input, "r", encoding="utf-8") as input_file, \
+ open(args.output, "w", encoding="utf-8") as output_file:
+ write_header(
+ input_file, output_file, args.library, args.version)
+
+
+def write_header(
+ input_file: TextIOBase,
+ output_file: TextIOBase,
+ library_name: str,
+ version: str):
+ if "-" in version:
+ version, version_tag = version.split("-")
+ else:
+ version_tag = ""
+ version_major, version_minor, version_micro = [int(v) for v in version.split(".")]
+
+ encoded_versions = generate_encoded_versions(library_name)
+ visibility_macros = generate_visibility_macros(library_name)
+ availability_macros = generate_availability_macros(library_name)
+
+ replacements = {
+ "VERSION_MAJOR": str(version_major),
+ "VERSION_MINOR": str(version_minor),
+ "VERSION_MICRO": str(version_micro),
+ "VERSION_TAG": version_tag,
+ "ENCODED_VERSIONS": encoded_versions,
+ "VISIBILITY_MACROS": visibility_macros,
+ "AVAILABILITY_MACROS": availability_macros,
+ }
+
+ output_file.write(re.sub(
+ r"@([A-Z_]+)@", lambda match: replacements[match[1]], input_file.read()))
+
+
+def generate_visibility_macros(library: str) -> str:
+ return f"""#if (defined(_WIN32) || defined(__CYGWIN__)) && defined(_MSVC_LANG) && \
+ !defined({library}_STATIC_COMPILATION)
+# define {library}_EXPORT __declspec(dllexport)
+# define {library}_IMPORT __declspec(dllimport)
+#else
+# define {library}_EXPORT
+# define {library}_IMPORT
+#endif
+
+#ifdef {library}_COMPILATION
+# define {library}_API {library}_EXPORT
+#else
+# define {library}_API {library}_IMPORT
+#endif
+
+#define {library}_EXTERN {library}_API extern"""
+
+
+def generate_encoded_versions(library: str) -> str:
+ macros = []
+
+ for major_version, minor_version in ALL_VERSIONS:
+ macros.append(f"""/**
+ * {library}_VERSION_{major_version}_{minor_version}:
+ *
+ * You can use this macro value for compile time API version check.
+ *
+ * Since: {major_version}.{minor_version}.0
+ */
+#define {library}_VERSION_{major_version}_{minor_version} G_ENCODE_VERSION({major_version}, {minor_version})""") # noqa: E501
+
+ return "\n\n".join(macros)
+
+
+def generate_availability_macros(library: str) -> str:
+ macros = [f"""#define {library}_AVAILABLE_IN_ALL {library}_EXTERN"""]
+
+ for major_version, minor_version in ALL_VERSIONS:
+ macros.append(f"""#if {library}_VERSION_MIN_REQUIRED >= {library}_VERSION_{major_version}_{minor_version}
+# define {library}_DEPRECATED_IN_{major_version}_{minor_version} {library}_DEPRECATED
+# define {library}_DEPRECATED_IN_{major_version}_{minor_version}_FOR(function) {library}_DEPRECATED_FOR(function)
+#else
+# define {library}_DEPRECATED_IN_{major_version}_{minor_version}
+# define {library}_DEPRECATED_IN_{major_version}_{minor_version}_FOR(function)
+#endif
+
+#if {library}_VERSION_MAX_ALLOWED < {library}_VERSION_{major_version}_{minor_version}
+# define {library}_AVAILABLE_IN_{major_version}_{minor_version} {library}_EXTERN {library}_UNAVAILABLE({major_version}, {minor_version})
+#else
+# define {library}_AVAILABLE_IN_{major_version}_{minor_version} {library}_EXTERN
+#endif""") # noqa: E501
+
+ return "\n\n".join(macros)
+
+
+ALL_VERSIONS = [
+ (17, 0),
+ (16, 0),
+ (15, 0),
+ (14, 0),
+ (13, 0),
+ (12, 0),
+ (11, 0),
+ (10, 0),
+ (9, 0),
+ (8, 0),
+ (7, 0),
+ (6, 0),
+ (5, 0),
+ (4, 0),
+ (3, 0),
+ (2, 0),
+ (1, 0),
+ (0, 17),
+ (0, 16),
+ (0, 15),
+ (0, 14),
+ (0, 13),
+ (0, 12),
+ (0, 11),
+ (0, 10),
+]
+
+
+if __name__ == '__main__':
+ main()
diff --git a/c_glib/vcpkg.json b/c_glib/vcpkg.json
new file mode 100644
index 0000000000000..4a14a1e437ff6
--- /dev/null
+++ b/c_glib/vcpkg.json
@@ -0,0 +1,8 @@
+{
+ "name": "arrow-glib",
+ "version-string": "17.0.0-SNAPSHOT",
+ "dependencies": [
+ "glib",
+ "pkgconf"
+ ]
+}
diff --git a/ci/appveyor-cpp-build.bat b/ci/appveyor-cpp-build.bat
index 8cfa67c437264..f688fbb63a9ad 100644
--- a/ci/appveyor-cpp-build.bat
+++ b/ci/appveyor-cpp-build.bat
@@ -129,7 +129,6 @@ set PYARROW_WITH_ORC=%ARROW_ORC%
set PYARROW_WITH_PARQUET=ON
set PYARROW_WITH_PARQUET_ENCRYPTION=ON
set PYARROW_WITH_S3=%ARROW_S3%
-set PYARROW_WITH_STATIC_BOOST=ON
set PYARROW_WITH_SUBSTRAIT=ON
set ARROW_HOME=%CONDA_PREFIX%\Library
diff --git a/ci/scripts/PKGBUILD b/ci/scripts/PKGBUILD
index b0905886dd50f..f6bbc78be710e 100644
--- a/ci/scripts/PKGBUILD
+++ b/ci/scripts/PKGBUILD
@@ -18,7 +18,7 @@
_realname=arrow
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
-pkgver=16.0.0.9000
+pkgver=16.1.0.9000
pkgrel=8000
pkgdesc="Apache Arrow is a cross-language development platform for in-memory data (mingw-w64)"
arch=("any")
diff --git a/ci/scripts/c_glib_build.sh b/ci/scripts/c_glib_build.sh
index 6a6295e4ff0bd..ee01bb220710e 100755
--- a/ci/scripts/c_glib_build.sh
+++ b/ci/scripts/c_glib_build.sh
@@ -28,14 +28,35 @@ build_root=${2}
: ${BUILD_DOCS_C_GLIB:=OFF}
with_doc=$([ "${BUILD_DOCS_C_GLIB}" == "ON" ] && echo "true" || echo "false")
-export PKG_CONFIG_PATH=${ARROW_HOME}/lib/pkgconfig
+
+if [ -n "${MSYSTEM:-}" ]; then
+ # Fix ARROW_HOME when running under MSYS2
+ export ARROW_HOME="$(cygpath --unix "${ARROW_HOME}")"
+fi
+
+meson_pkg_config_path="${ARROW_HOME}/lib/pkgconfig"
mkdir -p ${build_dir}
+if [ -n "${VCPKG_ROOT:-}" ]; then
+ vcpkg_install_root="${build_root}/vcpkg_installed"
+ $VCPKG_ROOT/vcpkg install --x-manifest-root=${source_dir} --x-install-root=${vcpkg_install_root}
+ export PKG_CONFIG="${vcpkg_install_root}/x64-windows/tools/pkgconf/pkgconf.exe"
+ meson_pkg_config_path="${vcpkg_install_root}/x64-windows/lib/pkgconfig:${meson_pkg_config_path}"
+fi
+
+if [ -n "${VCToolsInstallDir:-}" -a -n "${MSYSTEM:-}" ]; then
+ # Meson finds the gnu link.exe instead of MSVC link.exe when running in MSYS2/git bash,
+ # so we need to make sure the MSCV link.exe is first in $PATH
+ export PATH="$(cygpath --unix "${VCToolsInstallDir}")/bin/HostX64/x64:${PATH}"
+fi
+
# Build with Meson
meson setup \
+ --backend=ninja \
--prefix=$ARROW_HOME \
--libdir=lib \
+ --pkg-config-path="${meson_pkg_config_path}" \
-Ddoc=${with_doc} \
-Dvapi=${ARROW_GLIB_VAPI} \
-Dwerror=${ARROW_GLIB_WERROR} \
diff --git a/ci/scripts/cpp_build.sh b/ci/scripts/cpp_build.sh
index a1f40fc360e2f..6a3a53f2533cd 100755
--- a/ci/scripts/cpp_build.sh
+++ b/ci/scripts/cpp_build.sh
@@ -120,6 +120,7 @@ else
-DARROW_BUILD_BENCHMARKS=${ARROW_BUILD_BENCHMARKS:-OFF} \
-DARROW_BUILD_EXAMPLES=${ARROW_BUILD_EXAMPLES:-OFF} \
-DARROW_BUILD_INTEGRATION=${ARROW_BUILD_INTEGRATION:-OFF} \
+ -DARROW_BUILD_OPENMP_BENCHMARKS=${ARROW_BUILD_OPENMP_BENCHMARKS:-OFF} \
-DARROW_BUILD_SHARED=${ARROW_BUILD_SHARED:-ON} \
-DARROW_BUILD_STATIC=${ARROW_BUILD_STATIC:-ON} \
-DARROW_BUILD_TESTS=${ARROW_BUILD_TESTS:-OFF} \
diff --git a/ci/scripts/install_vcpkg.sh b/ci/scripts/install_vcpkg.sh
index cc80582326ec5..08989d6444827 100755
--- a/ci/scripts/install_vcpkg.sh
+++ b/ci/scripts/install_vcpkg.sh
@@ -25,13 +25,16 @@ if [ "$#" -lt 1 ]; then
fi
arrow_dir=$(cd -- "$(dirname -- "$0")/../.." && pwd -P)
-default_vcpkg_version=$(cat "${arrow_dir}/.env" | grep "VCPKG" | cut -d "=" -f2 | tr -d '"')
default_vcpkg_ports_patch="${arrow_dir}/ci/vcpkg/ports.patch"
vcpkg_destination=$1
-vcpkg_version=${2:-$default_vcpkg_version}
+vcpkg_version=${2:-}
vcpkg_ports_patch=${3:-$default_vcpkg_ports_patch}
+if [ -z "${vcpkg_version}" ]; then
+ vcpkg_version=$(source "${arrow_dir}/.env" && echo "$VCPKG")
+fi
+
# reduce the fetched data using a shallow clone
git clone --shallow-since=2021-04-01 https://github.com/microsoft/vcpkg ${vcpkg_destination}
diff --git a/ci/scripts/java_jni_manylinux_build.sh b/ci/scripts/java_jni_manylinux_build.sh
index 4921ce170b7a9..6f3769751af42 100755
--- a/ci/scripts/java_jni_manylinux_build.sh
+++ b/ci/scripts/java_jni_manylinux_build.sh
@@ -35,6 +35,9 @@ echo "=== Clear output directories and leftovers ==="
rm -rf ${build_dir}
echo "=== Building Arrow C++ libraries ==="
+devtoolset_version=$(rpm -qa "devtoolset-*-gcc" --queryformat %{VERSION} | \
+ grep -o "^[0-9]*")
+devtoolset_include_cpp="/opt/rh/devtoolset-${devtoolset_version}/root/usr/include/c++/${devtoolset_version}"
: ${ARROW_ACERO:=ON}
export ARROW_ACERO
: ${ARROW_BUILD_TESTS:=ON}
@@ -55,7 +58,7 @@ export ARROW_ORC
: ${VCPKG_ROOT:=/opt/vcpkg}
: ${VCPKG_FEATURE_FLAGS:=-manifests}
: ${VCPKG_TARGET_TRIPLET:=${VCPKG_DEFAULT_TRIPLET:-x64-linux-static-${CMAKE_BUILD_TYPE}}}
-: ${GANDIVA_CXX_FLAGS:=-isystem;${devtoolset_include_cpp};-isystem;${devtoolset_include_cpp}/x86_64-redhat-linux;-isystem;-lpthread}
+: ${GANDIVA_CXX_FLAGS:=-isystem;${devtoolset_include_cpp};-isystem;${devtoolset_include_cpp}/x86_64-redhat-linux;-lpthread}
if [ "${ARROW_USE_CCACHE}" == "ON" ]; then
echo "=== ccache statistics before build ==="
diff --git a/cpp/build-support/update-thrift.sh b/cpp/build-support/update-thrift.sh
index 9b8f2539cffe3..9e050a5e49d64 100755
--- a/cpp/build-support/update-thrift.sh
+++ b/cpp/build-support/update-thrift.sh
@@ -20,4 +20,4 @@
# Run this from cpp/ directory. thrift is expected to be in your path
-thrift --gen cpp:moveable_types -out src/generated src/parquet/parquet.thrift
+thrift --gen cpp:moveable_types,templates -out src/generated src/parquet/parquet.thrift
diff --git a/cpp/cmake_modules/FindProtobufAlt.cmake b/cpp/cmake_modules/FindProtobufAlt.cmake
index f343b42f2b762..703e05c4731b6 100644
--- a/cpp/cmake_modules/FindProtobufAlt.cmake
+++ b/cpp/cmake_modules/FindProtobufAlt.cmake
@@ -31,6 +31,11 @@ endif()
find_package(protobuf CONFIG ${find_package_args})
set(ProtobufAlt_FOUND ${protobuf_FOUND})
if(ProtobufAlt_FOUND)
+ if(Protobuf_PROTOC_EXECUTABLE)
+ # work around https://github.com/protocolbuffers/protobuf/issues/14576
+ set_target_properties(protobuf::protoc PROPERTIES IMPORTED_LOCATION_RELEASE
+ "${Protobuf_PROTOC_EXECUTABLE}")
+ endif()
set(ProtobufAlt_VERSION ${protobuf_VERSION})
set(ProtobufAlt_VERSION_MAJOR ${protobuf_VERSION_MAJOR})
set(ProtobufAlt_VERSION_MINOR ${protobuf_VERSION_MINOR})
diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index c24442dcb8749..f102c7bb81683 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -5348,9 +5348,3 @@ if(ARROW_WITH_UCX)
endif()
message(STATUS "All bundled static libraries: ${ARROW_BUNDLED_STATIC_LIBS}")
-
-# Write out the package configurations.
-
-configure_file("src/arrow/util/config.h.cmake" "src/arrow/util/config.h" ESCAPE_QUOTES)
-install(FILES "${ARROW_BINARY_DIR}/src/arrow/util/config.h"
- DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/arrow/util")
diff --git a/cpp/src/arrow/CMakeLists.txt b/cpp/src/arrow/CMakeLists.txt
index 5d61112518f5e..150a304975cad 100644
--- a/cpp/src/arrow/CMakeLists.txt
+++ b/cpp/src/arrow/CMakeLists.txt
@@ -351,6 +351,12 @@ macro(append_runtime_avx512_src SRCS SRC)
endif()
endmacro()
+# Write out compile-time configuration constants
+configure_file("util/config.h.cmake" "util/config.h" ESCAPE_QUOTES)
+configure_file("util/config_internal.h.cmake" "util/config_internal.h" ESCAPE_QUOTES)
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/util/config.h"
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/arrow/util")
+
set(ARROW_SRCS
builder.cc
buffer.cc
@@ -637,6 +643,7 @@ endif()
set(ARROW_TESTING_SRCS
io/test_common.cc
ipc/test_common.cc
+ testing/fixed_width_test_util.cc
testing/gtest_util.cc
testing/random.cc
testing/generator.cc
@@ -716,7 +723,8 @@ set(ARROW_COMPUTE_SRCS
compute/row/compare_internal.cc
compute/row/grouper.cc
compute/row/row_internal.cc
- compute/util.cc)
+ compute/util.cc
+ compute/util_internal.cc)
append_runtime_avx2_src(ARROW_COMPUTE_SRCS compute/key_hash_internal_avx2.cc)
append_runtime_avx2_bmi2_src(ARROW_COMPUTE_SRCS compute/key_map_internal_avx2.cc)
diff --git a/cpp/src/arrow/acero/asof_join_node.cc b/cpp/src/arrow/acero/asof_join_node.cc
index 48cc83dd3d6a9..1d94467df9ee2 100644
--- a/cpp/src/arrow/acero/asof_join_node.cc
+++ b/cpp/src/arrow/acero/asof_join_node.cc
@@ -548,8 +548,10 @@ class InputState {
// true when the queue is empty and, when memo may have future entries (the case of a
// positive tolerance), when the memo is empty.
// used when checking whether RHS is up to date with LHS.
- bool CurrentEmpty() const {
- return memo_.no_future_ ? Empty() : memo_.times_.empty() && Empty();
+ // NOTE: The emptiness must be decided by a single call to Empty() in caller, due to the
+ // potential race with Push(), see GH-41614.
+ bool CurrentEmpty(bool empty) const {
+ return memo_.no_future_ ? empty : (memo_.times_.empty() && empty);
}
// in case memo may not have future entries (the case of a non-positive tolerance),
@@ -650,13 +652,15 @@ class InputState {
// timestamp, update latest_time and latest_ref_row to the value that immediately pass
// the horizon. Update the memo-store with any entries or future entries so observed.
// Returns true if updates were made, false if not.
- Result AdvanceAndMemoize(OnType ts) {
+ // NOTE: The emptiness must be decided by a single call to Empty() in caller, due to the
+ // potential race with Push(), see GH-41614.
+ Result AdvanceAndMemoize(OnType ts, bool empty) {
// Advance the right side row index until we reach the latest right row (for each key)
// for the given left timestamp.
DEBUG_SYNC(node_, "Advancing input ", index_, DEBUG_MANIP(std::endl));
// Check if already updated for TS (or if there is no latest)
- if (Empty()) { // can't advance if empty and no future entries
+ if (empty) { // can't advance if empty and no future entries
return memo_.no_future_ ? false : memo_.RemoveEntriesWithLesserTime(ts);
}
@@ -918,34 +922,46 @@ class CompositeTableBuilder {
// guaranteeing this probability is below 1 in a billion. The fix is 128-bit hashing.
// See ARROW-17653
class AsofJoinNode : public ExecNode {
- // Advances the RHS as far as possible to be up to date for the current LHS timestamp
- Result UpdateRhs() {
+ // A simple wrapper for the result of a single call to UpdateRhs(), identifying:
+ // 1) If any RHS has advanced.
+ // 2) If all RHS are up to date with LHS.
+ struct RhsUpdateState {
+ bool any_advanced;
+ bool all_up_to_date_with_lhs;
+ };
+ // Advances the RHS as far as possible to be up to date for the current LHS timestamp,
+ // and checks if all RHS are up to date with LHS. The reason they have to be performed
+ // together is that they both depend on the emptiness of the RHS, which can be changed
+ // by Push() executing in another thread.
+ Result UpdateRhs() {
auto& lhs = *state_.at(0);
auto lhs_latest_time = lhs.GetLatestTime();
- bool any_updated = false;
- for (size_t i = 1; i < state_.size(); ++i) {
- ARROW_ASSIGN_OR_RAISE(bool advanced, state_[i]->AdvanceAndMemoize(lhs_latest_time));
- any_updated |= advanced;
- }
- return any_updated;
- }
-
- // Returns false if RHS not up to date for LHS
- bool IsUpToDateWithLhsRow() const {
- auto& lhs = *state_[0];
- if (lhs.Empty()) return false; // can't proceed if nothing on the LHS
- OnType lhs_ts = lhs.GetLatestTime();
+ RhsUpdateState update_state{/*any_advanced=*/false, /*all_up_to_date_with_lhs=*/true};
for (size_t i = 1; i < state_.size(); ++i) {
auto& rhs = *state_[i];
- if (!rhs.Finished()) {
+
+ // Obtain RHS emptiness once for subsequent AdvanceAndMemoize() and CurrentEmpty().
+ bool rhs_empty = rhs.Empty();
+ // Obtain RHS current time here because AdvanceAndMemoize() can change the
+ // emptiness.
+ OnType rhs_current_time = rhs_empty ? OnType{} : rhs.GetLatestTime();
+
+ ARROW_ASSIGN_OR_RAISE(bool advanced,
+ rhs.AdvanceAndMemoize(lhs_latest_time, rhs_empty));
+ update_state.any_advanced |= advanced;
+
+ if (update_state.all_up_to_date_with_lhs && !rhs.Finished()) {
// If RHS is finished, then we know it's up to date
- if (rhs.CurrentEmpty())
- return false; // RHS isn't finished, but is empty --> not up to date
- if (lhs_ts > rhs.GetCurrentTime())
- return false; // RHS isn't up to date (and not finished)
+ if (rhs.CurrentEmpty(rhs_empty)) {
+ // RHS isn't finished, but is empty --> not up to date
+ update_state.all_up_to_date_with_lhs = false;
+ } else if (lhs_latest_time > rhs_current_time) {
+ // RHS isn't up to date (and not finished)
+ update_state.all_up_to_date_with_lhs = false;
+ }
}
}
- return true;
+ return update_state;
}
Result> ProcessInner() {
@@ -963,20 +979,19 @@ class AsofJoinNode : public ExecNode {
// If LHS is finished or empty then there's nothing we can do here
if (lhs.Finished() || lhs.Empty()) break;
- // Advance each of the RHS as far as possible to be up to date for the LHS timestamp
- ARROW_ASSIGN_OR_RAISE(bool any_rhs_advanced, UpdateRhs());
+ ARROW_ASSIGN_OR_RAISE(auto rhs_update_state, UpdateRhs());
// If we have received enough inputs to produce the next output batch
// (decided by IsUpToDateWithLhsRow), we will perform the join and
// materialize the output batch. The join is done by advancing through
// the LHS and adding joined row to rows_ (done by Emplace). Finally,
// input batches that are no longer needed are removed to free up memory.
- if (IsUpToDateWithLhsRow()) {
+ if (rhs_update_state.all_up_to_date_with_lhs) {
dst.Emplace(state_, tolerance_);
ARROW_ASSIGN_OR_RAISE(bool advanced, lhs.Advance());
if (!advanced) break; // if we can't advance LHS, we're done for this batch
} else {
- if (!any_rhs_advanced) break; // need to wait for new data
+ if (!rhs_update_state.any_advanced) break; // need to wait for new data
}
}
diff --git a/cpp/src/arrow/acero/asof_join_node_test.cc b/cpp/src/arrow/acero/asof_join_node_test.cc
index d95d2aaad3643..051e280a4c53c 100644
--- a/cpp/src/arrow/acero/asof_join_node_test.cc
+++ b/cpp/src/arrow/acero/asof_join_node_test.cc
@@ -1678,5 +1678,59 @@ TEST(AsofJoinTest, BackpressureWithBatchesGen) {
/*slow_r0=*/false);
}
+// Reproduction of GH-40675: A logical race between Process() and Push() that can be more
+// easily observed with single small batch.
+TEST(AsofJoinTest, RhsEmptinessRace) {
+ auto left_batch = ExecBatchFromJSON(
+ {int64(), utf8()}, R"([[1, "a"], [1, "b"], [5, "a"], [6, "b"], [7, "f"]])");
+ auto right_batch = ExecBatchFromJSON(
+ {int64(), utf8(), float64()}, R"([[2, "a", 1.0], [9, "b", 3.0], [15, "g", 5.0]])");
+
+ Declaration left{
+ "exec_batch_source",
+ ExecBatchSourceNodeOptions(schema({field("colA", int64()), field("col2", utf8())}),
+ {std::move(left_batch)})};
+ Declaration right{
+ "exec_batch_source",
+ ExecBatchSourceNodeOptions(schema({field("colB", int64()), field("col3", utf8()),
+ field("colC", float64())}),
+ {std::move(right_batch)})};
+ AsofJoinNodeOptions asof_join_opts({{{"colA"}, {{"col2"}}}, {{"colB"}, {{"col3"}}}}, 1);
+ Declaration asof_join{
+ "asofjoin", {std::move(left), std::move(right)}, std::move(asof_join_opts)};
+
+ ASSERT_OK_AND_ASSIGN(auto result, DeclarationToExecBatches(std::move(asof_join)));
+
+ auto exp_batch = ExecBatchFromJSON(
+ {int64(), utf8(), float64()},
+ R"([[1, "a", 1.0], [1, "b", null], [5, "a", null], [6, "b", null], [7, "f", null]])");
+ AssertExecBatchesEqualIgnoringOrder(result.schema, {exp_batch}, result.batches);
+}
+
+// Reproduction of GH-41149: Another case of the same root cause as GH-40675, but with
+// empty "by" columns.
+TEST(AsofJoinTest, RhsEmptinessRaceEmptyBy) {
+ auto left_batch = ExecBatchFromJSON({int64()}, R"([[1], [2], [3]])");
+ auto right_batch =
+ ExecBatchFromJSON({utf8(), int64()}, R"([["Z", 2], ["B", 3], ["A", 4]])");
+
+ Declaration left{"exec_batch_source",
+ ExecBatchSourceNodeOptions(schema({field("on", int64())}),
+ {std::move(left_batch)})};
+ Declaration right{
+ "exec_batch_source",
+ ExecBatchSourceNodeOptions(schema({field("colVals", utf8()), field("on", int64())}),
+ {std::move(right_batch)})};
+ AsofJoinNodeOptions asof_join_opts({{{"on"}, {}}, {{"on"}, {}}}, 1);
+ Declaration asof_join{
+ "asofjoin", {std::move(left), std::move(right)}, std::move(asof_join_opts)};
+
+ ASSERT_OK_AND_ASSIGN(auto result, DeclarationToExecBatches(std::move(asof_join)));
+
+ auto exp_batch =
+ ExecBatchFromJSON({int64(), utf8()}, R"([[1, "Z"], [2, "Z"], [3, "B"]])");
+ AssertExecBatchesEqualIgnoringOrder(result.schema, {exp_batch}, result.batches);
+}
+
} // namespace acero
} // namespace arrow
diff --git a/cpp/src/arrow/acero/exec_plan.cc b/cpp/src/arrow/acero/exec_plan.cc
index 97119726d4b17..d9fb1942fccd8 100644
--- a/cpp/src/arrow/acero/exec_plan.cc
+++ b/cpp/src/arrow/acero/exec_plan.cc
@@ -128,7 +128,7 @@ struct ExecPlanImpl : public ExecPlan {
Future<> scheduler_finished = arrow::util::AsyncTaskScheduler::Make(
[this](arrow::util::AsyncTaskScheduler* async_scheduler) {
QueryContext* ctx = query_context();
- RETURN_NOT_OK(ctx->Init(ctx->max_concurrency(), async_scheduler));
+ RETURN_NOT_OK(ctx->Init(async_scheduler));
#ifdef ARROW_WITH_OPENTELEMETRY
if (HasMetadata()) {
diff --git a/cpp/src/arrow/acero/hash_aggregate_test.cc b/cpp/src/arrow/acero/hash_aggregate_test.cc
index 2626fd50379dd..d529f443319b9 100644
--- a/cpp/src/arrow/acero/hash_aggregate_test.cc
+++ b/cpp/src/arrow/acero/hash_aggregate_test.cc
@@ -592,6 +592,12 @@ void TestSegments(std::unique_ptr& segmenter, const ExecSpan& batc
ASSERT_EQ(expected_segment, segment);
offset = segment.offset + segment.length;
}
+ // Assert next is the last (empty) segment.
+ ASSERT_OK_AND_ASSIGN(auto segment, segmenter->GetNextSegment(batch, offset));
+ ASSERT_GE(segment.offset, batch.length);
+ ASSERT_EQ(segment.length, 0);
+ ASSERT_TRUE(segment.is_open);
+ ASSERT_TRUE(segment.extends);
}
Result> MakeGrouper(const std::vector& key_types) {
@@ -682,48 +688,142 @@ TEST(RowSegmenter, Basics) {
}
TEST(RowSegmenter, NonOrdered) {
- std::vector types = {int32()};
- auto batch = ExecBatchFromJSON(types, "[[1], [1], [2], [1], [2]]");
- ASSERT_OK_AND_ASSIGN(auto segmenter, MakeRowSegmenter(types));
- TestSegments(segmenter, ExecSpan(batch),
- {{0, 2, false, true},
- {2, 1, false, false},
- {3, 1, false, false},
- {4, 1, true, false},
- {5, 0, true, true}});
+ {
+ std::vector types = {int32()};
+ auto batch = ExecBatchFromJSON(types, "[[1], [1], [2], [1], [2]]");
+ ASSERT_OK_AND_ASSIGN(auto segmenter, MakeRowSegmenter(types));
+ TestSegments(segmenter, ExecSpan(batch),
+ {{0, 2, false, true},
+ {2, 1, false, false},
+ {3, 1, false, false},
+ {4, 1, true, false},
+ {5, 0, true, true}});
+ }
+ {
+ std::vector types = {int32(), int32()};
+ auto batch = ExecBatchFromJSON(types, "[[1, 1], [1, 1], [2, 2], [1, 2], [2, 2]]");
+ ASSERT_OK_AND_ASSIGN(auto segmenter, MakeRowSegmenter(types));
+ TestSegments(segmenter, ExecSpan(batch),
+ {{0, 2, false, true},
+ {2, 1, false, false},
+ {3, 1, false, false},
+ {4, 1, true, false},
+ {5, 0, true, true}});
+ }
}
TEST(RowSegmenter, EmptyBatches) {
- std::vector types = {int32()};
- std::vector batches = {
- ExecBatchFromJSON(types, "[]"), ExecBatchFromJSON(types, "[]"),
- ExecBatchFromJSON(types, "[[1]]"), ExecBatchFromJSON(types, "[]"),
- ExecBatchFromJSON(types, "[[1]]"), ExecBatchFromJSON(types, "[]"),
- ExecBatchFromJSON(types, "[[2], [2]]"), ExecBatchFromJSON(types, "[]"),
- };
- ASSERT_OK_AND_ASSIGN(auto segmenter, MakeRowSegmenter(types));
- TestSegments(segmenter, ExecSpan(batches[0]), {});
- TestSegments(segmenter, ExecSpan(batches[1]), {});
- TestSegments(segmenter, ExecSpan(batches[2]), {{0, 1, true, true}});
- TestSegments(segmenter, ExecSpan(batches[3]), {});
- TestSegments(segmenter, ExecSpan(batches[4]), {{0, 1, true, true}});
- TestSegments(segmenter, ExecSpan(batches[5]), {});
- TestSegments(segmenter, ExecSpan(batches[6]), {{0, 2, true, false}});
- TestSegments(segmenter, ExecSpan(batches[7]), {});
+ {
+ std::vector types = {int32()};
+ std::vector batches = {
+ ExecBatchFromJSON(types, "[]"), ExecBatchFromJSON(types, "[]"),
+ ExecBatchFromJSON(types, "[[1]]"), ExecBatchFromJSON(types, "[]"),
+ ExecBatchFromJSON(types, "[[1]]"), ExecBatchFromJSON(types, "[]"),
+ ExecBatchFromJSON(types, "[[2], [2]]"), ExecBatchFromJSON(types, "[]"),
+ };
+ ASSERT_OK_AND_ASSIGN(auto segmenter, MakeRowSegmenter(types));
+ TestSegments(segmenter, ExecSpan(batches[0]), {});
+ TestSegments(segmenter, ExecSpan(batches[1]), {});
+ TestSegments(segmenter, ExecSpan(batches[2]), {{0, 1, true, true}});
+ TestSegments(segmenter, ExecSpan(batches[3]), {});
+ TestSegments(segmenter, ExecSpan(batches[4]), {{0, 1, true, true}});
+ TestSegments(segmenter, ExecSpan(batches[5]), {});
+ TestSegments(segmenter, ExecSpan(batches[6]), {{0, 2, true, false}});
+ TestSegments(segmenter, ExecSpan(batches[7]), {});
+ }
+ {
+ std::vector types = {int32(), int32()};
+ std::vector batches = {
+ ExecBatchFromJSON(types, "[]"),
+ ExecBatchFromJSON(types, "[]"),
+ ExecBatchFromJSON(types, "[[1, 1]]"),
+ ExecBatchFromJSON(types, "[]"),
+ ExecBatchFromJSON(types, "[[1, 1]]"),
+ ExecBatchFromJSON(types, "[]"),
+ ExecBatchFromJSON(types, "[[2, 2], [2, 2]]"),
+ ExecBatchFromJSON(types, "[]"),
+ };
+ ASSERT_OK_AND_ASSIGN(auto segmenter, MakeRowSegmenter(types));
+ TestSegments(segmenter, ExecSpan(batches[0]), {});
+ TestSegments(segmenter, ExecSpan(batches[1]), {});
+ TestSegments(segmenter, ExecSpan(batches[2]), {{0, 1, true, true}});
+ TestSegments(segmenter, ExecSpan(batches[3]), {});
+ TestSegments(segmenter, ExecSpan(batches[4]), {{0, 1, true, true}});
+ TestSegments(segmenter, ExecSpan(batches[5]), {});
+ TestSegments(segmenter, ExecSpan(batches[6]), {{0, 2, true, false}});
+ TestSegments(segmenter, ExecSpan(batches[7]), {});
+ }
}
TEST(RowSegmenter, MultipleSegments) {
- std::vector types = {int32()};
- auto batch = ExecBatchFromJSON(types, "[[1], [1], [2], [5], [3], [3], [5], [5], [4]]");
- ASSERT_OK_AND_ASSIGN(auto segmenter, MakeRowSegmenter(types));
- TestSegments(segmenter, ExecSpan(batch),
- {{0, 2, false, true},
- {2, 1, false, false},
- {3, 1, false, false},
- {4, 2, false, false},
- {6, 2, false, false},
- {8, 1, true, false},
- {9, 0, true, true}});
+ {
+ std::vector types = {int32()};
+ auto batch =
+ ExecBatchFromJSON(types, "[[1], [1], [2], [5], [3], [3], [5], [5], [4]]");
+ ASSERT_OK_AND_ASSIGN(auto segmenter, MakeRowSegmenter(types));
+ TestSegments(segmenter, ExecSpan(batch),
+ {{0, 2, false, true},
+ {2, 1, false, false},
+ {3, 1, false, false},
+ {4, 2, false, false},
+ {6, 2, false, false},
+ {8, 1, true, false},
+ {9, 0, true, true}});
+ }
+ {
+ std::vector types = {int32(), int32()};
+ auto batch = ExecBatchFromJSON(
+ types,
+ "[[1, 1], [1, 1], [2, 2], [5, 5], [3, 3], [3, 3], [5, 5], [5, 5], [4, 4]]");
+ ASSERT_OK_AND_ASSIGN(auto segmenter, MakeRowSegmenter(types));
+ TestSegments(segmenter, ExecSpan(batch),
+ {{0, 2, false, true},
+ {2, 1, false, false},
+ {3, 1, false, false},
+ {4, 2, false, false},
+ {6, 2, false, false},
+ {8, 1, true, false},
+ {9, 0, true, true}});
+ }
+}
+
+TEST(RowSegmenter, MultipleSegmentsMultipleBatches) {
+ {
+ std::vector types = {int32()};
+ std::vector batches = {
+ ExecBatchFromJSON(types, "[[1]]"), ExecBatchFromJSON(types, "[[1], [2]]"),
+ ExecBatchFromJSON(types, "[[5], [3]]"),
+ ExecBatchFromJSON(types, "[[3], [5], [5]]"), ExecBatchFromJSON(types, "[[4]]")};
+
+ ASSERT_OK_AND_ASSIGN(auto segmenter, MakeRowSegmenter(types));
+ TestSegments(segmenter, ExecSpan(batches[0]), {{0, 1, true, true}});
+ TestSegments(segmenter, ExecSpan(batches[1]),
+ {{0, 1, false, true}, {1, 1, true, false}});
+ TestSegments(segmenter, ExecSpan(batches[2]),
+ {{0, 1, false, false}, {1, 1, true, false}});
+ TestSegments(segmenter, ExecSpan(batches[3]),
+ {{0, 1, false, true}, {1, 2, true, false}});
+ TestSegments(segmenter, ExecSpan(batches[4]), {{0, 1, true, false}});
+ }
+ {
+ std::vector types = {int32(), int32()};
+ std::vector batches = {
+ ExecBatchFromJSON(types, "[[1, 1]]"),
+ ExecBatchFromJSON(types, "[[1, 1], [2, 2]]"),
+ ExecBatchFromJSON(types, "[[5, 5], [3, 3]]"),
+ ExecBatchFromJSON(types, "[[3, 3], [5, 5], [5, 5]]"),
+ ExecBatchFromJSON(types, "[[4, 4]]")};
+
+ ASSERT_OK_AND_ASSIGN(auto segmenter, MakeRowSegmenter(types));
+ TestSegments(segmenter, ExecSpan(batches[0]), {{0, 1, true, true}});
+ TestSegments(segmenter, ExecSpan(batches[1]),
+ {{0, 1, false, true}, {1, 1, true, false}});
+ TestSegments(segmenter, ExecSpan(batches[2]),
+ {{0, 1, false, false}, {1, 1, true, false}});
+ TestSegments(segmenter, ExecSpan(batches[3]),
+ {{0, 1, false, true}, {1, 2, true, false}});
+ TestSegments(segmenter, ExecSpan(batches[4]), {{0, 1, true, false}});
+ }
}
namespace {
diff --git a/cpp/src/arrow/acero/hash_join_benchmark.cc b/cpp/src/arrow/acero/hash_join_benchmark.cc
index ad1bd67cc8ec7..1f8e02e9f0fcf 100644
--- a/cpp/src/arrow/acero/hash_join_benchmark.cc
+++ b/cpp/src/arrow/acero/hash_join_benchmark.cc
@@ -148,7 +148,7 @@ class JoinBenchmark {
};
scheduler_ = TaskScheduler::Make();
- DCHECK_OK(ctx_.Init(settings.num_threads, nullptr));
+ DCHECK_OK(ctx_.Init(nullptr));
auto register_task_group_callback = [&](std::function task,
std::function cont) {
diff --git a/cpp/src/arrow/acero/hash_join_node.cc b/cpp/src/arrow/acero/hash_join_node.cc
index b49364300dac8..06405f16c8d4c 100644
--- a/cpp/src/arrow/acero/hash_join_node.cc
+++ b/cpp/src/arrow/acero/hash_join_node.cc
@@ -497,11 +497,11 @@ struct BloomFilterPushdownContext {
using BuildFinishedCallback = std::function;
using FiltersReceivedCallback = std::function;
using FilterFinishedCallback = std::function;
- void Init(HashJoinNode* owner, size_t num_threads,
- RegisterTaskGroupCallback register_task_group_callback,
- StartTaskGroupCallback start_task_group_callback,
- FiltersReceivedCallback on_bloom_filters_received, bool disable_bloom_filter,
- bool use_sync_execution);
+ Status Init(HashJoinNode* owner, size_t num_threads,
+ RegisterTaskGroupCallback register_task_group_callback,
+ StartTaskGroupCallback start_task_group_callback,
+ FiltersReceivedCallback on_bloom_filters_received,
+ bool disable_bloom_filter, bool use_sync_execution);
Status StartProducing(size_t thread_index);
@@ -559,8 +559,7 @@ struct BloomFilterPushdownContext {
std::vector hashes(batch.length);
std::vector bv(bit_vector_bytes);
- ARROW_ASSIGN_OR_RAISE(arrow::util::TempVectorStack * stack,
- ctx_->GetTempStack(thread_index));
+ arrow::util::TempVectorStack* stack = &tld_[thread_index].stack;
// Start with full selection for the current batch
memset(selected.data(), 0xff, bit_vector_bytes);
@@ -654,7 +653,17 @@ struct BloomFilterPushdownContext {
FiltersReceivedCallback all_received_callback_;
FilterFinishedCallback on_finished_;
} eval_;
+
+ static constexpr auto kTempStackUsage =
+ Hashing32::kHashBatchTempStackUsage +
+ (sizeof(uint32_t) + /*extra=*/1) * arrow::util::MiniBatch::kMiniBatchLength;
+
+ struct ThreadLocalData {
+ arrow::util::TempVectorStack stack;
+ };
+ std::vector tld_;
};
+
bool HashJoinSchema::HasDictionaries() const {
for (int side = 0; side <= 1; ++side) {
for (int icol = 0; icol < proj_maps[side].num_cols(HashJoinProjection::INPUT);
@@ -930,7 +939,7 @@ class HashJoinNode : public ExecNode, public TracedNode {
// we will change it back to just the CPU's thread pool capacity.
size_t num_threads = (GetCpuThreadPoolCapacity() + io::GetIOThreadPoolCapacity() + 1);
- pushdown_context_.Init(
+ RETURN_NOT_OK(pushdown_context_.Init(
this, num_threads,
[ctx](std::function fn,
std::function on_finished) {
@@ -940,7 +949,7 @@ class HashJoinNode : public ExecNode, public TracedNode {
return ctx->StartTaskGroup(task_group_id, num_tasks);
},
[this](size_t thread_index) { return OnFiltersReceived(thread_index); },
- disable_bloom_filter_, use_sync_execution);
+ disable_bloom_filter_, use_sync_execution));
RETURN_NOT_OK(impl_->Init(
ctx, join_type_, num_threads, &(schema_mgr_->proj_maps[0]),
@@ -1037,7 +1046,7 @@ class HashJoinNode : public ExecNode, public TracedNode {
BloomFilterPushdownContext pushdown_context_;
};
-void BloomFilterPushdownContext::Init(
+Status BloomFilterPushdownContext::Init(
HashJoinNode* owner, size_t num_threads,
RegisterTaskGroupCallback register_task_group_callback,
StartTaskGroupCallback start_task_group_callback,
@@ -1074,6 +1083,12 @@ void BloomFilterPushdownContext::Init(
return eval_.on_finished_(thread_index, std::move(eval_.batches_));
});
start_task_group_callback_ = std::move(start_task_group_callback);
+ tld_.resize(num_threads);
+ for (auto& local_data : tld_) {
+ RETURN_NOT_OK(local_data.stack.Init(ctx_->memory_pool(), kTempStackUsage));
+ }
+
+ return Status::OK();
}
Status BloomFilterPushdownContext::StartProducing(size_t thread_index) {
@@ -1124,8 +1139,7 @@ Status BloomFilterPushdownContext::BuildBloomFilter_exec_task(size_t thread_inde
}
ARROW_ASSIGN_OR_RAISE(ExecBatch key_batch, ExecBatch::Make(std::move(key_columns)));
- ARROW_ASSIGN_OR_RAISE(arrow::util::TempVectorStack * stack,
- ctx_->GetTempStack(thread_index));
+ arrow::util::TempVectorStack* stack = &tld_[thread_index].stack;
arrow::util::TempVectorHolder hash_holder(
stack, arrow::util::MiniBatch::kMiniBatchLength);
uint32_t* hashes = hash_holder.mutable_data();
diff --git a/cpp/src/arrow/acero/hash_join_node_test.cc b/cpp/src/arrow/acero/hash_join_node_test.cc
index 9c3dbc176ff4f..215b1e4d21125 100644
--- a/cpp/src/arrow/acero/hash_join_node_test.cc
+++ b/cpp/src/arrow/acero/hash_join_node_test.cc
@@ -28,6 +28,7 @@
#include "arrow/api.h"
#include "arrow/compute/kernels/row_encoder_internal.h"
#include "arrow/compute/kernels/test_util.h"
+#include "arrow/compute/light_array_internal.h"
#include "arrow/testing/extension_type.h"
#include "arrow/testing/gtest_util.h"
#include "arrow/testing/matchers.h"
@@ -41,6 +42,7 @@ namespace arrow {
using compute::call;
using compute::default_exec_context;
+using compute::ExecBatchBuilder;
using compute::ExecSpan;
using compute::field_ref;
using compute::SortIndices;
@@ -3201,5 +3203,55 @@ TEST(HashJoin, ChainedIntegerHashJoins) {
}
}
+// Test that a large number of joins don't overflow the temp vector stack, like GH-39582
+// and GH-39951.
+TEST(HashJoin, ManyJoins) {
+ // The idea of this case is to create many nested join nodes that may possibly cause
+ // recursive usage of temp vector stack. To make sure that the recursion happens:
+ // 1. A left-deep join tree is created so that the left-most (the final probe side)
+ // table will go through all the hash tables from the right side.
+ // 2. Left-outer join is used so that every join will increase the cardinality.
+ // 3. The left-most table contains rows of unique integers from 0 to N.
+ // 4. Each right table at level i contains two rows of integer i, so that the probing of
+ // each level will increase the result by one row.
+ // 5. The left-most table is a single batch of enough rows, so that at each level, the
+ // probing will accumulate enough result rows to have to output to the subsequent level
+ // before finishing the current batch (releasing the buffer allocated on the temp vector
+ // stack), which is essentially the recursive usage of the temp vector stack.
+
+ // A fair number of joins to guarantee temp vector stack overflow before GH-41335.
+ const int num_joins = 64;
+
+ // `ExecBatchBuilder::num_rows_max()` is the number of rows for swiss join to accumulate
+ // before outputting.
+ const int num_left_rows = ExecBatchBuilder::num_rows_max();
+ ASSERT_OK_AND_ASSIGN(
+ auto left_batches,
+ MakeIntegerBatches({[](int row_id) -> int64_t { return row_id; }},
+ schema({field("l_key", int32())}),
+ /*num_batches=*/1, /*batch_size=*/num_left_rows));
+ Declaration root{"exec_batch_source",
+ ExecBatchSourceNodeOptions(std::move(left_batches.schema),
+ std::move(left_batches.batches))};
+
+ HashJoinNodeOptions join_opts(JoinType::LEFT_OUTER, /*left_keys=*/{"l_key"},
+ /*right_keys=*/{"r_key"});
+
+ for (int i = 0; i < num_joins; ++i) {
+ ASSERT_OK_AND_ASSIGN(auto right_batches,
+ MakeIntegerBatches({[i](int) -> int64_t { return i; }},
+ schema({field("r_key", int32())}),
+ /*num_batches=*/1, /*batch_size=*/2));
+ Declaration table{"exec_batch_source",
+ ExecBatchSourceNodeOptions(std::move(right_batches.schema),
+ std::move(right_batches.batches))};
+
+ Declaration new_root{"hashjoin", {std::move(root), std::move(table)}, join_opts};
+ root = std::move(new_root);
+ }
+
+ ASSERT_OK_AND_ASSIGN(std::ignore, DeclarationToTable(std::move(root)));
+}
+
} // namespace acero
} // namespace arrow
diff --git a/cpp/src/arrow/acero/query_context.cc b/cpp/src/arrow/acero/query_context.cc
index a27397d12079d..18beb19ab7f8b 100644
--- a/cpp/src/arrow/acero/query_context.cc
+++ b/cpp/src/arrow/acero/query_context.cc
@@ -40,8 +40,7 @@ QueryContext::QueryContext(QueryOptions opts, ExecContext exec_context)
const CpuInfo* QueryContext::cpu_info() const { return CpuInfo::GetInstance(); }
int64_t QueryContext::hardware_flags() const { return cpu_info()->hardware_flags(); }
-Status QueryContext::Init(size_t max_num_threads, util::AsyncTaskScheduler* scheduler) {
- tld_.resize(max_num_threads);
+Status QueryContext::Init(util::AsyncTaskScheduler* scheduler) {
async_scheduler_ = scheduler;
return Status::OK();
}
@@ -50,15 +49,6 @@ size_t QueryContext::GetThreadIndex() { return thread_indexer_(); }
size_t QueryContext::max_concurrency() const { return thread_indexer_.Capacity(); }
-Result QueryContext::GetTempStack(size_t thread_index) {
- if (!tld_[thread_index].is_init) {
- RETURN_NOT_OK(tld_[thread_index].stack.Init(
- memory_pool(), 32 * util::MiniBatch::kMiniBatchLength * sizeof(uint64_t)));
- tld_[thread_index].is_init = true;
- }
- return &tld_[thread_index].stack;
-}
-
Result> QueryContext::BeginExternalTask(std::string_view name) {
Future<> completion_future = Future<>::Make();
if (async_scheduler_->AddSimpleTask([completion_future] { return completion_future; },
diff --git a/cpp/src/arrow/acero/query_context.h b/cpp/src/arrow/acero/query_context.h
index 9ea11679cba05..3eff299439828 100644
--- a/cpp/src/arrow/acero/query_context.h
+++ b/cpp/src/arrow/acero/query_context.h
@@ -38,7 +38,7 @@ class ARROW_ACERO_EXPORT QueryContext {
QueryContext(QueryOptions opts = {},
ExecContext exec_context = *default_exec_context());
- Status Init(size_t max_num_threads, arrow::util::AsyncTaskScheduler* scheduler);
+ Status Init(arrow::util::AsyncTaskScheduler* scheduler);
const ::arrow::internal::CpuInfo* cpu_info() const;
int64_t hardware_flags() const;
@@ -52,7 +52,6 @@ class ARROW_ACERO_EXPORT QueryContext {
size_t GetThreadIndex();
size_t max_concurrency() const;
- Result GetTempStack(size_t thread_index);
/// \brief Start an external task
///
@@ -145,11 +144,6 @@ class ARROW_ACERO_EXPORT QueryContext {
std::unique_ptr task_scheduler_ = TaskScheduler::Make();
ThreadIndexer thread_indexer_;
- struct ThreadLocalData {
- bool is_init = false;
- arrow::util::TempVectorStack stack;
- };
- std::vector tld_;
std::atomic in_flight_bytes_to_disk_{0};
};
diff --git a/cpp/src/arrow/acero/sink_node.cc b/cpp/src/arrow/acero/sink_node.cc
index 4ab6b4537de02..66f447aa87f11 100644
--- a/cpp/src/arrow/acero/sink_node.cc
+++ b/cpp/src/arrow/acero/sink_node.cc
@@ -423,6 +423,7 @@ class ConsumingSinkNode : public ExecNode,
std::atomic backpressure_counter_ = 0;
std::unique_ptr sequencer_;
};
+
static Result MakeTableConsumingSinkNode(ExecPlan* plan,
std::vector inputs,
const ExecNodeOptions& options) {
diff --git a/cpp/src/arrow/acero/swiss_join.cc b/cpp/src/arrow/acero/swiss_join.cc
index 542e943c4a82b..17c5212697339 100644
--- a/cpp/src/arrow/acero/swiss_join.cc
+++ b/cpp/src/arrow/acero/swiss_join.cc
@@ -2470,6 +2470,8 @@ Status JoinProbeProcessor::OnFinished() {
class SwissJoin : public HashJoinImpl {
public:
+ static constexpr auto kTempStackUsage = 64 * arrow::util::MiniBatch::kMiniBatchLength;
+
Status Init(QueryContext* ctx, JoinType join_type, size_t num_threads,
const HashJoinProjectionMaps* proj_map_left,
const HashJoinProjectionMaps* proj_map_right,
@@ -2513,6 +2515,7 @@ class SwissJoin : public HashJoinImpl {
local_states_.resize(num_threads_);
for (int i = 0; i < num_threads_; ++i) {
+ RETURN_NOT_OK(local_states_[i].stack.Init(pool_, kTempStackUsage));
local_states_[i].hash_table_ready = false;
local_states_[i].num_output_batches = 0;
local_states_[i].materialize.Init(pool_, proj_map_left, proj_map_right);
@@ -2566,8 +2569,7 @@ class SwissJoin : public HashJoinImpl {
ExecBatch keypayload_batch;
ARROW_ASSIGN_OR_RAISE(keypayload_batch, KeyPayloadFromInput(/*side=*/0, &batch));
- ARROW_ASSIGN_OR_RAISE(arrow::util::TempVectorStack * temp_stack,
- ctx_->GetTempStack(thread_index));
+ arrow::util::TempVectorStack* temp_stack = &local_states_[thread_index].stack;
return CancelIfNotOK(
probe_processor_.OnNextBatch(thread_index, keypayload_batch, temp_stack,
@@ -2679,8 +2681,7 @@ class SwissJoin : public HashJoinImpl {
input_batch.values[schema->num_cols(HashJoinProjection::KEY) + icol];
}
}
- ARROW_ASSIGN_OR_RAISE(arrow::util::TempVectorStack * temp_stack,
- ctx_->GetTempStack(thread_id));
+ arrow::util::TempVectorStack* temp_stack = &local_states_[thread_id].stack;
RETURN_NOT_OK(CancelIfNotOK(hash_table_build_.PushNextBatch(
static_cast(thread_id), key_batch, no_payload ? nullptr : &payload_batch,
temp_stack)));
@@ -2715,8 +2716,7 @@ class SwissJoin : public HashJoinImpl {
Status MergeFinished(size_t thread_id) {
RETURN_NOT_OK(status());
- ARROW_ASSIGN_OR_RAISE(arrow::util::TempVectorStack * temp_stack,
- ctx_->GetTempStack(thread_id));
+ arrow::util::TempVectorStack* temp_stack = &local_states_[thread_id].stack;
hash_table_build_.FinishPrtnMerge(temp_stack);
return CancelIfNotOK(OnBuildHashTableFinished(static_cast(thread_id)));
}
@@ -2771,8 +2771,7 @@ class SwissJoin : public HashJoinImpl {
std::min((task_id + 1) * kNumRowsPerScanTask, hash_table_.num_rows());
// Get thread index and related temp vector stack
//
- ARROW_ASSIGN_OR_RAISE(arrow::util::TempVectorStack * temp_stack,
- ctx_->GetTempStack(thread_id));
+ arrow::util::TempVectorStack* temp_stack = &local_states_[thread_id].stack;
// Split into mini-batches
//
@@ -2949,6 +2948,7 @@ class SwissJoin : public HashJoinImpl {
FinishedCallback finished_callback_;
struct ThreadLocalState {
+ arrow::util::TempVectorStack stack;
JoinResultMaterialize materialize;
std::vector temp_column_arrays;
int64_t num_output_batches;
diff --git a/cpp/src/arrow/array/array_base.h b/cpp/src/arrow/array/array_base.h
index 6411aebf80442..716ae0722069e 100644
--- a/cpp/src/arrow/array/array_base.h
+++ b/cpp/src/arrow/array/array_base.h
@@ -224,6 +224,14 @@ class ARROW_EXPORT Array {
/// \return Status
Status ValidateFull() const;
+ /// \brief Return the device_type that this array's data is allocated on
+ ///
+ /// This just delegates to calling device_type on the underlying ArrayData
+ /// object which backs this Array.
+ ///
+ /// \return DeviceAllocationType
+ DeviceAllocationType device_type() const { return data_->device_type(); }
+
protected:
Array() = default;
ARROW_DEFAULT_MOVE_AND_ASSIGN(Array);
diff --git a/cpp/src/arrow/array/array_test.cc b/cpp/src/arrow/array/array_test.cc
index 7e25ad61fa2ea..32806d9d2edb3 100644
--- a/cpp/src/arrow/array/array_test.cc
+++ b/cpp/src/arrow/array/array_test.cc
@@ -478,6 +478,7 @@ TEST_F(TestArray, TestMakeArrayOfNull) {
ASSERT_EQ(array->type(), type);
ASSERT_OK(array->ValidateFull());
ASSERT_EQ(array->length(), length);
+ ASSERT_EQ(array->device_type(), DeviceAllocationType::kCPU);
if (is_union(type->id())) {
ASSERT_EQ(array->null_count(), 0);
ASSERT_EQ(array->ComputeLogicalNullCount(), length);
@@ -719,6 +720,7 @@ TEST_F(TestArray, TestMakeArrayFromScalar) {
ASSERT_OK(array->ValidateFull());
ASSERT_EQ(array->length(), length);
ASSERT_EQ(array->null_count(), 0);
+ ASSERT_EQ(array->device_type(), DeviceAllocationType::kCPU);
// test case for ARROW-13321
for (int64_t i : {int64_t{0}, length / 2, length - 1}) {
@@ -744,6 +746,7 @@ TEST_F(TestArray, TestMakeArrayFromScalarSliced) {
auto sliced = array->Slice(1, 4);
ASSERT_EQ(sliced->length(), 4);
ASSERT_EQ(sliced->null_count(), 0);
+ ASSERT_EQ(array->device_type(), DeviceAllocationType::kCPU);
ARROW_EXPECT_OK(sliced->ValidateFull());
}
}
@@ -758,6 +761,7 @@ TEST_F(TestArray, TestMakeArrayFromDictionaryScalar) {
ASSERT_OK(array->ValidateFull());
ASSERT_EQ(array->length(), 4);
ASSERT_EQ(array->null_count(), 0);
+ ASSERT_EQ(array->device_type(), DeviceAllocationType::kCPU);
for (int i = 0; i < 4; i++) {
ASSERT_OK_AND_ASSIGN(auto item, array->GetScalar(i));
@@ -797,6 +801,7 @@ TEST_F(TestArray, TestMakeEmptyArray) {
ASSERT_OK_AND_ASSIGN(auto array, MakeEmptyArray(type));
ASSERT_OK(array->ValidateFull());
ASSERT_EQ(array->length(), 0);
+
CheckSpanRoundTrip(*array);
}
}
diff --git a/cpp/src/arrow/array/data.cc b/cpp/src/arrow/array/data.cc
index ac828a9c35c67..76a43521394c1 100644
--- a/cpp/src/arrow/array/data.cc
+++ b/cpp/src/arrow/array/data.cc
@@ -224,6 +224,42 @@ int64_t ArrayData::ComputeLogicalNullCount() const {
return ArraySpan(*this).ComputeLogicalNullCount();
}
+DeviceAllocationType ArrayData::device_type() const {
+ // we're using 0 as a sentinel value for NOT YET ASSIGNED
+ // there is explicitly no constant DeviceAllocationType to represent
+ // the "UNASSIGNED" case as it is invalid for data to not have an
+ // assigned device type. If it's still 0 at the end, then we return
+ // CPU as the allocation device type
+ int type = 0;
+ for (const auto& buf : buffers) {
+ if (!buf) continue;
+ if (type == 0) {
+ type = static_cast(buf->device_type());
+ } else {
+ DCHECK_EQ(type, static_cast(buf->device_type()));
+ }
+ }
+
+ for (const auto& child : child_data) {
+ if (!child) continue;
+ if (type == 0) {
+ type = static_cast(child->device_type());
+ } else {
+ DCHECK_EQ(type, static_cast(child->device_type()));
+ }
+ }
+
+ if (dictionary) {
+ if (type == 0) {
+ type = static_cast(dictionary->device_type());
+ } else {
+ DCHECK_EQ(type, static_cast(dictionary->device_type()));
+ }
+ }
+
+ return type == 0 ? DeviceAllocationType::kCPU : static_cast(type);
+}
+
// ----------------------------------------------------------------------
// Methods for ArraySpan
diff --git a/cpp/src/arrow/array/data.h b/cpp/src/arrow/array/data.h
index beec29789ad1e..0c49f36229a40 100644
--- a/cpp/src/arrow/array/data.h
+++ b/cpp/src/arrow/array/data.h
@@ -101,6 +101,11 @@ struct ARROW_EXPORT ArrayData {
int64_t null_count = kUnknownNullCount, int64_t offset = 0)
: ArrayData(std::move(type), length, null_count, offset) {
this->buffers = std::move(buffers);
+#ifndef NDEBUG
+ // in debug mode, call the `device_type` function to trigger
+ // the DCHECKs that validate all the buffers are on the same device
+ ARROW_UNUSED(this->device_type());
+#endif
}
ArrayData(std::shared_ptr type, int64_t length,
@@ -110,6 +115,12 @@ struct ARROW_EXPORT ArrayData {
: ArrayData(std::move(type), length, null_count, offset) {
this->buffers = std::move(buffers);
this->child_data = std::move(child_data);
+#ifndef NDEBUG
+ // in debug mode, call the `device_type` function to trigger
+ // the DCHECKs that validate all the buffers (including children)
+ // are on the same device
+ ARROW_UNUSED(this->device_type());
+#endif
}
static std::shared_ptr Make(std::shared_ptr type, int64_t length,
@@ -358,6 +369,16 @@ struct ARROW_EXPORT ArrayData {
/// \see GetNullCount
int64_t ComputeLogicalNullCount() const;
+ /// \brief Returns the device_type of the underlying buffers and children
+ ///
+ /// If there are no buffers in this ArrayData object, it just returns
+ /// DeviceAllocationType::kCPU as a default. We also assume that all buffers
+ /// should be allocated on the same device type and perform DCHECKs to confirm
+ /// this in debug mode.
+ ///
+ /// \return DeviceAllocationType
+ DeviceAllocationType device_type() const;
+
std::shared_ptr type;
int64_t length = 0;
mutable std::atomic null_count{0};
diff --git a/cpp/src/arrow/array/util.cc b/cpp/src/arrow/array/util.cc
index bdba92c9a11fb..41cd6a1c0b260 100644
--- a/cpp/src/arrow/array/util.cc
+++ b/cpp/src/arrow/array/util.cc
@@ -548,7 +548,7 @@ class NullArrayFactory {
}
Status Visit(const StructType& type) {
- for (int i = 0; i < type_->num_fields(); ++i) {
+ for (int i = 0; i < type.num_fields(); ++i) {
ARROW_ASSIGN_OR_RAISE(out_->child_data[i], CreateChild(type, i, length_));
}
return Status::OK();
diff --git a/cpp/src/arrow/c/bridge.cc b/cpp/src/arrow/c/bridge.cc
index 8a530b3798d41..afb664c3bc258 100644
--- a/cpp/src/arrow/c/bridge.cc
+++ b/cpp/src/arrow/c/bridge.cc
@@ -1059,8 +1059,14 @@ struct SchemaImporter {
ARROW_ASSIGN_OR_RAISE(
type_, registered_ext_type->Deserialize(std::move(type_),
metadata_.extension_serialized));
- RETURN_NOT_OK(metadata_.metadata->DeleteMany(
- {metadata_.extension_name_index, metadata_.extension_serialized_index}));
+ // If metadata is present, delete both metadata keys (otherwise, just remove
+ // the extension name key)
+ if (metadata_.extension_serialized_index >= 0) {
+ RETURN_NOT_OK(metadata_.metadata->DeleteMany(
+ {metadata_.extension_name_index, metadata_.extension_serialized_index}));
+ } else {
+ RETURN_NOT_OK(metadata_.metadata->Delete(metadata_.extension_name_index));
+ }
}
}
@@ -1448,6 +1454,7 @@ namespace {
// The ArrowArray is released on destruction.
struct ImportedArrayData {
struct ArrowArray array_;
+ DeviceAllocationType device_type_;
std::shared_ptr device_sync_;
ImportedArrayData() {
@@ -1514,6 +1521,7 @@ struct ArrayImporter {
recursion_level_ = 0;
import_ = std::make_shared();
c_struct_ = &import_->array_;
+ import_->device_type_ = device_type_;
ArrowArrayMove(src, c_struct_);
return DoImport();
}
@@ -1541,7 +1549,8 @@ struct ArrayImporter {
"cannot be imported as RecordBatch");
}
return RecordBatch::Make(std::move(schema), data_->length,
- std::move(data_->child_data));
+ std::move(data_->child_data), import_->device_type_,
+ import_->device_sync_);
}
Status ImportChild(const ArrayImporter* parent, struct ArrowArray* src) {
@@ -1868,24 +1877,17 @@ struct ArrayImporter {
template
Status ImportStringValuesBuffer(int32_t offsets_buffer_id, int32_t buffer_id,
int64_t byte_width = 1) {
- if (device_type_ == DeviceAllocationType::kCPU) {
- auto offsets = data_->GetValues(offsets_buffer_id);
+ int64_t buffer_size = 0;
+ if (c_struct_->length > 0) {
+ int64_t last_offset_value_offset =
+ (c_struct_->length + c_struct_->offset) * sizeof(OffsetType);
+ OffsetType last_offset_value;
+ RETURN_NOT_OK(MemoryManager::CopyBufferSliceToCPU(
+ data_->buffers[offsets_buffer_id], last_offset_value_offset, sizeof(OffsetType),
+ reinterpret_cast(&last_offset_value)));
// Compute visible size of buffer
- int64_t buffer_size =
- (c_struct_->length > 0) ? byte_width * offsets[c_struct_->length] : 0;
- return ImportBuffer(buffer_id, buffer_size);
- }
-
- // we only need the value of the last offset so let's just copy that
- // one value from device to host.
- auto single_value_buf =
- SliceBuffer(data_->buffers[offsets_buffer_id],
- c_struct_->length * sizeof(OffsetType), sizeof(OffsetType));
- ARROW_ASSIGN_OR_RAISE(
- auto cpubuf, Buffer::ViewOrCopy(single_value_buf, default_cpu_memory_manager()));
- auto offsets = cpubuf->data_as();
- // Compute visible size of buffer
- int64_t buffer_size = (c_struct_->length > 0) ? byte_width * offsets[0] : 0;
+ buffer_size = byte_width * last_offset_value;
+ }
return ImportBuffer(buffer_id, buffer_size);
}
@@ -2041,6 +2043,23 @@ Status ExportStreamNext(const std::shared_ptr& src, int64_t i
}
}
+// the int64_t i input here is unused, but exists simply to allow utilizing the
+// overload of this with the version for ChunkedArrays. If we removed the int64_t
+// from the signature despite it being unused, we wouldn't be able to leverage the
+// overloading in the templated exporters.
+Status ExportStreamNext(const std::shared_ptr& src, int64_t i,
+ struct ArrowDeviceArray* out_array) {
+ std::shared_ptr batch;
+ RETURN_NOT_OK(src->ReadNext(&batch));
+ if (batch == nullptr) {
+ // End of stream
+ ArrowArrayMarkReleased(&out_array->array);
+ return Status::OK();
+ } else {
+ return ExportDeviceRecordBatch(*batch, batch->GetSyncEvent(), out_array);
+ }
+}
+
Status ExportStreamNext(const std::shared_ptr& src, int64_t i,
struct ArrowArray* out_array) {
if (i >= src->num_chunks()) {
@@ -2052,8 +2071,27 @@ Status ExportStreamNext(const std::shared_ptr& src, int64_t i,
}
}
-template
+Status ExportStreamNext(const std::shared_ptr& src, int64_t i,
+ struct ArrowDeviceArray* out_array) {
+ if (i >= src->num_chunks()) {
+ // End of stream
+ ArrowArrayMarkReleased(&out_array->array);
+ return Status::OK();
+ } else {
+ return ExportDeviceArray(*src->chunk(static_cast(i)), nullptr, out_array);
+ }
+}
+
+template
class ExportedArrayStream {
+ using StreamTraits =
+ std::conditional_t;
+ using StreamType = typename StreamTraits::CType;
+ using ArrayTraits = std::conditional_t;
+ using ArrayType = typename ArrayTraits::CType;
+
public:
struct PrivateData {
explicit PrivateData(std::shared_ptr reader)
@@ -2067,13 +2105,13 @@ class ExportedArrayStream {
ARROW_DISALLOW_COPY_AND_ASSIGN(PrivateData);
};
- explicit ExportedArrayStream(struct ArrowArrayStream* stream) : stream_(stream) {}
+ explicit ExportedArrayStream(StreamType* stream) : stream_(stream) {}
Status GetSchema(struct ArrowSchema* out_schema) {
return ExportStreamSchema(reader(), out_schema);
}
- Status GetNext(struct ArrowArray* out_array) {
+ Status GetNext(ArrayType* out_array) {
return ExportStreamNext(reader(), next_batch_num(), out_array);
}
@@ -2083,38 +2121,35 @@ class ExportedArrayStream {
}
void Release() {
- if (ArrowArrayStreamIsReleased(stream_)) {
+ if (StreamTraits::IsReleasedFunc(stream_)) {
return;
}
+
DCHECK_NE(private_data(), nullptr);
delete private_data();
- ArrowArrayStreamMarkReleased(stream_);
+ StreamTraits::MarkReleased(stream_);
}
// C-compatible callbacks
- static int StaticGetSchema(struct ArrowArrayStream* stream,
- struct ArrowSchema* out_schema) {
+ static int StaticGetSchema(StreamType* stream, struct ArrowSchema* out_schema) {
ExportedArrayStream self{stream};
return self.ToCError(self.GetSchema(out_schema));
}
- static int StaticGetNext(struct ArrowArrayStream* stream,
- struct ArrowArray* out_array) {
+ static int StaticGetNext(StreamType* stream, ArrayType* out_array) {
ExportedArrayStream self{stream};
return self.ToCError(self.GetNext(out_array));
}
- static void StaticRelease(struct ArrowArrayStream* stream) {
- ExportedArrayStream{stream}.Release();
- }
+ static void StaticRelease(StreamType* stream) { ExportedArrayStream{stream}.Release(); }
- static const char* StaticGetLastError(struct ArrowArrayStream* stream) {
+ static const char* StaticGetLastError(StreamType* stream) {
return ExportedArrayStream{stream}.GetLastError();
}
- static Status Make(std::shared_ptr reader, struct ArrowArrayStream* out) {
+ static Status Make(std::shared_ptr reader, StreamType* out) {
out->get_schema = ExportedArrayStream::StaticGetSchema;
out->get_next = ExportedArrayStream::StaticGetNext;
out->get_last_error = ExportedArrayStream::StaticGetLastError;
@@ -2150,19 +2185,36 @@ class ExportedArrayStream {
int64_t next_batch_num() { return private_data()->batch_num_++; }
- struct ArrowArrayStream* stream_;
+ StreamType* stream_;
};
} // namespace
Status ExportRecordBatchReader(std::shared_ptr reader,
struct ArrowArrayStream* out) {
- return ExportedArrayStream::Make(std::move(reader), out);
+ memset(out, 0, sizeof(struct ArrowArrayStream));
+ return ExportedArrayStream::Make(std::move(reader), out);
}
Status ExportChunkedArray(std::shared_ptr chunked_array,
struct ArrowArrayStream* out) {
- return ExportedArrayStream::Make(std::move(chunked_array), out);
+ memset(out, 0, sizeof(struct ArrowArrayStream));
+ return ExportedArrayStream::Make(std::move(chunked_array), out);
+}
+
+Status ExportDeviceRecordBatchReader(std::shared_ptr reader,
+ struct ArrowDeviceArrayStream* out) {
+ memset(out, 0, sizeof(struct ArrowDeviceArrayStream));
+ out->device_type = static_cast(reader->device_type());
+ return ExportedArrayStream::Make(std::move(reader), out);
+}
+
+Status ExportDeviceChunkedArray(std::shared_ptr chunked_array,
+ DeviceAllocationType device_type,
+ struct ArrowDeviceArrayStream* out) {
+ memset(out, 0, sizeof(struct ArrowDeviceArrayStream));
+ out->device_type = static_cast(device_type);
+ return ExportedArrayStream::Make(std::move(chunked_array), out);
}
//////////////////////////////////////////////////////////////////////////
@@ -2170,33 +2222,65 @@ Status ExportChunkedArray(std::shared_ptr chunked_array,
namespace {
+template
class ArrayStreamReader {
+ protected:
+ using StreamTraits =
+ std::conditional_t;
+ using StreamType = typename StreamTraits::CType;
+ using ArrayTraits = std::conditional_t;
+ using ArrayType = typename ArrayTraits::CType;
+
public:
- explicit ArrayStreamReader(struct ArrowArrayStream* stream) {
- ArrowArrayStreamMove(stream, &stream_);
- DCHECK(!ArrowArrayStreamIsReleased(&stream_));
+ explicit ArrayStreamReader(StreamType* stream,
+ const DeviceMemoryMapper mapper = DefaultDeviceMemoryMapper)
+ : mapper_{std::move(mapper)} {
+ StreamTraits::MoveFunc(stream, &stream_);
+ DCHECK(!StreamTraits::IsReleasedFunc(&stream_));
}
~ArrayStreamReader() { ReleaseStream(); }
void ReleaseStream() {
- if (!ArrowArrayStreamIsReleased(&stream_)) {
- ArrowArrayStreamRelease(&stream_);
- }
- DCHECK(ArrowArrayStreamIsReleased(&stream_));
+ // all our trait release funcs check IsReleased so we don't
+ // need to repeat it here
+ StreamTraits::ReleaseFunc(&stream_);
+ DCHECK(StreamTraits::IsReleasedFunc(&stream_));
}
protected:
- Status ReadNextArrayInternal(struct ArrowArray* array) {
- ArrowArrayMarkReleased(array);
+ Status ReadNextArrayInternal(ArrayType* array) {
+ ArrayTraits::MarkReleased(array);
Status status = StatusFromCError(stream_.get_next(&stream_, array));
- if (!status.ok() && !ArrowArrayIsReleased(array)) {
- ArrowArrayRelease(array);
+ if (!status.ok()) {
+ ArrayTraits::ReleaseFunc(array);
}
return status;
}
+ Result> ImportRecordBatchInternal(
+ struct ArrowArray* array, std::shared_ptr schema) {
+ return ImportRecordBatch(array, schema);
+ }
+
+ Result> ImportRecordBatchInternal(
+ struct ArrowDeviceArray* array, std::shared_ptr schema) {
+ return ImportDeviceRecordBatch(array, schema, mapper_);
+ }
+
+ Result> ImportArrayInternal(
+ struct ArrowArray* array, std::shared_ptr