mr-smidge commented on a change in pull request #7654: URL: https://github.com/apache/arrow/pull/7654#discussion_r453673591
########## File path: csharp/src/Apache.Arrow/Arrays/DateArrayBuilder.cs ########## @@ -0,0 +1,179 @@ +//------------------------------------------------------------------------------ +// <copyright file="DateArrayBuilder.cs" company="Jetstone Asset Management LLP"> +// Copyright (C) Jetstone Asset Management LLP. All rights reserved. +// Unauthorised copying of this file, via any medium, is strictly prohibited. +// Proprietary and confidential +// </copyright> +// <author>Adam Szmigin</author> +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Apache.Arrow +{ + /// <summary> + /// The <see cref="DateArrayBuilder{TUnderlyingType,TArray,TBuilder}"/> class is an abstract array builder that can + /// accept dates in the form of <see cref="DateTime"/> or <see cref="DateTimeOffset"/> and convert to some + /// underlying date representation. + /// </summary> + public abstract class DateArrayBuilder<TUnderlyingType, TArray, TBuilder> : Review comment: This new class is a bit like splitting `PrimitiveArrayBuilder<TFrom, TTo, ...>` into two: one class whose interface is to do with accepting values of differing types for conversion, and another (`DelegatingArrayBuilder`) which simply delegates to an 'inner' array builder for methods like `Resize()` that don't care about the type of value. For clarity: `PrimitiveArrayBuilder<TFrom, TTo, ...>` would no longer work as a base class for `DateXXArray.Builder` because the builder now accepts two different kinds of type for writing to the array. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org