Skip to content

Config naming audit: rename inconsistent spark.comet.* keys before 1.0 #4978

Description

@andygrove

Tracker for #4082 "Review all configuration options and consider renaming some for consistency."

An audit of the 54 keys in spark/src/main/scala/org/apache/comet/CometConf.scala surfaced six categories of inconsistency. This issue is the umbrella; individual rename PRs should each cover one cluster and use the .withAlternative(...) mechanism to keep old keys working as deprecated aliases (see the Configuration Conventions contributor-guide page).

Category 1 — Boolean flags missing the .enabled suffix

Current convention: boolean flags end in .enabled. Exceptions to rename:

  • spark.comet.nativeLoadRequired → spark.comet.nativeLoadRequired.enabled
  • spark.comet.exceptionOnDatetimeRebase → spark.comet.datetimeRebase.exceptionOnRead.enabled (or similar; the current name is also very long)
  • spark.comet.exec.replaceSortMergeJoin → spark.comet.exec.forceShuffledHashJoin (done as the pilot rename)

Category 2 — Word separator inside a segment

Most segments use camelCase; a handful use dots or dashes to separate words. Fix:

  • spark.comet.columnar.shuffle.async.max.thread.num → spark.comet.columnar.shuffle.async.maxThreadNum
  • spark.comet.columnar.shuffle.async.thread.num → spark.comet.columnar.shuffle.async.threadNum
  • spark.comet.parquet.read.parallel.io.thread-pool.size → spark.comet.parquet.read.parallel.io.threadPoolSize
  • spark.comet.exec.pyarrowUdf.enabled vs spark.comet.exec.scalaUDF.codegen.enabled — pick one casing for UDF and apply consistently.

Category 3 — .explain.* group has orphaned siblings

spark.comet.explain.* already exists (format, native.enabled, rules). These related keys live at the top level:

  • spark.comet.explainCodegen.enabled → spark.comet.explain.codegen.enabled
  • spark.comet.explainFallback.enabled → spark.comet.explain.fallback.enabled
  • spark.comet.logFallbackReasons.enabled → related concept, current name is orphaned; discuss placement (spark.comet.explain.fallback.log.enabled? spark.comet.fallback.log.enabled?).

Category 4 — Two shuffle prefixes

  • spark.comet.columnar.shuffle.* (async/batch/memory/spill)
  • spark.comet.native.shuffle.* (partitioning)

Users likely expect spark.comet.shuffle.columnar.* and spark.comet.shuffle.native.*. This is the largest rename cluster and is worth its own thread.

Category 5 — sparkToColumnar uses camelCase as a top-level category

spark.comet.sparkToColumnar.* is the only categorical prefix using camelCase (others are lowercase words: exec, scan, parquet, shuffle). Options:

  • Fold into the existing spark.comet.convert.* family: spark.comet.convert.spark.enabled.
  • Rename the category segment: spark.comet.sparkColumnar.*.

Category 6 — Top-level scalars that could join a category

  • spark.comet.batchSize
  • spark.comet.memoryOverhead (candidate: spark.comet.memory.overhead)
  • spark.comet.maxTempDirectorySize (candidate: spark.comet.tempDirectory.maxSize)

Lower priority — these are top-level scalars that pre-date the current category convention.

Process

Each rename PR:

  1. Adds .withAlternative("oldKey") on the conf(...) call for the new key.
  2. Renames the Scala val (grep CometConf. for callsites).
  3. Updates every documented reference (grep docs/source/ for the old key string).
  4. Extends CometConfSuite if the rename exercises a new alias pattern.

Alias removals happen no earlier than the next Comet major after the rename first ships (see the versioning policy).

Activity

  1. added this to the 1.0.0 milestone on Jul 20, 2026
  2. andygrove commented on Aug 1, 2026

    @andygrove
    MemberAuthor

    Closing this out ahead of 1.0. Most of the audit landed; the remainder is deliberately will not do.

    Done

    Also folded into #5197: config_conventions.md had drifted from the code (it still listed columnar as a category segment, and its symbol-naming table named a symbol that does not exist).

    Will not do

    Category 5 — spark.comet.sparkToColumnar.*. The two candidate targets both have real problems. Folding into spark.comet.convert.* overloads a prefix that currently means source-scan conversion (convert.parquet, convert.json, convert.csv) with a different concept, converting arbitrary Spark operators to Arrow. Renaming the segment to sparkColumnar is churn for pure aesthetics. Not a call worth making on release week.

    Category 6 — top-level scalars. These are not inconsistencies:

    • spark.comet.memoryOverhead deliberately mirrors Spark's own spark.executor.memoryOverhead.
    • spark.comet.maxTempDirectorySize mirrors DataFusion's max_temp_directory_size.
    • spark.comet.batchSize is probably the most widely cited Comet config in tuning guides, blog posts, and benchmark scripts.

    spark.comet.exceptionOnDatetimeRebase. Restructuring a shipped, compatibility-sensitive key is not worth it. Appending .enabled alone is cosmetic.

    spark.comet.scan.allowDisabledParquetVectorizedReader. Already compliant — the conventions guide exempts action-form allow…/force… flags from the .enabled suffix.

    The reasoning on timing

    Under the versioning policy, config keys are Comet's primary public API. An alias added now and one added in 1.3 are both removable only in 2.0, so alias lifetime is not the deciding factor — user churn is. Renames at the 0.x→1.0 boundary are one migration, documented once. The same renames mid-1.x hit users who already migrated with fresh deprecation warnings, against names by then baked into 1.0-era docs and blog posts. That makes the cheap renames worth doing now and the expensive ones not worth doing at all, rather than leaving them open as "post-1.0".

    Two smaller .enabled suffix gaps remain unaddressed (spark.comet.nativeLoadRequired, spark.comet.exec.strictFloatingPoint). They are legitimate but low-value, and both would now need aliases. Happy to reopen as a focused issue if anyone feels strongly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions