esodan commented on issue #1280:
URL: https://github.com/apache/arrow-adbc/issues/1280#issuecomment-1818036936

   Checking out `glib/test/statement.rb`
   
   > I see. Then we don't need to create a new top-level directory. We can just 
create a new sub-directory under `glib/`:
   > 
   > ```diff
   > diff --git a/glib/example/meson.build b/glib/example/meson.build
   > index ed34fd02..41c9ab23 100644
   > --- a/glib/example/meson.build
   > +++ b/glib/example/meson.build
   > @@ -18,7 +18,6 @@
   >  # under the License.
   >  
   >  if build_example
   > -  arrow_glib = dependency('arrow-glib')
   >    executable('sqlite', 'sqlite.c',
   >               dependencies: [adbc_glib, arrow_glib],
   >               link_language: 'c')
   > diff --git a/glib/meson.build b/glib/meson.build
   > index 0deee035..a7b716c5 100644
   > --- a/glib/meson.build
   > +++ b/glib/meson.build
   > @@ -78,6 +78,13 @@ if generate_vapi
   >  endif
   >  
   >  subdir('adbc-glib')
   > +build_arrow_integration = get_option('arrow')
   > +if build_arrow_integration or build_example
   > +  arrow_glib = dependency('arrow-glib')
   > +endif
   > +if build_arrow_integration
   > +  subdir('adbc-arrow-glib')
   > +endif
   >  subdir('example')
   >  
   >  install_data('../LICENSE.txt',
   > diff --git a/glib/meson_options.txt b/glib/meson_options.txt
   > index 8603b783..39a318c5 100644
   > --- a/glib/meson_options.txt
   > +++ b/glib/meson_options.txt
   > @@ -22,6 +22,11 @@ option('adbc_build_dir',
   >         value: '',
   >         description: 'Use this option to build with not installed ADBC')
   >  
   > +option('arrow',
   > +       type: 'boolean',
   > +       value: false,
   > +       description: 'Enable Apache Arrow GLib integration')
   > +
   >  option('example',
   >         type: 'boolean',
   >         value: false,
   > ```
   > 
   > If we provide a Apache Arrow GLib integration library, we should use 
`GArrowRecordBatch *`, `GArrowSchema *` and `GArrowRecordBatchReader *` instead 
of `gpointer c_abi_array`, `gpointer c_abi_schema` and `gpointer 
c_abi_array_stream`. (We should call `garrow_record_batch_import()`, 
`garrow_schema_import()` and `garrow_record_batch_reader_import()` internally.)
   
   Great! Now which should be the name space of this new library?
   
   - [ ] GADBC - Keep the same namespace and just add new GObject 
Introspectable methods to existing objects
   - [ ] GADB - GLib Arrow Data Base
   - [ ] GADA - GLib Arrow Data Access
   - [ ] GADC - GLib Arrow Data Connectivity
   
   Just extend the API by adding new GObject Introspectable methods to the 
existing objects, means different libraries, with the same API and same 
namespace, but using GArrow and different name. Current is called 
`libadbc-glib`; new one will have same namespace but `libadbc-arrow-glib` as 
its name.
   
   We can use `#if` directives to create the new library using the same source 
code, so when creating `libadbc-arrow-glib`, we can remove the 
no-introspectable API from the symbols and just use the new introspectable API. 
This can remove the `adbc-arrow-glib` directory and produce a VAPI with the 
same namespace but different package's name `adbc-arrow-glib`.
   
   Above method, will allow to reuse the same code and create a new library, 
but just adding a MACRO definition.
   
   Is this good for you?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to