@@ -217,6 +217,30 @@ public virtual Task LessThanOrEqual_with_int()
217217 r => r . Int <= 10 ,
218218 r => ( int ) r [ "Int" ] <= 10 ) ;
219219
220+ [ ConditionalFact ]
221+ public virtual Task GreaterThan_with_DateTimeOffset ( )
222+ => this . TestFilterAsync (
223+ r => r . DateTimeOffset > new DateTimeOffset ( 2025 , 1 , 1 , 0 , 0 , 0 , TimeSpan . Zero ) ,
224+ r => ( DateTimeOffset ) r [ "DateTimeOffset" ] > new DateTimeOffset ( 2025 , 1 , 1 , 0 , 0 , 0 , TimeSpan . Zero ) ) ;
225+
226+ [ ConditionalFact ]
227+ public virtual Task GreaterThanOrEqual_with_DateTimeOffset ( )
228+ => this . TestFilterAsync (
229+ r => r . DateTimeOffset >= new DateTimeOffset ( 2025 , 1 , 1 , 0 , 0 , 0 , TimeSpan . Zero ) ,
230+ r => ( DateTimeOffset ) r [ "DateTimeOffset" ] >= new DateTimeOffset ( 2025 , 1 , 1 , 0 , 0 , 0 , TimeSpan . Zero ) ) ;
231+
232+ [ ConditionalFact ]
233+ public virtual Task LessThan_with_DateTimeOffset ( )
234+ => this . TestFilterAsync (
235+ r => r . DateTimeOffset < new DateTimeOffset ( 2025 , 1 , 1 , 0 , 0 , 0 , TimeSpan . Zero ) ,
236+ r => ( DateTimeOffset ) r [ "DateTimeOffset" ] < new DateTimeOffset ( 2025 , 1 , 1 , 0 , 0 , 0 , TimeSpan . Zero ) ) ;
237+
238+ [ ConditionalFact ]
239+ public virtual Task LessThanOrEqual_with_DateTimeOffset ( )
240+ => this . TestFilterAsync (
241+ r => r . DateTimeOffset <= new DateTimeOffset ( 2025 , 1 , 1 , 0 , 0 , 0 , TimeSpan . Zero ) ,
242+ r => ( DateTimeOffset ) r [ "DateTimeOffset" ] <= new DateTimeOffset ( 2025 , 1 , 1 , 0 , 0 , 0 , TimeSpan . Zero ) ) ;
243+
220244 #endregion Comparison
221245
222246 #region Logical operators
@@ -550,6 +574,7 @@ public class FilterRecord
550574 public int Int2 { get ; set ; }
551575 public string [ ] StringArray { get ; set ; } = null ! ;
552576 public List < string > StringList { get ; set ; } = null ! ;
577+ public DateTimeOffset DateTimeOffset { get ; set ; }
553578 }
554579
555580 public abstract class Fixture : VectorStoreCollectionFixture < TKey , FilterRecord >
@@ -594,7 +619,8 @@ public override VectorStoreCollectionDefinition CreateRecordDefinition()
594619 new VectorStoreDataProperty ( nameof ( FilterRecord . Bool ) , typeof ( bool ) ) { IsIndexed = true } ,
595620 new VectorStoreDataProperty ( nameof ( FilterRecord . Int2 ) , typeof ( int ) ) { IsIndexed = true } ,
596621 new VectorStoreDataProperty ( nameof ( FilterRecord . StringArray ) , typeof ( string [ ] ) ) { IsIndexed = true } ,
597- new VectorStoreDataProperty ( nameof ( FilterRecord . StringList ) , typeof ( List < string > ) ) { IsIndexed = true }
622+ new VectorStoreDataProperty ( nameof ( FilterRecord . StringList ) , typeof ( List < string > ) ) { IsIndexed = true } ,
623+ new VectorStoreDataProperty ( nameof ( FilterRecord . DateTimeOffset ) , typeof ( DateTimeOffset ) ) { IsIndexed = true }
598624 ]
599625 } ;
600626
@@ -611,7 +637,8 @@ protected override List<FilterRecord> BuildTestData()
611637 Int2 = 80 ,
612638 StringArray = [ "x" , "y" ] ,
613639 StringList = [ "x" , "y" ] ,
614- Vector = this . GetVector ( 3 )
640+ Vector = this . GetVector ( 3 ) ,
641+ DateTimeOffset = new DateTimeOffset ( 2025 , 1 , 1 , 0 , 0 , 0 , new TimeSpan ( 1 , 0 , 0 ) )
615642 } ,
616643 new ( )
617644 {
@@ -622,7 +649,8 @@ protected override List<FilterRecord> BuildTestData()
622649 Int2 = 90 ,
623650 StringArray = [ "a" , "b" ] ,
624651 StringList = [ "a" , "b" ] ,
625- Vector = this . GetVector ( 3 )
652+ Vector = this . GetVector ( 3 ) ,
653+ DateTimeOffset = new DateTimeOffset ( 2024 , 12 , 31 , 23 , 0 , 0 , TimeSpan . Zero )
626654 } ,
627655 new ( )
628656 {
@@ -633,7 +661,8 @@ protected override List<FilterRecord> BuildTestData()
633661 Int2 = 9 ,
634662 StringArray = [ "x" ] ,
635663 StringList = [ "x" ] ,
636- Vector = this . GetVector ( 3 )
664+ Vector = this . GetVector ( 3 ) ,
665+ DateTimeOffset = new DateTimeOffset ( 2024 , 12 , 31 , 23 , 0 , 0 , new TimeSpan ( - 1 , 0 , 0 ) )
637666 } ,
638667 new ( )
639668 {
@@ -644,7 +673,8 @@ protected override List<FilterRecord> BuildTestData()
644673 Int2 = 100 ,
645674 StringArray = [ "x" , "y" , "z" ] ,
646675 StringList = [ "x" , "y" , "z" ] ,
647- Vector = this . GetVector ( 3 )
676+ Vector = this . GetVector ( 3 ) ,
677+ DateTimeOffset = new DateTimeOffset ( 2025 , 1 , 1 , 0 , 0 , 0 , TimeSpan . Zero )
648678 } ,
649679 new ( )
650680 {
@@ -655,7 +685,8 @@ protected override List<FilterRecord> BuildTestData()
655685 Int2 = 101 ,
656686 StringArray = [ "y" , "z" ] ,
657687 StringList = [ "y" , "z" ] ,
658- Vector = this . GetVector ( 3 )
688+ Vector = this . GetVector ( 3 ) ,
689+ DateTimeOffset = new DateTimeOffset ( 2025 , 1 , 1 , 1 , 0 , 1 , new TimeSpan ( 1 , 0 , 0 ) )
659690 }
660691 ] ;
661692 }
0 commit comments