* garrow_hash_join_node_options_new: * @type: A #GArrowJoinType to be used. * @left_keys: (array length=n_left_keys): Left join keys. * @n_left_keys: The number of @left_keys. * @right_keys: (array length=n_right_keys): Right join keys. * @n_right_keys: The number of @right_keys. * @error: (nullable): Return location for a #GError or %NULL. * * Returns: (nullable): A newly created #GArrowH
| 1920 | * Since: 7.0.0 |
| 1921 | */ |
| 1922 | GArrowHashJoinNodeOptions * |
| 1923 | garrow_hash_join_node_options_new(GArrowJoinType type, |
| 1924 | const gchar **left_keys, |
| 1925 | gsize n_left_keys, |
| 1926 | const gchar **right_keys, |
| 1927 | gsize n_right_keys, |
| 1928 | GError **error) |
| 1929 | { |
| 1930 | auto arrow_type = static_cast<arrow::acero::JoinType>(type); |
| 1931 | std::vector<arrow::FieldRef> arrow_left_keys; |
| 1932 | for (gsize i = 0; i < n_left_keys; ++i) { |
| 1933 | if (!garrow_field_refs_add(arrow_left_keys, |
| 1934 | left_keys[i], |
| 1935 | error, |
| 1936 | "[hash-join-node-options][new][left-key]")) { |
| 1937 | return NULL; |
| 1938 | } |
| 1939 | } |
| 1940 | std::vector<arrow::FieldRef> arrow_right_keys; |
| 1941 | for (gsize i = 0; i < n_right_keys; ++i) { |
| 1942 | if (!garrow_field_refs_add(arrow_right_keys, |
| 1943 | right_keys[i], |
| 1944 | error, |
| 1945 | "[hash-join-node-options][new][right-key]")) { |
| 1946 | return NULL; |
| 1947 | } |
| 1948 | } |
| 1949 | auto arrow_options = new arrow::acero::HashJoinNodeOptions(arrow_type, |
| 1950 | std::move(arrow_left_keys), |
| 1951 | std::move(arrow_right_keys)); |
| 1952 | auto options = |
| 1953 | g_object_new(GARROW_TYPE_HASH_JOIN_NODE_OPTIONS, "options", arrow_options, NULL); |
| 1954 | return GARROW_HASH_JOIN_NODE_OPTIONS(options); |
| 1955 | } |
| 1956 | |
| 1957 | /** |
| 1958 | * garrow_hash_join_node_options_set_left_outputs: |
nothing calls this directly
no test coverage detected