milenkovicm commented on code in PR #1420:
URL:
https://github.com/apache/datafusion-ballista/pull/1420#discussion_r2817579925
##########
ballista/client/tests/context_unsupported.rs:
##########
@@ -143,4 +149,52 @@ mod unsupported {
Ok(())
}
+
+ #[rstest]
+ #[case::standalone(standalone_context())]
+ #[case::remote(remote_context())]
+ #[tokio::test]
+ async fn should_support_on_cache_collect(
+ #[future(awt)]
+ #[case]
+ ctx: SessionContext,
+ ) -> datafusion::error::Result<()> {
+ // opt out case, should fail
+ ctx.sql("SET ballista.cache_noop = false")
+ .await?
+ .show()
+ .await?;
+ let cached_df = ctx.sql("SELECT 1").await?.cache().await?;
+
+ // Collect fails because extension node is not handled for now by
default query planner
+ let result = cached_df.collect().await;
+
+ assert!(result.is_err());
+ let err_msg = result.unwrap_err().to_string();
+ assert!(
+ err_msg.contains("No installed planner was able to convert the
custom node to an execution plan: BallistaCacheNode"),
+ "Expected planner error, got: {err_msg}"
+ );
+
+ // opt in case, should succeed transparently without effective cache
+ ctx.sql("SET ballista.cache_noop = true")
Review Comment:
can we rename config to `ballista.cache.noop` or similar ?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]