File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -484,20 +484,24 @@ struct DataFrameTests {
484484 @Test
485485 func checkpoint( ) async throws {
486486 let spark = try await SparkSession . builder. getOrCreate ( )
487- // By default, reliable checkpoint location is required.
488- try await #require( throws: Error . self) {
489- try await spark. range ( 10 ) . checkpoint ( )
487+ if await spark. version >= " 4.0.0 " {
488+ // By default, reliable checkpoint location is required.
489+ try await #require( throws: Error . self) {
490+ try await spark. range ( 10 ) . checkpoint ( )
491+ }
492+ // Checkpointing with unreliable checkpoint
493+ let df = try await spark. range ( 10 ) . checkpoint ( true , false )
494+ #expect( try await df. count ( ) == 10 )
490495 }
491- // Checkpointing with unreliable checkpoint
492- let df = try await spark. range ( 10 ) . checkpoint ( true , false )
493- #expect( try await df. count ( ) == 10 )
494496 await spark. stop ( )
495497 }
496498
497499 @Test
498500 func localCheckpoint( ) async throws {
499501 let spark = try await SparkSession . builder. getOrCreate ( )
500- #expect( try await spark. range ( 10 ) . localCheckpoint ( ) . count ( ) == 10 )
502+ if await spark. version >= " 4.0.0 " {
503+ #expect( try await spark. range ( 10 ) . localCheckpoint ( ) . count ( ) == 10 )
504+ }
501505 await spark. stop ( )
502506 }
503507
You can’t perform that action at this time.
0 commit comments