* garrow_sink_node_options_get_reader: * @options: A #GArrowSinkNodeOptions. * @schema: A #GArrowSchema. * * Returns: (transfer full): A #GArrowRecordBatchReader to read generated record batches. * * Since: 6.0.0 */
| 1876 | * Since: 6.0.0 |
| 1877 | */ |
| 1878 | GArrowRecordBatchReader * |
| 1879 | garrow_sink_node_options_get_reader(GArrowSinkNodeOptions *options, GArrowSchema *schema) |
| 1880 | { |
| 1881 | auto arrow_schema = garrow_schema_get_raw(schema); |
| 1882 | auto priv = GARROW_SINK_NODE_OPTIONS_GET_PRIVATE(options); |
| 1883 | if (!priv->reader) { |
| 1884 | auto arrow_reader = arrow::acero::MakeGeneratorReader(arrow_schema, |
| 1885 | std::move(priv->generator), |
| 1886 | arrow::default_memory_pool()); |
| 1887 | priv->reader = garrow_record_batch_reader_new_raw(&arrow_reader, nullptr); |
| 1888 | } |
| 1889 | g_object_ref(priv->reader); |
| 1890 | return priv->reader; |
| 1891 | } |
| 1892 | |
| 1893 | G_DEFINE_TYPE(GArrowHashJoinNodeOptions, |
| 1894 | garrow_hash_join_node_options, |
nothing calls this directly
no test coverage detected