From 46e7f38af71ed701815593f4b6327ceb464d3686 Mon Sep 17 00:00:00 2001 From: Benedikt Reinartz Date: Tue, 5 Nov 2024 17:02:27 +0100 Subject: [PATCH] GH-23995: [C#] Make PrimitiveArrayBuilder constructor public (#44596) Fixes #23995. Making these constructors `public` allows for writing custom builders. ### Rationale for this change Allows for writing custom builders. ### What changes are included in this PR? Only change of visibility on the default constructors of `PrimitiveArrayBuilder`. ### Are these changes tested? There is not much to test :) ### Are there any user-facing changes? See above. * GitHub Issue: #23995 Authored-by: Benedikt Reinartz Signed-off-by: Curt Hagenlocher --- csharp/src/Apache.Arrow/Arrays/PrimitiveArrayBuilder.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/csharp/src/Apache.Arrow/Arrays/PrimitiveArrayBuilder.cs b/csharp/src/Apache.Arrow/Arrays/PrimitiveArrayBuilder.cs index ae02173fb0df4..b3583842c1ed2 100644 --- a/csharp/src/Apache.Arrow/Arrays/PrimitiveArrayBuilder.cs +++ b/csharp/src/Apache.Arrow/Arrays/PrimitiveArrayBuilder.cs @@ -30,7 +30,7 @@ public abstract class PrimitiveArrayBuilder : IArr public int Length => ArrayBuilder.Length; - internal PrimitiveArrayBuilder(IArrowArrayBuilder> builder) + public PrimitiveArrayBuilder(IArrowArrayBuilder> builder) { ArrayBuilder = builder ?? throw new ArgumentNullException(nameof(builder)); } @@ -110,7 +110,7 @@ public abstract class PrimitiveArrayBuilder : IArrowArrayBu public int Length => ValueBuffer.Length; protected int NullCount => ValidityBuffer.UnsetBitCount; - internal PrimitiveArrayBuilder() + public PrimitiveArrayBuilder() { ValueBuffer = new ArrowBuffer.Builder(); ValidityBuffer = new ArrowBuffer.BitmapBuilder();