コード例 #1
0
            public void Visit(Date32Type actualType)
            {
                Assert.IsAssignableFrom <Date32Type>(_expectedType);
                var expectedType = (Date32Type)_expectedType;

                Assert.Equal(expectedType.Unit, actualType.Unit);
            }
コード例 #2
0
 public void Visit(Date32Type actualType)
 {
     if (_expectedType is Date32Type expectedType &&
         expectedType.Unit == actualType.Unit)
     {
         _dataTypeMatch = true;
     }
 }
コード例 #3
0
            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();
            }
コード例 #4
0
ファイル: TestData.cs プロジェクト: xiaoyi-db/arrow
            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();
            }
コード例 #5
0
 public void Visit(Date32Type type)
 {
     Result = FieldType.Build(
         Flatbuf.Type.Date,
         Flatbuf.Date.CreateDate(Builder, DateUnit.DAY));
 }
コード例 #6
0
 public void Visit(Date32Type type) => GenerateTestData <DateTime, Date32Array, Date32Array.Builder>(type, x => DateTime.MinValue.AddDays(x));
コード例 #7
0
ファイル: TestData.cs プロジェクト: abbotware/arrow-fork
 public void Visit(Date32Type type) => CreateNumberArray <int>(type);
コード例 #8
0
 public void Visit(Date32Type type)
 {
     throw new NotImplementedException();
 }