[Groonga-commit] groonga/groonga at e738599 [master] Add predicate that returns whether Apache Arrow support is enabled

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Jul 5 09:48:17 JST 2017


Kouhei Sutou	2017-07-05 09:48:17 +0900 (Wed, 05 Jul 2017)

  New Revision: e738599d52f77091d1a9dfb60eaf18490a8ce11d
  https://github.com/groonga/groonga/commit/e738599d52f77091d1a9dfb60eaf18490a8ce11d

  Message:
    Add predicate that returns whether Apache Arrow support is enabled
    
    GRN_INFO_SUPPORT_ARROW is added for grn_obj_get_info().

  Modified files:
    include/groonga/groonga.h
    lib/db.c

  Modified: include/groonga/groonga.h (+2 -1)
===================================================================
--- include/groonga/groonga.h    2017-07-04 14:49:34 +0900 (f3f473e)
+++ include/groonga/groonga.h    2017-07-05 09:48:17 +0900 (f51b132)
@@ -692,7 +692,8 @@ typedef enum {
 #define GRN_INFO_SUPPORT_LZO GRN_INFO_SUPPORT_LZ4
   GRN_INFO_NORMALIZER,
   GRN_INFO_TOKEN_FILTERS,
-  GRN_INFO_SUPPORT_ZSTD
+  GRN_INFO_SUPPORT_ZSTD,
+  GRN_INFO_SUPPORT_ARROW
 } grn_info_type;
 
 GRN_API grn_obj *grn_obj_get_info(grn_ctx *ctx, grn_obj *obj, grn_info_type type, grn_obj *valuebuf);

  Modified: lib/db.c (+12 -0)
===================================================================
--- lib/db.c    2017-07-04 14:49:34 +0900 (52b70bf)
+++ lib/db.c    2017-07-05 09:48:17 +0900 (5d89c2a)
@@ -8101,6 +8101,18 @@ grn_obj_get_info(grn_ctx *ctx, grn_obj *obj, grn_info_type type, grn_obj *valueb
     GRN_BOOL_PUT(ctx, valuebuf, GRN_FALSE);
 #endif /* GRN_WITH_ZSTD */
     break;
+  case GRN_INFO_SUPPORT_ARROW :
+    if (!valuebuf && !(valuebuf = grn_obj_open(ctx, GRN_BULK, 0, GRN_DB_BOOL))) {
+      ERR(GRN_INVALID_ARGUMENT,
+          "failed to open value buffer for GRN_INFO_ARROW_SUPPORT");
+      goto exit;
+    }
+#ifdef GRN_WITH_ARROW
+    GRN_BOOL_PUT(ctx, valuebuf, GRN_TRUE);
+#else /* GRN_WITH_ARROW */
+    GRN_BOOL_PUT(ctx, valuebuf, GRN_FALSE);
+#endif /* GRN_WITH_ARROW */
+    break;
   default :
     if (!obj) {
       ERR(GRN_INVALID_ARGUMENT, "grn_obj_get_info failed");
-------------- next part --------------
HTML����������������������������...
Télécharger 



More information about the Groonga-commit mailing list
Back to archive index