@@ -115,6 +115,11 @@ impl TableProducer for CountProducer {
115115 . map_err ( |e| RpcError :: runtime_error ( e. to_string ( ) ) ) ?;
116116 Ok ( Some ( batch) )
117117 }
118+
119+ fn resume_supported ( & self ) -> bool {
120+ // The producer returns at most one batch.
121+ false
122+ }
118123}
119124
120125impl TableFunction for CountTo {
@@ -167,6 +172,8 @@ impl TableProducer for EmitProducer {
167172 Ok ( Some ( RecordBatch :: try_new ( self . schema . clone ( ) , vec ! [ col] )
168173 . map_err ( |e| RpcError :: runtime_error ( e. to_string ( ) ) ) ?) )
169174 }
175+
176+ vgi:: resume_fields!( batch_idx, counter) ;
170177}
171178impl TableFunction for EmitBatches {
172179 fn name ( & self ) -> & str {
@@ -204,6 +211,11 @@ impl TableProducer for BoomProducer {
204211 fn next_batch ( & mut self , _out : & mut OutputCollector ) -> Result < Option < RecordBatch > > {
205212 Err ( RpcError :: runtime_error ( "boom: intentional worker error" ) )
206213 }
214+
215+ fn resume_supported ( & self ) -> bool {
216+ // This fixture errors before it can emit a batch.
217+ false
218+ }
207219}
208220impl TableFunction for Boom {
209221 fn name ( & self ) -> & str {
@@ -265,6 +277,8 @@ impl TableProducer for SlowProducer {
265277 Ok ( Some ( RecordBatch :: try_new ( self . schema . clone ( ) , vec ! [ col] )
266278 . map_err ( |e| RpcError :: runtime_error ( e. to_string ( ) ) ) ?) )
267279 }
280+
281+ vgi:: resume_fields!( i) ;
268282}
269283impl TableFunction for SlowCount {
270284 fn name ( & self ) -> & str {
@@ -309,6 +323,11 @@ impl TableProducer for PeekProducer {
309323 Ok ( Some ( RecordBatch :: try_new ( self . schema . clone ( ) , vec ! [ col] )
310324 . map_err ( |e| RpcError :: runtime_error ( e. to_string ( ) ) ) ?) )
311325 }
326+
327+ fn resume_supported ( & self ) -> bool {
328+ // The producer returns at most one batch.
329+ false
330+ }
312331}
313332impl TableFunction for PeekMaxConcurrency {
314333 fn name ( & self ) -> & str {
@@ -353,6 +372,8 @@ impl TableProducer for ParallelProbeProducer {
353372 Ok ( Some ( RecordBatch :: try_new ( self . schema . clone ( ) , vec ! [ col] )
354373 . map_err ( |e| RpcError :: runtime_error ( e. to_string ( ) ) ) ?) )
355374 }
375+
376+ vgi:: resume_fields!( i) ;
356377}
357378impl TableFunction for ParallelProbe {
358379 fn name ( & self ) -> & str {
@@ -519,6 +540,8 @@ impl TableProducer for SabBigProducer {
519540 Ok ( Some ( RecordBatch :: try_new ( self . schema . clone ( ) , vec ! [ col] )
520541 . map_err ( |e| RpcError :: runtime_error ( e. to_string ( ) ) ) ?) )
521542 }
543+
544+ vgi:: resume_fields!( emitted) ;
522545}
523546impl TableFunction for SabBig {
524547 fn name ( & self ) -> & str {
@@ -578,6 +601,11 @@ impl TableProducer for SabCachedProducer {
578601 fn last_metadata ( & self ) -> Option < HashMap < String , String > > {
579602 self . meta . clone ( )
580603 }
604+
605+ fn resume_supported ( & self ) -> bool {
606+ // The cache fixture deliberately returns one metadata-bearing batch.
607+ false
608+ }
581609}
582610impl TableFunction for SabCached {
583611 fn name ( & self ) -> & str {
@@ -636,6 +664,11 @@ impl TableProducer for BrowserInfoProducer {
636664 Ok ( Some ( RecordBatch :: try_new ( self . schema . clone ( ) , cols)
637665 . map_err ( |e| RpcError :: runtime_error ( e. to_string ( ) ) ) ?) )
638666 }
667+
668+ fn resume_supported ( & self ) -> bool {
669+ // The browser snapshot is returned in one batch.
670+ false
671+ }
639672}
640673#[ cfg( target_os = "emscripten" ) ]
641674impl TableFunction for BrowserInfo {
@@ -696,6 +729,11 @@ impl TableProducer for ClientRandomProducer {
696729 Ok ( Some ( RecordBatch :: try_new ( self . schema . clone ( ) , vec ! [ col] )
697730 . map_err ( |e| RpcError :: runtime_error ( e. to_string ( ) ) ) ?) )
698731 }
732+
733+ fn resume_supported ( & self ) -> bool {
734+ // All requested random values are returned in one batch.
735+ false
736+ }
699737}
700738#[ cfg( target_os = "emscripten" ) ]
701739impl TableFunction for ClientRandom {
@@ -760,6 +798,11 @@ impl TableProducer for ClientFetchProducer {
760798 Ok ( Some ( RecordBatch :: try_new ( self . schema . clone ( ) , cols)
761799 . map_err ( |e| RpcError :: runtime_error ( e. to_string ( ) ) ) ?) )
762800 }
801+
802+ fn resume_supported ( & self ) -> bool {
803+ // One fetch produces one response batch.
804+ false
805+ }
763806}
764807#[ cfg( target_os = "emscripten" ) ]
765808impl TableFunction for ClientFetch {
@@ -827,6 +870,11 @@ impl TableProducer for ClientGeoProducer {
827870 Ok ( Some ( RecordBatch :: try_new ( self . schema . clone ( ) , cols)
828871 . map_err ( |e| RpcError :: runtime_error ( e. to_string ( ) ) ) ?) )
829872 }
873+
874+ fn resume_supported ( & self ) -> bool {
875+ // One geolocation lookup produces one snapshot batch.
876+ false
877+ }
830878}
831879#[ cfg( target_os = "emscripten" ) ]
832880impl TableFunction for ClientGeo {
0 commit comments