-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(glib): Add Apache Arrow GLib integration library
Fixes #1280. We can use `GArrowRecordBatch`/`GArrowSchema`/`GArrowRecordBatchReader` instead of C data API with this library.
- Loading branch information
Showing
34 changed files
with
983 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
usr/lib/*/girepository-1.0/ADBCArrow-*.typelib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
usr/include/adbc-arrow-glib/ | ||
usr/lib/*/libadbc-arrow-glib.so | ||
usr/lib/*/pkgconfig/adbc-arrow-glib.pc | ||
usr/share/adbc-arrow-glib/example/ | ||
usr/share/gir-1.0/ADBCArrow-*.gir | ||
usr/share/vala/vapi/adbc-arrow-glib.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
usr/share/doc/adbc-arrow-glib/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
usr/lib/*/libadbc-arrow-glib.so.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,7 @@ License: Apache-2.0 | |
URL: https://arrow.apache.org/adbc/ | ||
Source0: https://www.apache.org/dyn/closer.lua?action=download&path=/arrow/arrow-adbc-%{version}/apache-arrow-adbc-%{version}.tar.gz | ||
|
||
BuildRequires: arrow-glib-devel | ||
BuildRequires: cmake | ||
BuildRequires: gcc-c++ | ||
BuildRequires: gobject-introspection-devel | ||
|
@@ -260,7 +261,7 @@ This package contains the libraries for ADBC GLib. | |
%defattr(-,root,root,-) | ||
%doc README.md | ||
%license LICENSE.txt NOTICE.txt | ||
%{_libdir}/girepository-1.0/ | ||
%{_libdir}/girepository-1.0/ADBC-*.typelib | ||
%{_libdir}/libadbc-glib.so.* | ||
|
||
%package glib-devel | ||
|
@@ -278,8 +279,8 @@ Libraries and header files for ADBC GLib. | |
%defattr(-,root,root,-) | ||
%doc README.md | ||
%license LICENSE.txt NOTICE.txt | ||
%{_datadir}/gir-1.0/ | ||
%{_datadir}/vala/vapi/ | ||
%{_datadir}/gir-1.0/ADBC-*.gir | ||
%{_datadir}/vala/vapi/adbc-glib.* | ||
%{_includedir}/adbc-glib/ | ||
%{_libdir}/libadbc-glib.a | ||
%{_libdir}/libadbc-glib.so | ||
|
@@ -299,6 +300,56 @@ Documentation for ADBC GLib. | |
%{_datadir}/adbc-glib/example/ | ||
%{_docdir}/adbc-glib/ | ||
|
||
%package arrow-glib%{major_version}-libs | ||
Summary: Runtime libraries for Apache Arrow GLib integration | ||
License: Apache-2.0 | ||
Requires: %{name}-glib%{major_version}-libs = %{version}-%{release} | ||
|
||
%description arrow-glib%{major_version}-libs | ||
This package contains the libraries for Apache Arrow GLib integration. | ||
|
||
%files arrow-glib%{major_version}-libs | ||
%defattr(-,root,root,-) | ||
%doc README.md | ||
%license LICENSE.txt NOTICE.txt | ||
%{_libdir}/girepository-1.0/ADBCArrow-*.typelib | ||
%{_libdir}/libadbc-arrow-glib.so.* | ||
|
||
%package arrow-glib-devel | ||
Summary: Libraries and header files for Apache Arrow GLib integration | ||
License: Apache-2.0 | ||
Requires: %{name}-arrow-glib%{major_version}-libs = %{version}-%{release} | ||
Requires: %{name}-glib-devel = %{version}-%{release} | ||
Requires: arrow-glib-devel | ||
|
||
%description arrow-glib-devel | ||
Libraries and header files for Apache Arrow GLib integration | ||
|
||
%files arrow-glib-devel | ||
%defattr(-,root,root,-) | ||
%doc README.md | ||
%license LICENSE.txt NOTICE.txt | ||
%{_datadir}/gir-1.0/ADBCArrow-*.gir | ||
%{_datadir}/vala/vapi/adbc-arrow-glib.* | ||
%{_includedir}/adbc-arrow-glib/ | ||
%{_libdir}/libadbc-arrow-glib.a | ||
%{_libdir}/libadbc-arrow-glib.so | ||
%{_libdir}/pkgconfig/adbc-arrow-glib.pc | ||
|
||
%package arrow-glib-doc | ||
Summary: Documentation for Apache Arrow GLib integration | ||
License: Apache-2.0 | ||
|
||
%description arrow-glib-doc | ||
Documentation for Apache Arrow GLib integration. | ||
|
||
%files arrow-glib-doc | ||
%defattr(-,root,root,-) | ||
%doc README.md | ||
%license LICENSE.txt NOTICE.txt | ||
%{_datadir}/adbc-arrow-glib/example/ | ||
%{_docdir}/adbc-arrow-glib/ | ||
|
||
%changelog | ||
* Thu Apr 27 2023 Matt Topol <[email protected]> - 0.4.0-1 | ||
- Add snowflake driver | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* 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 <adbc-arrow-glib/version.h> | ||
|
||
#include <adbc-arrow-glib/statement.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
# -*- indent-tabs-mode: nil -*- | ||
# | ||
# 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. | ||
|
||
sources = files( | ||
'statement.c', | ||
) | ||
|
||
definition_headers = files( | ||
'statement.h', | ||
) | ||
|
||
headers = definition_headers | ||
headers += files( | ||
'adbc-arrow-glib.h', | ||
) | ||
|
||
version_h_conf = configuration_data() | ||
version_h_conf.set('GADBC_ARROW_VERSION', meson.project_version()) | ||
version_h_conf.set('GADBC_ARROW_VERSION_MAJOR', version_major) | ||
version_h_conf.set('GADBC_ARROW_VERSION_MINOR', version_minor) | ||
version_h_conf.set('GADBC_ARROW_VERSION_MICRO', version_micro) | ||
version_h = configure_file(input: 'version.h.in', | ||
output: 'version.h', | ||
configuration: version_h_conf) | ||
headers += version_h | ||
|
||
enums = gnome.mkenums_simple('enum-types', | ||
identifier_prefix: 'GADBCArrow', | ||
sources: definition_headers, | ||
symbol_prefix: 'gadbc_arrow') | ||
enums_header = enums[1] | ||
|
||
install_headers(headers, subdir: 'adbc-arrow-glib') | ||
|
||
|
||
dependencies = [ | ||
adbc_glib, | ||
arrow_glib, | ||
] | ||
libadbc_arrow_glib = library('adbc-arrow-glib', | ||
c_args: '-DG_LOG_DOMAIN="ADBC-Arrow"', | ||
sources: sources + enums, | ||
install: true, | ||
dependencies: dependencies, | ||
include_directories: base_include_directories, | ||
soversion: so_version, | ||
version: library_version) | ||
adbc_arrow_glib = \ | ||
declare_dependency(link_with: libadbc_arrow_glib, | ||
include_directories: base_include_directories, | ||
dependencies: dependencies, | ||
sources: enums_header) | ||
|
||
pkgconfig.generate(libadbc_arrow_glib, | ||
description: 'Arrow GLib integration API for ADBC GLib', | ||
filebase: 'adbc-arrow-glib', | ||
name: 'ADBC Arrow GLib', | ||
requires: ['adbc-glib', 'arrow-glib'], | ||
variables: pkgconfig_variables, | ||
version: meson.project_version()) | ||
|
||
adbc_arrow_glib_gir = \ | ||
gnome.generate_gir(libadbc_arrow_glib, | ||
dependencies: [ | ||
declare_dependency(sources: adbc_glib_gir), | ||
arrow_glib, | ||
], | ||
export_packages: 'adbc-arrow-glib', | ||
extra_args: [ | ||
'--warn-all', | ||
], | ||
fatal_warnings: gi_fatal_warnings, | ||
header: 'adbc-arrow-glib/adbc-arrow-glib.h', | ||
identifier_prefix: 'GADBCArrow', | ||
includes: [ | ||
'ADBC-1.0', | ||
'Arrow-1.0', | ||
], | ||
install: true, | ||
namespace: 'ADBCArrow', | ||
nsversion: api_version, | ||
sources: sources + definition_headers + enums, | ||
symbol_prefix: 'gadbc_arrow') | ||
if generate_vapi | ||
adbc_arrow_glib_vapi = \ | ||
gnome.generate_vapi('adbc-arrow-glib', | ||
gir_dirs: [ | ||
arrow_glib.get_variable('girdir'), | ||
], | ||
install: true, | ||
packages: [ | ||
adbc_glib_vapi, | ||
'arrow-glib', | ||
], | ||
sources: [adbc_arrow_glib_gir[0]], | ||
vapi_dirs: [ | ||
arrow_glib.get_variable('vapidir'), | ||
]) | ||
endif |
Oops, something went wrong.