Skip to content

Conversation

@brancz
Copy link
Contributor

@brancz brancz commented Aug 29, 2023

We allow accessing the IndexBuilder since GH-37416 merged. While the Builder interface functions can be accessed, the actual array builder cannot.

Rationale for this change

#37416 added the function to access the index builder, but since it returns the Builder interface, we can't actually access the underlying builder as the unexported IndexBuilder is unexported.

Alternatives could be:

  • Return indexBuilder.Builder instead in the IndexBuilder() function
  • Return the unexported indexBuilder type, but this tends to be more awkward to use

What changes are included in this PR?

Exporting the type so it can be type asserted.

Are these changes tested?

Yes, rolled this out in our infra.

Are there any user-facing changes?

Yes, but this API hasn't been released yet.

We allow accessing the IndexBuilder since apacheGH-37416 merged. While
`Append` can be called on the returned struct, the inner builder cannot
be accessed. Besides that returning non-exported types comes with all
sorts of odd ergonomics.
@brancz brancz requested a review from zeroshade as a code owner August 29, 2023 15:21
@brancz
Copy link
Contributor Author

brancz commented Aug 29, 2023

cc @zeroshade

@zeroshade zeroshade merged commit 439d066 into apache:main Aug 29, 2023
@zeroshade zeroshade removed the awaiting review Awaiting review label Aug 29, 2023
@github-actions github-actions bot added the awaiting merge Awaiting merge label Aug 29, 2023
@brancz brancz deleted the export-index-builder branch August 29, 2023 16:39
@conbench-apache-arrow
Copy link

After merging your PR, Conbench analyzed the 5 benchmarking runs that have been run so far on merge-commit 439d066.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about possible false positives for unstable benchmarks that are known to sometimes produce them.

loicalleyne pushed a commit to loicalleyne/arrow that referenced this pull request Nov 13, 2023
We allow accessing the IndexBuilder since apacheGH-37416 merged. While the `Builder` interface functions can be accessed, the actual array builder cannot.

### Rationale for this change

apache#37416 added the function to access the index builder, but since it returns the `Builder` interface, we can't actually access the underlying builder as the unexported `IndexBuilder` is unexported.

Alternatives could be:

* Return `indexBuilder.Builder` instead in the `IndexBuilder()` function
* Return the unexported `indexBuilder` type, but this tends to be more awkward to use

### What changes are included in this PR?

Exporting the type so it can be type asserted.

### Are these changes tested?

Yes, rolled this out in our infra.

### Are there any user-facing changes?

Yes, but this API hasn't been released yet.

Authored-by: Frederic Branczyk <fbranczyk@gmail.com>
Signed-off-by: Matt Topol <zotthewizard@gmail.com>
dgreiss pushed a commit to dgreiss/arrow that referenced this pull request Feb 19, 2024
We allow accessing the IndexBuilder since apacheGH-37416 merged. While the `Builder` interface functions can be accessed, the actual array builder cannot.

### Rationale for this change

apache#37416 added the function to access the index builder, but since it returns the `Builder` interface, we can't actually access the underlying builder as the unexported `IndexBuilder` is unexported.

Alternatives could be:

* Return `indexBuilder.Builder` instead in the `IndexBuilder()` function
* Return the unexported `indexBuilder` type, but this tends to be more awkward to use

### What changes are included in this PR?

Exporting the type so it can be type asserted.

### Are these changes tested?

Yes, rolled this out in our infra.

### Are there any user-facing changes?

Yes, but this API hasn't been released yet.

Authored-by: Frederic Branczyk <fbranczyk@gmail.com>
Signed-off-by: Matt Topol <zotthewizard@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants