@@ -26,7 +26,7 @@ pub use ndjson::*;
26
26
pub use parquet:: * ;
27
27
use polars_compute:: rolling:: QuantileMethod ;
28
28
use polars_core:: POOL ;
29
- #[ cfg( feature = "new_streaming" ) ]
29
+ #[ cfg( all ( feature = "new_streaming" , feature = "dtype-categorical" ) ) ]
30
30
use polars_core:: StringCacheHolder ;
31
31
use polars_core:: error:: feature_gated;
32
32
use polars_core:: prelude:: * ;
@@ -787,12 +787,14 @@ impl LazyFrame {
787
787
788
788
match engine {
789
789
Engine :: Auto | Engine :: Streaming => feature_gated ! ( "new_streaming" , {
790
+ #[ cfg( feature = "dtype-categorical" ) ]
790
791
let string_cache_hold = StringCacheHolder :: hold( ) ;
791
792
let result = polars_stream:: run_query(
792
793
alp_plan. lp_top,
793
794
& mut alp_plan. lp_arena,
794
795
& mut alp_plan. expr_arena,
795
796
) ;
797
+ #[ cfg( feature = "dtype-categorical" ) ]
796
798
drop( string_cache_hold) ;
797
799
result. map( |v| v. unwrap_single( ) )
798
800
} ) ,
@@ -884,12 +886,14 @@ impl LazyFrame {
884
886
885
887
if engine == Engine :: Streaming {
886
888
feature_gated ! ( "new_streaming" , {
889
+ #[ cfg( feature = "dtype-categorical" ) ]
887
890
let string_cache_hold = StringCacheHolder :: hold( ) ;
888
891
let result = polars_stream:: run_query(
889
892
alp_plan. lp_top,
890
893
& mut alp_plan. lp_arena,
891
894
& mut alp_plan. expr_arena,
892
895
) ;
896
+ #[ cfg( feature = "dtype-categorical" ) ]
893
897
drop( string_cache_hold) ;
894
898
return result. map( |v| v. unwrap_multiple( ) ) ;
895
899
} ) ;
@@ -1183,6 +1187,7 @@ impl LazyFrame {
1183
1187
Err ( e) => return Some ( Err ( e) ) ,
1184
1188
} ;
1185
1189
1190
+ #[ cfg( feature = "dtype-categorical" ) ]
1186
1191
let _hold = StringCacheHolder :: hold ( ) ;
1187
1192
let f = || {
1188
1193
polars_stream:: run_query (
0 commit comments