viirya commented on code in PR #22: URL: https://github.com/apache/spark-connect-swift/pull/22#discussion_r2004024149
########## Tests/SparkConnectTests/DataFrameTests.swift: ########## @@ -193,5 +193,38 @@ struct DataFrameTests { try await spark.sql("DROP TABLE IF EXISTS t").show() await spark.stop() } + + @Test + func cache() async throws { + let spark = try await SparkSession.builder.getOrCreate() + #expect(try await spark.range(10).cache().count() == 10) + await spark.stop() + } + + @Test + func persist() async throws { + let spark = try await SparkSession.builder.getOrCreate() + #expect(try await spark.range(20).persist().count() == 20) + #expect(try await spark.range(21).persist(useDisk: false).count() == 21) + await spark.stop() + } Review Comment: This checks the result correctness. If it is not actually cached, we still can get the same result. I'm not sure if we have a way to check if it is actually cached or not? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org