From fe5fa3b3e8ce47e9b1ea86194715b2df220874bb Mon Sep 17 00:00:00 2001 From: "Christopher M. Wolff" Date: Mon, 24 Apr 2023 11:15:08 -0700 Subject: [PATCH] fix: don't skip failed rules during logical planning (#7641) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- datafusion_util/src/config.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/datafusion_util/src/config.rs b/datafusion_util/src/config.rs index 1c1a975a4f..7caa94225c 100644 --- a/datafusion_util/src/config.rs +++ b/datafusion_util/src/config.rs @@ -22,6 +22,14 @@ pub fn iox_session_config() -> SessionConfig { options.execution.parquet.reorder_filters = true; options.optimizer.repartition_sorts = true; + // DataFusion skips failed optimizer rules by default. Relevant issues: + // - https://github.com/apache/arrow-datafusion/issues/4615 + // - https://github.com/apache/arrow-datafusion/issues/4685 + // + // However IOx should not skip them, since that will result in more helpful error messages + // when they fail, e.g., 'HandleGapFill`. + options.optimizer.skip_failed_rules = false; + SessionConfig::from(options) .with_batch_size(BATCH_SIZE) .with_create_default_catalog_and_schema(true)