public void Visit(TimestampType type) { TimestampArray.Builder resultBuilder = new TimestampArray.Builder().Reserve(_baseDataTotalElementCount); DateTimeOffset basis = DateTimeOffset.UtcNow; for (int i = 0; i < _baseDataListCount; i++) { List <int?> dataList = _baseData[i]; TimestampArray.Builder builder = new TimestampArray.Builder().Reserve(dataList.Count); foreach (int?value in dataList) { if (value.HasValue) { DateTimeOffset dateValue = basis.AddMilliseconds(value.Value); builder.Append(dateValue); resultBuilder.Append(dateValue); } else { builder.AppendNull(); resultBuilder.AppendNull(); } } TestTargetArrayList.Add(builder.Build()); } ExpectedArray = resultBuilder.Build(); }
public void Visit(TimestampType type) { var builder = new TimestampArray.Builder().Reserve(Length); var basis = DateTimeOffset.UtcNow.AddMilliseconds(-Length); for (var i = 0; i < Length; i++) { builder.Append(basis.AddMilliseconds(i)); } Array = builder.Build(); }
public IArrowArray BuildArray() { return(_builder.Build()); }