public void Visit(Date32Type actualType) { Assert.IsAssignableFrom <Date32Type>(_expectedType); var expectedType = (Date32Type)_expectedType; Assert.Equal(expectedType.Unit, actualType.Unit); }
public void Visit(Date32Type actualType) { if (_expectedType is Date32Type expectedType && expectedType.Unit == actualType.Unit) { _dataTypeMatch = true; } }
public void Visit(Date32Type type) { var builder = new Date32Array.Builder().Reserve(Length); var basis = DateTimeOffset.UtcNow.AddDays(-Length); for (var i = 0; i < Length; i++) { builder.Append(basis.AddDays(i)); } Array = builder.Build(); }
public void Visit(Date32Type type) { var builder = new Date32Array.Builder().Reserve(Length); // Length can be greater than the number of days since DateTime.MinValue. // Set a cap for how many days can be subtracted from now. int maxDays = Math.Min(Length, 100_000); var basis = DateTimeOffset.UtcNow.AddDays(-maxDays); for (var i = 0; i < Length; i++) { builder.Append(basis.AddDays(i % maxDays)); } Array = builder.Build(); }
public void Visit(Date32Type type) { Result = FieldType.Build( Flatbuf.Type.Date, Flatbuf.Date.CreateDate(Builder, DateUnit.DAY)); }
public void Visit(Date32Type type) => GenerateTestData <DateTime, Date32Array, Date32Array.Builder>(type, x => DateTime.MinValue.AddDays(x));
public void Visit(Date32Type type) => CreateNumberArray <int>(type);
public void Visit(Date32Type type) { throw new NotImplementedException(); }