Skip to content

docs: fix references to configuration keys that do not exist - #5063

Merged
andygrove merged 12 commits into
apache:mainfrom
andygrove:docs-stale-config-refs
Jul 28, 2026
Merged

docs: fix references to configuration keys that do not exist#5063
andygrove merged 12 commits into
apache:mainfrom
andygrove:docs-stale-config-refs

Conversation

@andygrove

@andygrove andygrove commented Jul 28, 2026

Copy link
Copy Markdown
Member

Which issue does this PR close?

No issue filed; this is a docs cleanup found by sweeping every tracked markdown file for spark.comet.* keys and validating them against CometConf.scala.

Rationale for this change

Several docs reference configuration keys that do not exist. A user copying these into a spark-submit command gets a silently ignored setting, which is worse than an error because the doc implies the setting took effect.

The largest group is the expression opt-in prefix. The real namespace is spark.comet.expression.* (COMET_EXPR_CONFIG_PREFIX in CometConf.scala), but the contributor guide, the versioning policy, and two expression-audit pages all use spark.comet.expr.*. Those same places also describe a global allowIncompatible key, which has never existed: the opt-in is always per-expression or per-operator.

While verifying the remaining spark.comet.expression.<Name>.* references against the serde registry, three of them turned out to name something that is not a valid expression config, and the surrounding prose was stale in the same way, so those claims were corrected too.

What changes are included in this PR?

Wrong config prefix, corrected to spark.comet.expression.*:

  • contributor-guide/adding_a_new_expression.md (3 references, plus removal of the nonexistent global key from the Incompatible description)
  • about/versioning_policy.md
  • .claude/skills/audit-comet-expression/SKILL.md
  • contributor-guide/benchmarking_macos.md, which passed spark.comet.expression.allowIncompatible=true

Explode is gated at the operator level, not the expression level, so expression-audits/generator_funcs.md now points at spark.comet.operator.GenerateExec.allowIncompatible.

Config keys naming an expression that does not exist:

  • spark.comet.expression.regexp.allowIncompatible (predicate_funcs.md, string_funcs.md). There is no regexp expression; the real keys are RLike and RegExpReplace.
  • spark.comet.expression.Upper.allowIncompatible / Lower.allowIncompatible (string_funcs.md). Case conversion overrides the opt-in key via nativeOptInConfigKeyOverride, so the key is spark.comet.caseConversion.enabled.

Correcting those four also meant correcting the claims around them, which predate the codegen dispatcher: rlike, regexp_replace, upper and lower are Compatible by default now, with the native regexp / case-mapping path opt-in, not "unconditionally Incompatible". The regexp_replace entry also cited RegExp.isSupportedPattern, a symbol that no longer exists.

Renamed or never-registered keys:

  • spark.comet.metrics.detailed (user-guide/latest/metrics.md) was never registered; those metrics are always reported
  • spark.comet.memoryPool.fraction to spark.comet.exec.memoryPool.fraction (benchmark-results/tpc-ds.md, tpc-h.md)
  • spark.comet.shuffle.write.buffer.size to spark.comet.shuffle.native.writeBufferSize (native_shuffle.md)
  • spark.comet.exec.shuffle.enableFastEncoding and spark.comet.exec.shuffle.fallbackToColumnar, both removed, dropped from benchmarking_macos.md
  • spark.comet.exec.all.enabled, removed, dropped from benchmarking_spark_sql_perf.md and benchmarks/README.md
  • spark.comet.columnar.shuffle.enabled to spark.comet.shuffle.mode=jvm (benchmarking_spark_sql_perf.md)
  • spark.comet.cast.allowIncompatible to spark.comet.expression.Cast.allowIncompatible (benchmarks/README.md)

Deliberately left alone: docs/source/changelog/*, which records historical PR titles mentioning since-removed keys, the docs/comet-0.1x/ version archives, and placeholder forms such as spark.comet.exec.<yourOperator>.enabled.

How are these changes tested?

Docs only, no code changes. Verified by extracting every spark.comet.* token from all tracked .md and .rst files and diffing that set against the keys registered in CometConf.scala, expanded for the dynamic expression.<Name>.*, operator.<Name>.* and exec.<name>.enabled patterns. Every expression name appearing in a config key was checked against the classOf[...] entries in QueryPlanSerde.scala, and each corrected claim was read back against the relevant serde. After the change the only unmatched keys are the three changelog entries noted above. prettier reports no formatting changes.

andygrove added 12 commits July 20, 2026 16:05
Shuffle-related configs were spread across four disjoint prefixes:
`spark.comet.exec.shuffle.*`, `spark.comet.columnar.shuffle.*`,
`spark.comet.native.shuffle.*`, and `spark.comet.shuffle.*`. This
consolidates all shuffle configs under `spark.comet.shuffle.*` with
`.columnar.` and `.native.` sub-namespaces for mode-specific settings.

Every renamed key is registered via `.withAlternative(...)`, so
existing user configurations continue to work (a deprecation warning
is logged when an old key is read). Per-mode leaves that were
previously misplaced move to their honest namespace:

  - `spark.comet.exec.shuffle.writeBufferSize` (native-only) becomes
    `spark.comet.shuffle.native.writeBufferSize`.
  - `spark.comet.shuffle.preferDictionary.ratio` (JVM-only) becomes
    `spark.comet.shuffle.columnar.preferDictionary.ratio`.

The `spark.comet.columnar.shuffle.*` keys also fix Category 2 in
apache#4978 (dots-in-segment): `spill.threshold`,
`memory.factor`, and `batch.size` become `spillThreshold`,
`memoryFactor`, and `batchSize`.

Part of apache#4978.
The JVM-side shuffle path in Comet is not the only columnar shuffle —
native shuffle is also columnar (both use Arrow). The distinguishing
axis is *where* the shuffle logic runs. Renaming the sub-namespace
to `.jvm.` aligns it with the mode value users already set:
`spark.comet.shuffle.mode = jvm`.

Keys renamed:

  - spark.comet.shuffle.columnar.spillThreshold        → spark.comet.shuffle.jvm.spillThreshold
  - spark.comet.shuffle.columnar.memoryFactor          → spark.comet.shuffle.jvm.memoryFactor
  - spark.comet.shuffle.columnar.batchSize             → spark.comet.shuffle.jvm.batchSize
  - spark.comet.shuffle.columnar.preferDictionary.ratio → spark.comet.shuffle.jvm.preferDictionary.ratio

The pre-existing deprecated aliases (`spark.comet.columnar.shuffle.*`)
are untouched — they were never `.columnar.`-scoped under the new
prefix. Val names follow: `COMET_SHUFFLE_COLUMNAR_*` → `COMET_SHUFFLE_JVM_*`.

The Scala/Java class names (`CometColumnarShuffle`, `CometColumnarShuffleSuite`, etc.)
still use "columnar" and are left alone — that is a separate rename to
consider once the config vocabulary settles.
Table column alignment tweaks after the `.columnar.` → `.jvm.` key
rename. Content unchanged.
Resolves conflicts introduced by apache/main apache#4985 (remove untested
async columnar shuffle) against this branch's shuffle-config renames:

- Accept deletion of CometShuffleExternalSorterAsync/Sync and the
  merged-back CometShuffleExternalSorter; propagate this branch's
  jvm.* renames to the merged class (COMET_SHUFFLE_JVM_SPILL_THRESHOLD,
  COMET_SHUFFLE_JVM_PREFER_DICTIONARY_RATIO, COMET_SHUFFLE_COMPRESSION_*).
- Drop async-config rows from jvm_shuffle.md and async-mode benchmark
  cases from CometShuffleBenchmark; drop the async-branch conditionals
  from CometColumnarShuffleSuite.
- Fold the newly-introduced COMET_COLUMNAR_SHUFFLE_MAX_WRITERS_PER_EXECUTOR
  into this branch's naming: rename to COMET_SHUFFLE_JVM_MAX_WRITERS_PER_EXECUTOR
  (key spark.comet.shuffle.jvm.maxWritersPerExecutor), keeping both prior
  names as .withAlternative fallbacks.
- Rename remaining spark.comet.exec.shuffle.mode occurrences in three
  make_time_shuffle*.sql test files to the new spark.comet.shuffle.mode.
# Conflicts:
#	spark/src/main/scala/org/apache/spark/sql/comet/execution/shuffle/CometNativeShuffleWriter.scala
Regenerate the Spark SQL test diffs to reference shuffle configs by their
string keys rather than CometConf constants, so the config rename in this
PR no longer breaks test compilation.

- spark.comet.exec.shuffle.enabled -> spark.comet.shuffle.enabled
- CometConf.COMET_EXEC_SHUFFLE_WITH_RANGE_PARTITIONING_ENABLED.key ->
  "spark.comet.shuffle.native.partitioning.range.enabled"
# Conflicts:
#	benchmarks/pyspark/run_all_benchmarks.sh
#	spark/src/test/scala/org/apache/comet/CometConfSuite.scala
…pache#5062)

Audit the user guide and contributor guide for references to issues that
have since been closed, and make the remaining issue and PR links use a
single format.

Thirteen places described a limitation that no longer exists, verified
against the current serde and native code rather than the issue state
alone: size() over MapType, try_mod / EvalMode.TRY, CAST(map AS map),
spark.sql.legacy.castComplexTypesToString, replace with an empty search
string, initcap, str_to_map with the legacy truncate flag, AVG(decimal)
over a window, Percentile, the pyarrow-udf row round-trip, the
datafusion-spark migration epic, the awslabs TPC-DS epic, and the
interval type epic.

Also drop or repoint links that pointed at a closed or unrelated tracker:
the apache#4098 rows in expressions.md, translate, the TimestampNTZ scan note,
and the from_utc_timestamp timezone-parser note.

Convert bare URLs and bare #NNNN mentions to inline [#NNNN](url), keeping
reference-style definitions where a file already used them, and point URLs
at /pull/ where the number is a pull request.
Several docs referenced configuration keys that were never registered or were
renamed. Corrected the expression/operator opt-in prefix (spark.comet.expr.* ->
spark.comet.expression.* / spark.comet.operator.*), removed references to a
global allowIncompatible key that does not exist, and updated stale shuffle,
memory pool, and metrics keys.
# Conflicts:
#	benchmarks/README.md
#	docs/source/contributor-guide/benchmarking_spark_sql_perf.md
#	docs/source/contributor-guide/expression-audits/predicate_funcs.md
#	docs/source/contributor-guide/expression-audits/string_funcs.md
#	docs/source/contributor-guide/native_shuffle.md
@andygrove
andygrove marked this pull request as ready for review July 28, 2026 16:14
@andygrove
andygrove requested a review from mbutrovich July 28, 2026 16:14
@andygrove

Copy link
Copy Markdown
Member Author

@mbutrovich this PR includes the fix for the stale spark.comet.shuffle.write.buffer.size row you flagged in #4986 (comment): the table in native_shuffle.md now shows spark.comet.shuffle.native.writeBufferSize. Now that #4986 has merged, this branch is caught up with main and ready for review.

@mbutrovich mbutrovich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @andygrove! Nice cleanup!

@andygrove
andygrove merged commit 5fd68c2 into apache:main Jul 28, 2026
17 checks passed
@andygrove
andygrove deleted the docs-stale-config-refs branch July 28, 2026 17:18
comphead pushed a commit to comphead/arrow-datafusion-comet that referenced this pull request Aug 26, 2026
…5063)

* refactor: unify shuffle configs under `spark.comet.shuffle.*` prefix

Shuffle-related configs were spread across four disjoint prefixes:
`spark.comet.exec.shuffle.*`, `spark.comet.columnar.shuffle.*`,
`spark.comet.native.shuffle.*`, and `spark.comet.shuffle.*`. This
consolidates all shuffle configs under `spark.comet.shuffle.*` with
`.columnar.` and `.native.` sub-namespaces for mode-specific settings.

Every renamed key is registered via `.withAlternative(...)`, so
existing user configurations continue to work (a deprecation warning
is logged when an old key is read). Per-mode leaves that were
previously misplaced move to their honest namespace:

  - `spark.comet.exec.shuffle.writeBufferSize` (native-only) becomes
    `spark.comet.shuffle.native.writeBufferSize`.
  - `spark.comet.shuffle.preferDictionary.ratio` (JVM-only) becomes
    `spark.comet.shuffle.columnar.preferDictionary.ratio`.

The `spark.comet.columnar.shuffle.*` keys also fix Category 2 in
apache#4978 (dots-in-segment): `spill.threshold`,
`memory.factor`, and `batch.size` become `spillThreshold`,
`memoryFactor`, and `batchSize`.

Part of apache#4978.

* refactor: rename `.columnar.` sub-namespace to `.jvm.`

The JVM-side shuffle path in Comet is not the only columnar shuffle —
native shuffle is also columnar (both use Arrow). The distinguishing
axis is *where* the shuffle logic runs. Renaming the sub-namespace
to `.jvm.` aligns it with the mode value users already set:
`spark.comet.shuffle.mode = jvm`.

Keys renamed:

  - spark.comet.shuffle.columnar.spillThreshold        → spark.comet.shuffle.jvm.spillThreshold
  - spark.comet.shuffle.columnar.memoryFactor          → spark.comet.shuffle.jvm.memoryFactor
  - spark.comet.shuffle.columnar.batchSize             → spark.comet.shuffle.jvm.batchSize
  - spark.comet.shuffle.columnar.preferDictionary.ratio → spark.comet.shuffle.jvm.preferDictionary.ratio

The pre-existing deprecated aliases (`spark.comet.columnar.shuffle.*`)
are untouched — they were never `.columnar.`-scoped under the new
prefix. Val names follow: `COMET_SHUFFLE_COLUMNAR_*` → `COMET_SHUFFLE_JVM_*`.

The Scala/Java class names (`CometColumnarShuffle`, `CometColumnarShuffleSuite`, etc.)
still use "columnar" and are left alone — that is a separate rename to
consider once the config vocabulary settles.

* chore: re-run prettier on shuffle docs

Table column alignment tweaks after the `.columnar.` → `.jvm.` key
rename. Content unchanged.

* style: apply spotless formatting to CometShuffleExternalSorter

* refactor: move maxBufferBytes under spark.comet.shuffle.native prefix

* test: update Spark diffs for renamed shuffle configs

Regenerate the Spark SQL test diffs to reference shuffle configs by their
string keys rather than CometConf constants, so the config rename in this
PR no longer breaks test compilation.

- spark.comet.exec.shuffle.enabled -> spark.comet.shuffle.enabled
- CometConf.COMET_EXEC_SHUFFLE_WITH_RANGE_PARTITIONING_ENABLED.key ->
  "spark.comet.shuffle.native.partitioning.range.enabled"

* docs: refresh stale issue references and normalize issue link format (apache#5062)

Audit the user guide and contributor guide for references to issues that
have since been closed, and make the remaining issue and PR links use a
single format.

Thirteen places described a limitation that no longer exists, verified
against the current serde and native code rather than the issue state
alone: size() over MapType, try_mod / EvalMode.TRY, CAST(map AS map),
spark.sql.legacy.castComplexTypesToString, replace with an empty search
string, initcap, str_to_map with the legacy truncate flag, AVG(decimal)
over a window, Percentile, the pyarrow-udf row round-trip, the
datafusion-spark migration epic, the awslabs TPC-DS epic, and the
interval type epic.

Also drop or repoint links that pointed at a closed or unrelated tracker:
the apache#4098 rows in expressions.md, translate, the TimestampNTZ scan note,
and the from_utc_timestamp timezone-parser note.

Convert bare URLs and bare #NNNN mentions to inline [#NNNN](url), keeping
reference-style definitions where a file already used them, and point URLs
at /pull/ where the number is a pull request.

* docs: fix references to configuration keys that do not exist

Several docs referenced configuration keys that were never registered or were
renamed. Corrected the expression/operator opt-in prefix (spark.comet.expr.* ->
spark.comet.expression.* / spark.comet.operator.*), removed references to a
global allowIncompatible key that does not exist, and updated stale shuffle,
memory pool, and metrics keys.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants