@@ -862,6 +862,7 @@ mod tests {
862862 use datafusion_proto:: physical_plan:: AsExecutionPlan ;
863863 use datafusion_proto:: protobuf;
864864 use delta_kernel:: path:: { LogPathFileType , ParsedLogPath } ;
865+ use delta_kernel:: schema:: ArrayType ;
865866 use futures:: { stream:: BoxStream , StreamExt } ;
866867 use object_store:: ObjectMeta ;
867868 use object_store:: {
@@ -1854,6 +1855,49 @@ mod tests {
18541855 assert_eq ! ( expected, actual) ;
18551856 }
18561857
1858+ #[ tokio:: test]
1859+ async fn test_push_down_filter_panic_2602 ( ) -> DeltaResult < ( ) > {
1860+ use crate :: kernel:: schema:: { DataType , PrimitiveType } ;
1861+ let ctx = SessionContext :: new ( ) ;
1862+ let table = crate :: DeltaOps :: new_in_memory ( )
1863+ . create ( )
1864+ . with_column ( "id" , DataType :: Primitive ( PrimitiveType :: Long ) , true , None )
1865+ . with_column (
1866+ "name" ,
1867+ DataType :: Primitive ( PrimitiveType :: String ) ,
1868+ true ,
1869+ None ,
1870+ )
1871+ . with_column ( "b" , DataType :: Primitive ( PrimitiveType :: Boolean ) , true , None )
1872+ . with_column (
1873+ "ts" ,
1874+ DataType :: Primitive ( PrimitiveType :: Timestamp ) ,
1875+ true ,
1876+ None ,
1877+ )
1878+ . with_column ( "dt" , DataType :: Primitive ( PrimitiveType :: Date ) , true , None )
1879+ . with_column (
1880+ "zap" ,
1881+ DataType :: Array ( Box :: new ( ArrayType :: new (
1882+ DataType :: Primitive ( PrimitiveType :: Boolean ) ,
1883+ true ,
1884+ ) ) ) ,
1885+ true ,
1886+ None ,
1887+ )
1888+ . await ?;
1889+
1890+ ctx. register_table ( "snapshot" , Arc :: new ( table) ) . unwrap ( ) ;
1891+
1892+ let df = ctx
1893+ . sql ( "select * from snapshot where id > 10000 and id < 20000" )
1894+ . await
1895+ . unwrap ( ) ;
1896+
1897+ let _ = df. collect ( ) . await ?;
1898+ Ok ( ( ) )
1899+ }
1900+
18571901 /// Records operations made by the inner object store on a channel obtained at construction
18581902 struct RecordingObjectStore {
18591903 inner : ObjectStoreRef ,
0 commit comments