@@ -383,17 +383,19 @@ object CometConf extends ShimCometConf {
383383 .booleanConf
384384 .createWithDefault(false )
385385
386- val COMET_REGEXP_USE_JVM : ConfigEntry [Boolean ] =
387- conf(" spark.comet.exec.regexp.useJVM " )
386+ val COMET_REGEXP_ENGINE : ConfigEntry [String ] =
387+ conf(" spark.comet.exec.regexp.engine " )
388388 .category(CATEGORY_EXEC )
389389 .doc(
390- " Experimental. When true, route supported regular-expression expressions through a " +
391- " JVM-side UDF (java.util.regex.Pattern) for Spark-compatible semantics, at the cost " +
392- " of JNI roundtrips per batch. When false, falls back to whichever native or Spark " +
393- " path the expression normally selects . Only RLike is routed today; additional " +
390+ " Experimental. Selects the engine used to evaluate supported regular-expression " +
391+ " expressions. `rust` uses the native DataFusion regexp engine. `java` routes through " +
392+ " a JVM-side UDF (java.util.regex.Pattern) for Spark-compatible semantics, at the " +
393+ " cost of JNI roundtrips per batch . Only RLike is routed today; additional " +
394394 " expressions may opt in over time." )
395- .booleanConf
396- .createWithDefault(false )
395+ .stringConf
396+ .transform(_.toLowerCase(Locale .ROOT ))
397+ .checkValues(Set (" rust" , " java" ))
398+ .createWithDefault(" rust" )
397399
398400 val COMET_EXEC_SHUFFLE_WITH_HASH_PARTITIONING_ENABLED : ConfigEntry [Boolean ] =
399401 conf(" spark.comet.native.shuffle.partitioning.hash.enabled" )
0 commit comments