]> git.proxmox.com Git - ceph.git/blob - ceph/src/arrow/c_glib/parquet-glib/arrow-file-writer.h
import quincy 17.2.0
[ceph.git] / ceph / src / arrow / c_glib / parquet-glib / arrow-file-writer.h
1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20 #pragma once
21
22 #include <arrow-glib/arrow-glib.h>
23
24 G_BEGIN_DECLS
25
26 #define GPARQUET_TYPE_WRITER_PROPERTIES \
27 (gparquet_writer_properties_get_type())
28 G_DECLARE_DERIVABLE_TYPE(GParquetWriterProperties,
29 gparquet_writer_properties,
30 GPARQUET,
31 WRITER_PROPERTIES,
32 GObject)
33 struct _GParquetWriterPropertiesClass
34 {
35 GObjectClass parent_class;
36 };
37
38 GARROW_AVAILABLE_IN_0_17
39 GParquetWriterProperties *gparquet_writer_properties_new(void);
40 GARROW_AVAILABLE_IN_0_17
41 void
42 gparquet_writer_properties_set_compression(GParquetWriterProperties *properties,
43 GArrowCompressionType compression_type,
44 const gchar *path);
45 GARROW_AVAILABLE_IN_0_17
46 GArrowCompressionType
47 gparquet_writer_properties_get_compression_path(GParquetWriterProperties *properties,
48 const gchar *path);
49 GARROW_AVAILABLE_IN_0_17
50 void
51 gparquet_writer_properties_enable_dictionary(GParquetWriterProperties *properties,
52 const gchar *path);
53 GARROW_AVAILABLE_IN_0_17
54 void
55 gparquet_writer_properties_disable_dictionary(GParquetWriterProperties *properties,
56 const gchar *path);
57 GARROW_AVAILABLE_IN_0_17
58 gboolean
59 gparquet_writer_properties_is_dictionary_enabled(GParquetWriterProperties *properties,
60 const gchar *path);
61 GARROW_AVAILABLE_IN_0_17
62 void
63 gparquet_writer_properties_set_dictionary_page_size_limit(GParquetWriterProperties *properties,
64 gint64 limit);
65 GARROW_AVAILABLE_IN_0_17
66 gint64
67 gparquet_writer_properties_get_dictionary_page_size_limit(GParquetWriterProperties *properties);
68 GARROW_AVAILABLE_IN_0_17
69 void
70 gparquet_writer_properties_set_batch_size(GParquetWriterProperties *properties,
71 gint64 batch_size);
72 GARROW_AVAILABLE_IN_0_17
73 gint64
74 gparquet_writer_properties_get_batch_size(GParquetWriterProperties *properties);
75 GARROW_AVAILABLE_IN_0_17
76 void
77 gparquet_writer_properties_set_max_row_group_length(GParquetWriterProperties *properties,
78 gint64 length);
79 GARROW_AVAILABLE_IN_0_17
80 gint64
81 gparquet_writer_properties_get_max_row_group_length(GParquetWriterProperties *properties);
82 GARROW_AVAILABLE_IN_0_17
83 void
84 gparquet_writer_properties_set_data_page_size(GParquetWriterProperties *properties,
85 gint64 data_page_size);
86 GARROW_AVAILABLE_IN_0_17
87 gint64
88 gparquet_writer_properties_get_data_page_size(GParquetWriterProperties *properties);
89
90
91 #define GPARQUET_TYPE_ARROW_FILE_WRITER (gparquet_arrow_file_writer_get_type())
92 G_DECLARE_DERIVABLE_TYPE(GParquetArrowFileWriter,
93 gparquet_arrow_file_writer,
94 GPARQUET,
95 ARROW_FILE_WRITER,
96 GObject)
97 struct _GParquetArrowFileWriterClass
98 {
99 GObjectClass parent_class;
100 };
101
102 GParquetArrowFileWriter *
103 gparquet_arrow_file_writer_new_arrow(GArrowSchema *schema,
104 GArrowOutputStream *sink,
105 GParquetWriterProperties *writer_properties,
106 GError **error);
107 GParquetArrowFileWriter *
108 gparquet_arrow_file_writer_new_path(GArrowSchema *schema,
109 const gchar *path,
110 GParquetWriterProperties *writer_properties,
111 GError **error);
112
113 gboolean
114 gparquet_arrow_file_writer_write_table(GParquetArrowFileWriter *writer,
115 GArrowTable *table,
116 guint64 chunk_size,
117 GError **error);
118
119 gboolean
120 gparquet_arrow_file_writer_close(GParquetArrowFileWriter *writer,
121 GError **error);
122
123 G_END_DECLS