diff --git a/spark/src/main/scala/org/apache/spark/sql/delta/DeltaConfig.scala b/spark/src/main/scala/org/apache/spark/sql/delta/DeltaConfig.scala index cc0206e486..6e45d18791 100644 --- a/spark/src/main/scala/org/apache/spark/sql/delta/DeltaConfig.scala +++ b/spark/src/main/scala/org/apache/spark/sql/delta/DeltaConfig.scala @@ -535,7 +535,9 @@ trait DeltaConfigsBase extends DeltaLogging { * (e.g., in append and OPTIMIZE) as well as data skipping (e.g., the column stats beyond this * number will be ignored even when they exist). */ - val DATA_SKIPPING_NUM_INDEXED_COLS = buildConfig[Int]( + lazy val DATA_SKIPPING_NUM_INDEXED_COLS = buildConfig[Int]( + // It involves loading additional context in DataSkippingReader so + // delay its initialization as much as possible "dataSkippingNumIndexedCols", DataSkippingReader.DATA_SKIPPING_NUM_INDEXED_COLS_DEFAULT_VALUE.toString, _.toInt,