Skip to content

docs: apply the style guide's "native" rules to the remaining pages - #7477

Open
Abhishek-Mohan wants to merge 48 commits into
apache:mainfrom
Abhishek-Mohan:docs/7358-timezones-native
Open

Abhishek-Mohan wants to merge 48 commits into
apache:mainfrom
Abhishek-Mohan:docs/7358-timezones-native

Conversation

@Abhishek-Mohan

@Abhishek-Mohan Abhishek-Mohan commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #7358.

Rationale for this change

The documentation style guide from #7151 rules out "runs natively", "the native path", "native operator", "native execution" and similar phrases (N1), allows "native" before a code noun only in the contributor guide (N3), and never as a noun (N4). #7358 tracks moving the existing pages and the published config descriptions over. This PR does that in one pass, so later edits to these pages start from text that already follows the guide.

What changes are included in this PR?

Wording (N1–N5). Each phrase the guide rules out is replaced with the term the code supports:

  • "in the Comet pipeline" / "runs in Comet" (T1) where the text means "did not fall back to Spark". Codegen dispatch counts as staying in Comet.
  • "Rust-implemented" / "in Rust" (T3) where it means Comet's Rust code. JVM-side Comet operators, such as the broadcast exchange and the in-memory cache scan, are not called Rust-implemented.
  • "the Rust side" where "native" was a noun (N4), and "Spark's built-in shuffle" for Spark's own behavior (N5).

Allowed uses are unchanged: native shuffle, native scan/reader/writer, native memory, native library, native implementation, and in the contributor guide native code, native plan and the JVM/native boundary. Identifiers, config keys, log lines and plan output are unchanged (N6).

Scope. Every page under docs/source (user guide, contributor guide, about), README.md, the .doc(...) strings in CometConf.scala and contrib/delta/.../DeltaConf.scala, and the one generated header in GenerateDocs.scala that used a ruled-out phrase ("not selected for native execution automatically"), with GenerateDocsSuite updated to match. Only string literals change in the Scala files. In all, 73 files change: 67 Markdown pages, the SVG and Excalidraw sources of the FFI data-flow diagram, and the four Scala files. This covers every item on #7358's list that still exists, plus about 20 files with the same wording that the issue's search missed. It also covers text that main added while this PR was in review, such as the local-execution.md page (#6883), the new tuning/expressions.md and upgrading_datafusion.md pages, and the spark.comet.exec.nativeLambda.enabled, MIN/MAX reader-filter and V2 text reader config descriptions, so no page in scope on main is left with a ruled-out phrase. compatibility/expressions/spark-3.4/index.md was removed from main with Spark 3.4 support (#7521).

Claims that were wrong, fixed while editing the sentence (P16):

Page Was Now
installation.md "Comet's native broadcast exchange" The broadcast exchange is JVM-side
operators.md One unsupported operator makes its whole stage fall back It stays in Spark with transitions around it; whole-stage revert is opt-in
adding_a_new_operator.md Every nativeExecs operator runs in Rust Names the three JVM-side scans in the map
adding_a_new_expression.md Unsupported expressions make Spark "fall back to its native execution" Describes the fallback and the codegen dispatch route
adding_a_new_expression.md The lossy UTF-8 decoder belongs to native shuffle It is used by CAST(binary AS string), the native Text scan, JVM shuffle's row-to-Arrow conversion, and string columns imported from the JVM
development.md CI groups fuzz, parquet, csv, sql The four current groups
plugin_overview.md A v2 Parquet path and a custom vectorized reader V1 Parquet and eligible V2 CSV, Text and Iceberg scans become native scans; the native Parquet scan uses DataFusion's Parquet reader
timezones.md Known bugs are tracked in #6335 (closed) The epic links related issues, some still open
timezones.md date_format runs natively only in UTC In UTC sessions, allow-listed literal patterns with the default string collation use to_char by default; with allowIncompatible they also do in non-UTC sessions, formatted in UTC
timezones.md Dispatched timezone expressions all have a Rust path make_timestamp, and to_timestamp with a format, always dispatch
compatibility/index.md DECIMAL RANGE frames diverge Comet falls back for a RANGE frame with an explicit offset on a decimal ORDER BY
_category_template/cast.md Comet leaves an unsupported cast to Spark It uses codegen dispatch
spark.comet.debug.enabled Validates arrays imported from the JVM Validates arrays before exporting them to the JVM
adding_a_new_expression.md A checkSparkAnswerAndImpl example expects binary bit_length to dispatch It falls back to Spark; the example uses lower with and without spark.comet.caseConversion.enabled
sql-file-tests.md Binary bit_length routes through the codegen dispatcher It falls back to Spark; the example uses lower, which dispatches by default
sql-file-tests.md, adding_a_new_expression.md All-literal queries are evaluated by Comet Other optimizer rules and plan-time literal handling can still remove them
roadmap.md Comet does not yet use DataFusion's array_filter and array_any_match It uses them for eligible filter and exists lambdas; the remaining work is other lambdas and functions
expressions.md, tuning/expressions.md, spark_configs_support.md, nativeLambda.enabled A lambda runs in Rust when its body has native implementations Only an eligible lambda does (for example, date functions in the body dispatch); the array_compact rewrites ignore the config
expressions.md sequence: all integral types run in Rust Only with literal or column arguments
expressions.md sort_array: only struct, nested-array, floating-point and null elements run in Rust Supported scalar elements and arrays or structs of them do
expressions.md, sql-file-tests.md round: every non-float input runs in Rust Negative-scale decimals dispatch
adding_a_new_expression.md The unsupported-note example quotes a CometSortArray reason that is not in the code Uses CometAverage's real reason
adding_a_new_expression.md, sql-file-tests.md The Rust implementation and codegen dispatch both match Spark by construction Either can return the expected answer for a test input, so comparing answers does not show which ran
adding_a_new_expression.md Unsupported() always falls back to Spark; Incompatible() is used only with the opt-in, and always converts with it Without the opt-in, Comet tries codegen dispatch for a CodegenDispatchFallback serde; with it, Comet asks the serde to convert. The operator falls back if neither route handles it
sql-file-tests.md, adding_a_new_expression.md A plain query checks that the query runs in Comet It checks operator coverage, which allows Spark wrappers and skips the Spark input below CometSparkToColumnarExec
compatibility/index.md, expressions.md, json.md, compatibility/expressions/index.md and spark-*/index.md Codegen dispatch produces byte-exact Spark results ("match Spark exactly"), expressions without a dispatch path that are not fully compatible always fall back, ✅ Supported means Spark-compatible results, and JSON cases without a Rust implementation always use the dispatcher; every supported expression is Spark-compatible by default; codegen dispatch is always the default, the native implementation is always opt-in through allowIncompatible, and any [COMET-INFO: ...] message points at an opt-in Codegen dispatch is subject to Arrow's representation limits (make_interval's time component); the expression indexes link to this section instead of restating the routing rule; ✅ means supported for at least some inputs or forms, possibly only with an opt-in (mode, the HLL functions); an opted-in JSON case the Rust implementation cannot handle may stay in Spark; Comet selects the native implementation automatically for some inputs, such as a supported literal rlike pattern, and results can still differ for them; the dispatcher default covers only cases where Comet does not select the native implementation automatically, and a case Comet selects automatically, such as a binary-to-string cast, can still differ (see Strings with non-UTF-8 bytes); some expressions use a dedicated config; only the message that names a config offers an opt-in
expressions.md The not-planned families fall back to Spark; percentile with a frequency argument falls back; all-foldable concat_ws dispatches (true only with ConstantFolding off) They lack dedicated Rust implementations, and some dispatch (make_valid_utf8 on Spark 4); a literal frequency of 1 runs in Comet; the concat_ws clause, which applies only with ConstantFolding off, is removed
operators.md, spark.comet.exec.enabled, spark.comet.enabled All Comet operators except shuffle are turned off by spark.comet.exec.enabled=false, each can be turned off individually, spark.comet.exec.sort.enabled=false turns off Comet sorting, and both configs must be on to run in Comet Most are, and Comet shuffle has its own settings; most operators have their own setting (the aggregates share one), and the sort setting keeps Spark's SortExec in Spark; the both-configs note and the unconditional Parquet sentence are removed
operators.md, tuning/transitions.md Transition revert returns every stage over the threshold to Spark Comet can return a stage to Spark; it keeps a stage whose revert would split an unsafe aggregate
plugin_overview.md Both exec.enabled and convert.parquet.enabled must be set for scan conversion Scoped to converting Spark's Parquet scan output
in-memory-cache.md spark.comet.exec.enabled=true means CometInMemoryTableScan scans the cache, and Spark's cache scan always gets the fused reader The bullets are keyed to the scan that runs (a relation with Dataset.observe metrics uses Spark's scan); the fused reader needs Comet and spark.comet.exec.inMemoryCache.enabled on
operators.md, spark.comet.shuffle.directRead.enabled Adjacent Rust-implemented operators always run as one plan, and every operator consuming shuffle output reads blocks directly Comet can run them as one plan (a native write starts a new block); direct read applies to eligible operators (TakeOrderedAndProject uses an Arrow stream)
datasources.md, parquet.md, spark.comet.convert.*, spark.comet.convert.broadcastBuildSide.enabled Enabling a convert setting converts the scan (including range and cache scans), a native probe makes the broadcast join and build side convert, and file build sides convert only through their own switches The settings allow conversion of eligible scans (a query reading input_file_name() is not converted); build-side conversion applies to an eligible broadcast join; the broadcast setting does not enable Parquet, JSON, CSV or Text conversion
map.md, operators.md, spark.comet.convert.typedDataset.enabled, spark.comet.exec.range.enabled MapSort runs in Rust so map shuffle and group-by stay on Comet; typed Dataset conversion and range generation always happen and let the operators above run in Comet MapSort runs in Rust for supported scalar map keys; Comet can convert eligible typed output and generate eligible ranges in Rust (a typed operation under LIMIT 1 and a range with no Comet consumer stay in Spark)
tuning/expressions.md Comet's Rust date and timestamp functions support years up to about 262,143, Spark's up to 294,247 Some Rust functions use chrono, whose calendar range is smaller than Spark's; outside it, some casts can fail and some date fields can return NULL
s3-credential-providers.md, s3-credential-provider-design.md Comet's native scans bypass Hadoop S3A and all use the READ bridge, and executors never instantiate S3AFileSystem Reads through object_store or opendal bypass S3A (a scan routed through libhdfs does not); the READ bridge and location scoping are no longer tied to Parquet and Iceberg (CSV and Text scans use the bridge too), and the S3 store can run without a bridge
timezones.md Dispatcher output is always labelled "UTC", and a projection-only test cannot catch a wrong label Dispatcher output follows the timestamp-labelling rules (TimestampNTZ has no zone); strict label checks validate output batches
memory_management.md The Arrow interfaces copy nothing, ScanExec keeps every column as an Arc clone, and Comet's reservations are released only on spill They share compatible buffers (a Decimal128 realignment or UTF-8 repair copies); Spark cannot ask Rust operators to spill, but reservations are also released as sort output is emitted
spark.comet.testing.strictTimestampLabels.enabled, s3-credential-providers.md Comparing results can never detect a wrong label; the bridge routes every credential request through Java Comparing projected values alone can miss one; the bridge obtains credentials from Java (it can serve a cached credential)
ffi.md Data buffers are always shared zero-copy, the Rust side allocates all output, and imported buffers are freed when no Rust reference remains Compatible buffers are shared; a column containing strings is rebuilt to repair invalid UTF-8; Rust exports output buffers it may not have allocated; direct shuffle read applies to a slot serialized as ShuffleScan; dropping the stream reader releases its references while imported batches keep their buffers; buffers stay live while any owner, including a JVM reader, holds them
spark.comet.write.parquet.enabled Comet intercepts Parquet writes and executes them in Rust The sentence is removed (bucketed and partitioned writes are declined)
compatibility/operators.md An RDD checkpoint reaches a Comet join only with spark.comet.convert.rdd.enabled=true The example is a checkpointed RDD whose rows Comet converts (the deprecated sparkToColumnar settings also convert it)
spark.comet.explain.fallback.strict.enabled The check applies when all children are Comet operators It applies when all children are CometNativeExec instances
compatibility/floating-point.md Flat array_contains arrays always run a Rust kernel The routing sentence is removed; the expression table documents it
expressions.md array_contains with a computed value over any nullable array uses the dispatcher Only for nullable ARRAY<FLOAT> or ARRAY<DOUBLE>
tuning/memory.md The imported from native part was allocated by Rust, so allocated counts it, and the rest the JVM allocated itself It is the JVM import allocator's charge, and the remainder is an estimate; Rust's allocated can miss buffers allocated by PyArrow
_category_template/cast.md CAST(date AS TIMESTAMP) and CAST(date AS STRING) are compatible with Spark, DST gaps are handled correctly, and the C level means results match Spark Both can fail in Rust outside chrono's date range (#7471); CAST(date AS TIMESTAMP) can use a different UTC offset when the timezone databases disagree, and a later instant when a spring-forward gap straddles midnight; C means Comet supports the cast without an opt-in, with known differences in the per-cast notes; the negative-scale decimal kernels fail because they convert the scale to an unsigned exponent, not because 10^abs(scale) overflows, and the list of negative-scale casts that run in Rust is not exhaustive
_category_template/datetime.md The Rust date_trunc is correct for dates within chrono-tz's DST horizon, and date and time functions are compatible with Spark for 1970-2100 Codegen dispatch is the default in non-UTC sessions and the opt-in applies to supported inputs, including TIMESTAMP_NTZ inputs, which Catalyst casts to TIMESTAMP; the 1970-2100 guarantee is removed because the timezone databases can disagree within it (Tehran 1977-1979)
tuning/expressions.md Any dispatched expression in a lambda body sends the whole lambda to the dispatcher Only one that reads the lambda parameter does, as does a nondeterministic body or a nested higher-order function
tuning/expressions.md, nativeLambda.enabled Other lambdas always run through the dispatcher They fall back to Spark when the dispatcher is disabled or rejects the expression

Headings. 21 headings that used a ruled-out phrase are renamed, and the FFI data-flow diagram's "Native" label now reads "Rust". Nothing in the repository links to their anchors, and a search of issues, PRs and comments found no links to them either. The roadmap heading "Native Coverage for Codegen-Dispatched Expressions" keeps its name, because seven issues and PRs link to its anchor.

contributor-guide/sql-file-tests.md overlaps with #7333, which rewrites some of the same lines. Its constant-folding note here uses #7333's wording, so whichever PR merges second has a small conflict to resolve.

Not included:

  • The support-level strings in the expression serdes (serde/*.scala). They also print as fallback reasons in plans and are not listed in docs: move existing pages to the style guide's "native" rules #7358.
  • Records the guide excludes: the changelog, expression and data source audits, and benchmark results. In top_level_project_proposal.md, the quoted board resolution is unchanged; the comparison paragraph after it is updated.
  • The FAQ's answer on Delta Lake support predates this PR and is a content change, not a wording one; it is left for a separate PR.

How are these changes tested?

Documentation only, plus .doc string literals.

  • Checked each replacement against the code at the branch head before choosing T1 or T3, and each corrected claim against the code (paths in the commit messages).
  • Ran the review-comet-docs skill on the branch, then grepped the whole scope, not only changed lines, for every N1/N4 form after the last merge of main. What remains is allowed: quoted log lines (N6), native shuffle and native memory (N2), and the excluded records. Every config key and operator name in changed lines exists, and all newly introduced relative links and anchors resolve.
  • Built the docs with Sphinx (-n) at main and at the head after the latest merge of main (35 warnings on each, none new, measured in council round 3). Each changed page has one H1, except plugin_overview.md, which already had two.
  • prettier --check "**/*.md" passes with prettier 3.10.1, the version CI installs. spotless:check passes on CometConf.scala. No test reads the changed config descriptions; GenerateDocsSuite covers the changed GenerateDocs header.

Council review

Rounds: 30 (plus a review of the original timezones page)

Delegate Timezones page Round 1 Round 2 Round 3 Round 4 Round 5 Round 6 Round 7 Round 8 Round 9 Round 10 Round 11 Round 12 Round 13 Round 14 Round 15 Round 16 Round 17 Round 18 Round 19 Round 20 Round 21 Round 22 Round 23 Round 24 Round 25 Round 26 Round 27 Round 28 Round 29 Round 30
Claude Opus 5.5 8.5/10 6.5/10 8.5/10 8/10 9.5/10 9/10 9.5/10 9.5/10 9.5/10 10/10 9/10 9.5/10 9.5/10 9.5/10 10/10 9/10 10/10 10/10 9/10 10/10 9.5/10 10/10 10/10 10/10 9/10 10/10 10/10 10/10 10/10 10/10 10/10
Gemini 4 Argon 10/10 7.5/10 10/10 — — — — — — — — — — — — — — — — — — — — — — — — — — — —
Gemini 4 Carbon — — — no score — — — — — — — — — — — — — — — — — — — — — — — — — — —
Gemini 4 Neon — — — — 10/10 9.5/10 10/10 10/10 10/10 10/10 9.5/10 10/10 10/10 10/10 10/10 9.5/10 10/10 10/10 10/10 10/10 10/10 10/10 10/10 10/10 9.5/10 10/10 9.5/10 10/10 9.5/10 10/10 no score
GPT-6 Astra / GPT-6.2 Astra 8/10 8/10 9/10 7.5/10 8.5/10 8.5/10 9/10 9/10 9/10 9/10 9/10 9/10 9/10 9/10 9/10 9/10 9/10 9/10 9/10 9/10 9/10 9/10 9/10 — — — — — — — —
GPT-6.2 Sol — — — — — — — — — — — — — — — — — — — — — — — 9/10 9/10 8.5/10 9/10 9/10 9/10 9/10 no score

Round 1 found operators described as Rust-implemented that run on the JVM, codegen dispatch called a fallback, half-renamed labels, and edits the guide did not require, which are reverted. Round 2 found six smaller wording issues. Round 3 reviewed the merge with main and found claims that main had made out of date (lambda support, V2 Text scans), routing notes that overstated Rust support, and ruled-out phrases in text main added. Rounds 4 and 5 narrowed what a plain SQL test query checks, removed a claim that both implementations match Spark by construction, qualified the dispatcher route with its Spark fallback, and caught the remaining "native ... reads" wording and the FFI diagram label. Round 6 aligned the compatibility overview and the Incompatible() descriptions with automatic Rust selection and the opt-in's actual effect. Round 7 scoped the default-compatibility claim, kept the dedicated-config exception, and corrected the imported from native memory figure. Round 8 narrowed when a fallback reason names the opt-in and when a dispatched expression sends a lambda to the dispatcher, and added the chrono range limit to two date casts. Round 9 added the chrono-tz offset difference for CAST(date AS TIMESTAMP) and named the dispatcher config in its fallback reason. Round 10 replaced the round-9 "classifies as incompatible" rule with whether Comet selects the native implementation automatically, pointed at the sections that document the remaining differences, added the straddling spring-forward gap, and redefined the cast legend's C level. Round 11 removed the remaining claims that automatically selected cases are known compatible and that codegen dispatch is byte-exact, said that the C cast level runs the Rust cast, noted Arrow's representation limits for codegen dispatch, and corrected why the Rust decimal kernels reject negative scales. Round 12 removed "match Spark exactly" from the per-version expression indexes and the byte-exact wording from expressions.md, dropped the "correct within the DST horizon" claim, redefined C as supported without an opt-in, and renamed the compatibility overview heading. Round 13 replaced the routing rule in all five expression indexes with a link to the overview, removed the byte-exact JSON claim and the 1970-2100 guarantee, and scoped the make_interval limit to its time component. Round 14 dropped the blanket "✅ produces Spark-compatible results" claim in expressions.md, stated the JSON fallback rule once, and carried the make_interval wording into the expression row. Round 15 removed the remaining default-support promise for ✅ rows and the TIMESTAMP_NTZ exception for date_trunc. Round 16 corrected four expression and config descriptions (make_valid_utf8, spark.comet.exec.enabled, percentile, concat_ws). Round 17 removed the per-operator and both-configs notes and narrowed the array_contains dispatch condition. Round 18 removed the unconditional Parquet sentence from spark.comet.enabled, named only shuffle as independent of spark.comet.exec.enabled, limited the sort example to SortExec, and removed a duplicated array_contains routing sentence. Round 19 qualified transition revert, scoped the Parquet conversion requirement, and keyed the cache-reader bullets to the scan that runs. Round 20 added the fused cache reader's Comet requirements, and qualified one-plan execution and direct shuffle read. Round 21 qualified the convert.* and broadcast build-side descriptions and named CometNativeExec in the strict fallback check. Round 22 carried that wording into the data source, Parquet, range and cache descriptions and removed two exclusivity claims. From round 23 GPT-6.2 Sol replaced GPT-6.2 Astra; round 23 scoped MapSort, the typed Dataset and range settings, and the date_format opt-in. Round 24 restored the RangeExec row's antecedent, qualified the range config description, and removed the unconditional Parquet-write sentence. Round 25 added the collation condition to date_format, described the Rust date range as chrono's, scoped the S3A bypass to the object_store and opendal connectors, and said the array_contains dispatch cases apply by default. Round 26 named those connectors in the design doc, narrowed the chrono failure sentence, and limited the READ bridge and location scoping to reads that use the bridge. Round 27 described the S3 bridge by connector, corrected the dispatcher's timestamp-label claim, and distinguished FFI buffer export from allocation. Round 28 removed the remaining "a wrong label only shows up there", keyed direct shuffle read to the ShuffleScan slot, and separated stream-reader closure from batch buffer lifetime. Round 29 aligned memory_management.md with the FFI page, and removed absolute claims about label detection, the S3 bridge and reservation release. The review was stopped during round 30: Claude Opus 5.5 scored the final head 10/10, and the Gemini 4 Neon and GPT-6.2 Sol reviews of that head were cancelled before they reported. In round 29 Opus and Neon gave 10/10 and Sol 9/10; every finding Sol raised through round 29 is fixed in this head. All are fixed. Gemini 4 Carbon returned no review in round 3 and was replaced by Gemini 4 Neon from round 4.

AI assistance: written with Claude Opus 5.5 through OpenCode, and reviewed by Claude Opus 5.5, Gemini 4 Argon, Gemini 4 Carbon, Gemini 4 Neon, GPT-6 Astra, GPT-6.2 Astra and GPT-6.2 Sol in T3 Code.

Replace the phrases the style guide rules out (N1, N3) with the term
each one means: "runs natively", "not handled natively", "the native
path", "a native path" and "ran natively" become what Comet does in
Rust, and "native expression", "native spelling" and "native version"
name the Rust expression, the `Tz::from_str` parser and the native
library's IANA database version.

The `date_format` sentence also said Comet uses `to_char` only in UTC
sessions. `CometDateFormat` also uses it in other sessions when
`spark.comet.expression.DateFormatClass.allowIncompatible=true`, so the
sentence now says so.

Part of apache#7358.

Generated-by: OpenCode
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Nov 4, 2026
The codegen dispatcher paragraph said the serdes route "the cases their
Rust implementation cannot handle" through the dispatcher. `make_timestamp`
(`CometMakeTimestamp`) and `to_timestamp` with a format (`GetTimestamp`,
`CometGetTimestamp`) have no Rust implementation: both extend
`CometCodegenDispatch` and always dispatch. `to_timestamp` without a
format is rewritten by Spark to a `Cast`, which runs in Rust. Say so.

Found with the review-comet-docs skill's judgment checks.

Part of apache#7358.

Generated-by: OpenCode
The `date_format` sentence said Comet uses `to_char` outside UTC
sessions when `allowIncompatible` is set, but not what that does.
`CometDateFormat.convert` emits `to_char` without a timezone, and every
`TimestampType` input is labelled "UTC", so the result is formatted in
UTC. Say so.

The list of Spark settings Comet does not handle said "Comet" as a
whole. The Delta scan does rebase legacy-calendar dates and timestamps
(`datetime_rebase.rs`, and `parquet.md`), so scope the list to the
native Parquet scan.

Part of apache#7358.

Generated-by: OpenCode
Move every page under docs/source, README.md, and the `.doc(...)`
strings in CometConf.scala and DeltaConf.scala to the style guide's
rules for "native" (N1-N5). Each replacement names the meaning the code
supports: "in the Comet pipeline" / "runs in Comet" (T1) where the text
means "did not fall back to Spark", "Rust-implemented" / "in Rust" (T3)
where it means Comet's Rust code, and "the Rust side" where "native" was
a noun (N4). Allowed compounds (native shuffle, native scan, native
writer, native memory, native library, native implementation, and in the
contributor guide native code, native plan and the JVM/native boundary)
are unchanged, as are identifiers, config keys, log lines and plan
output (N6).

Where a sentence was already wrong, fix it:

- installation.md called the broadcast exchange native; it is JVM-side.
- adding_a_new_operator.md said every `nativeExecs` operator runs
  entirely in Rust; the local table and in-memory cache scans do not.
- adding_a_new_expression.md said an unsupported expression makes Spark
  "fall back to its native execution"; describe the fallback and the
  codegen dispatch route.
- adding_a_new_expression.md tied the lossy UTF-8 decoder to native
  shuffle; it is used by JVM shuffle's row-to-Arrow conversion.
- development.md listed CI suite groups that no longer exist.
- plugin_overview.md described a v2 Parquet path and a custom vectorized
  reader that no longer exist.
- timezones.md said known bugs are tracked in apache#6335, which is closed.
- compatibility/index.md listed DECIMAL RANGE frames as diverging; Comet
  now falls back for them.
- compatibility/expressions/_category_template/cast.md said Comet leaves
  an unsupported cast to Spark; it uses codegen dispatch.
- the `spark.comet.debug.enabled` doc said arrays are validated on
  import; they are validated before export to the JVM.
- pyarrow-udfs.md described a per-partition native worker; the UDF runs
  in an embedded interpreter on the task thread.

Headings that used a ruled-out phrase are renamed. No page in the
repository links to any of the old anchors.

Not included: sql-file-tests.md, which apache#7333 rewrites, and the
expression support-level strings in the serdes, which also print as
fallback reasons in plans.

Closes apache#7358.

Generated-by: OpenCode
Fix sentences that named the wrong kind of operator or lost accuracy:

- adding_a_new_operator.md: the `nativeExecs` map also holds the local
  table, in-memory cache and empty relation scans, which are JVM-side;
  name the map rather than calling every entry Rust-implemented.
- operators.md: an unsupported operator stays in Spark with transitions
  around it; the stage does not fall back as a whole unless transition
  revert is enabled. `CollectMetricsExec` feeds any Comet operator, and
  typed Dataset operators stay in Spark.
- CometConf: the strict fallback check sees Comet operators as children,
  not only Rust-implemented ones; the UDF library ABI is
  language-neutral, so do not call the libraries Rust UDFs; call the
  `explain.native` output the Rust plan, as metrics.md and
  understanding-comet-plans.md do.
- datasources.md: the build-side bridge is for scans without a native
  scan, and the probe side must use native scans.
- json.md and regex.md: finish the "Rust path" / "Rust engine" labels,
  and say that unsupported cases route through the codegen dispatcher
  rather than falling back to it (T5).
- cast.md: keep "native implementation of" together (N2).
- expressions.md: the regr_*, slice and luhn_check notes say "runs in
  Rust" instead of using "Native" outside the Implementation column.
- pyarrow-udfs.md: name `CometNativeException`.
- timezones.md: the apache#6335 epic links issues that are still open.

Revert edits the guide did not require: N3 compounds in the contributor
guide (native planner, native function arguments, native guard, native
frames, native allocations, native reservations), the "native stream"
debugging heading, the roadmap heading that issues link to by anchor,
the proposal record in top_level_project_proposal.md, and
"reads" -> "scans" where the matching headings keep "reads". Use plain
"handoff" in iceberg-scheduler-failures.md.

Part of apache#7358.

Generated-by: OpenCode
@Abhishek-Mohan Abhishek-Mohan changed the title docs: apply the style guide's "native" rules to timezones.md docs: apply the style guide's "native" rules to the remaining pages Nov 9, 2026
- in-memory-cache.md: with Comet operators off at startup, Spark can
  still read Comet's cache format; the plugin keeps Spark's format so
  that caches are not stored in Comet's format with only Spark to read
  them (Plugins.maybeSetCacheSerializer).
- faq.md: Rust-implemented operators and JVM shuffle pages share the
  off-heap pool; Comet's JVM Arrow allocator does not.
- operators.md: name the transition-revert config in the intro.
- metrics.md: "that connector" read as the HDFS path; name Comet's Rust
  S3 connector.
- json.md: the JSON kernels are Comet's own Rust code, not DataFusion's.
- CometConf: `spark.comet.exec.enabled` leaves Comet shuffle on.

Part of apache#7358.

Generated-by: OpenCode
The default `query` mode checks that every operator is a Comet operator
(`checkSparkAnswerAndOperator`), so it checks that the query runs in
Comet (T1). `expect_native` checks that an expression ran in Rust rather
than through codegen dispatch (T3).

Fix two claims while editing them:

- The example showed binary `bit_length` routing through the codegen
  dispatcher. `CometBitLength` marks binary input `Unsupported` and has
  no `CodegenDispatchFallback`, so it falls back to Spark. Use `lower`,
  which dispatches unless `spark.comet.caseConversion.enabled=true`, as
  `lower.sql` asserts.
- The constant-folding note said all-literal queries are evaluated by
  Comet. Other optimizer rules and Comet's plan-time literal handling
  can still remove them, so say so.

This was the last page apache#7358 lists.

Part of apache#7358.

Generated-by: OpenCode
…ative

# Conflicts:
#	docs/source/contributor-guide/floating_point.md
#	docs/source/user-guide/latest/operators.md
#	spark/src/main/scala/org/apache/comet/CometConf.scala
…ative

# Conflicts:
#	docs/source/contributor-guide/roadmap.md
#	docs/source/user-guide/latest/iceberg.md

@comphead comphead 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.

I spot-checked the reworded claims against the code (CometConf, operators, expressions, Iceberg, memory) and found no change in meaning, config key or default. One heads up: GenerateDocs.scala still emits "selected for native execution automatically" into the generated expression compatibility pages, so those pages will keep the old term until the generator changes.

- adding_a_new_expression.md: the `checkSparkAnswerAndImpl` example
  expected binary `bit_length` to use the codegen dispatcher, but
  `CometBitLength` returns `Unsupported` for `BinaryType` without
  `CodegenDispatchFallback`, so it falls back to Spark. Use `lower`,
  which dispatches by default and runs in Rust with
  `spark.comet.caseConversion.enabled=true`, as `lower.sql` and
  `lower_enabled.sql` do.
- tuning/shuffle.md: name the Rust allocator, as tuning/memory.md and
  the `spark.comet.memory.logInterval` doc do.
- GenerateDocs: the expression compatibility header said "not selected
  for native execution automatically" (N1); say "where Comet does not
  select its native implementation automatically". GenerateDocsSuite
  expects the new text.

Part of apache#7358.

Generated-by: OpenCode
@Abhishek-Mohan

Copy link
Copy Markdown
Contributor Author

Note

🤖 Claude Opus 5.5 responding on behalf of @Abhishek-Mohan

Thanks for checking. The GenerateDocs header now reads "For applicable cases where Comet does not select its native implementation automatically", and GenerateDocsSuite expects the new text, so the generated compatibility pages pick it up on the next docs build.

@andygrove andygrove left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The PR backlog is huge and the maintainers don't have the bandwidth to review them all, so here is an automated review. Feel free to ignore it.

I found no blocking concerns. I read the sweep against the code at the head commit and the corrections in the description's table held up. CometDateFormat does use to_char in non-UTC sessions only with DateFormatClass.allowIncompatible, and CometMakeTimestamp and CometGetTimestamp always route through codegen dispatch. CometWindowExec already falls back for a DECIMAL ORDER BY with an explicit RANGE offset. CometScanRule.transformV2Scan only builds CometBatchScanExec for CSV and Iceberg. prepare_output in jni_api.rs does validate arrays on export when spark.comet.debug.enabled is set, and decode_utf8_spark_lossy is used by the shuffle crate's row conversion. The CI group list in development.md matches the scans, shuffle, exec and expressions entries in pr_build_linux.yml.

Against the latest release the only behavior difference is wording in the .doc(...) strings and the GenerateDocs header. The Scala diff is string literals only, and GenerateDocsSuite matches the new header text. None of the renamed headings are linked by anchor from anywhere in the repository, and the relative links on changed lines point at files that exist. I could not build the docs here because the network was unavailable, so the Sphinx warning comparison is the author's own.

…ative

# Conflicts:
#	docs/source/contributor-guide/adding_a_new_operator.md
#	docs/source/user-guide/latest/iceberg.md
#	docs/source/user-guide/latest/operators.md
#	docs/source/user-guide/latest/parquet.md
#	docs/source/user-guide/latest/s3-credential-providers.md
…ative

# Conflicts:
#	docs/source/contributor-guide/ffi.md
…ative

# Conflicts:
#	docs/source/user-guide/latest/migration-guide.md
#	docs/source/user-guide/latest/tuning/memory.md
…ative

# Conflicts:
#	spark/src/main/scala/org/apache/comet/CometConf.scala
@github-actions github-actions Bot added area:scan Parquet scan / data reading area:Iceberg area:Delta Delta Lake contrib (native scan, deletion vectors) labels Nov 25, 2026
@Abhishek-Mohan
Abhishek-Mohan marked this pull request as draft December 1, 2026 02:16
…-native

# Conflicts:
#	docs/source/contributor-guide/ci.md
#	docs/source/user-guide/latest/expressions.md
#	docs/source/user-guide/latest/in-memory-cache.md
#	docs/source/user-guide/latest/tuning/operators.md
@Abhishek-Mohan
Abhishek-Mohan marked this pull request as ready for review December 1, 2026 02:28
Correct claims the code contradicts (roadmap lambda support, V2 Text scans,
all-literal test coverage, lambda eligibility, sequence/sort_array/round
routing) and reword remaining N1/N4 phrases, including text main added.
Narrow the plain-query coverage claim, drop the by-construction claim, align
the Unsupported walkthrough with codegen dispatch, narrow the lambda tuning
guidance, relabel the FFI diagram's Rust side, and replace 'native ... reads'
with the N2 'scans'.
Qualify the dispatcher route with its Spark fallback, narrow the SQL test
coverage claim and the opt-in model on the compatibility page, align the
Incompatible() step with codegen dispatch, and fix the remaining 'native
... reads', 'native S3 readers' and 'native usage' wording.
Align the compatibility overview with automatic Rust selection, describe
allowIncompatible as permitting conversion rather than guaranteeing it, and
point at the specific COMET-INFO message that names an opt-in.
Scope the default-compatibility claim to expressions with an opt-in native
implementation, keep the dedicated-config exception in the routing
paragraph, describe 'imported from native' as an import-allocator charge,
and restore the examples reading of the dispatched regex list.
Scope the [COMET: ...] opt-in hint to incompatible cases, describe the JVM
Arrow remainder as an estimate, condition the lambda dispatcher route on
reading the lambda parameter, and note the chrono range limit on date casts
(apache#7471).
Note that CAST(date AS TIMESTAMP) can differ in UTC offset beyond
chrono-tz's DST horizon, scope the opt-in default to cases the planner
classifies as incompatible, name the dispatcher config in its fallback
reason, and rewrap.
Replace the 'classifies as (in)compatible' rule with whether Comet selects
the native implementation automatically, point at the sections that hold
the differences, note the straddling spring-forward gap in the date cast,
redefine the cast legend's C level, and drop 'instead' from the dispatcher
fallback reason.
Drop the 'knows to be compatible' and byte-exact dispatch claims, note
Arrow's representation limits for codegen dispatch, correct why the Rust
decimal kernels reject negative scales, and say the C cast level runs the
Rust cast.
Drop the remaining 'match Spark exactly' and byte-exact dispatch claims,
rename the compatibility overview heading, define the C cast level as
supported without an opt-in, stop calling the negative-scale cast list
exhaustive, and drop the date_trunc correctness claim.
Replace the routing promises in the expression compatibility indexes with a
link to the overview, drop the byte-exact JSON claim and the 1970-2100
compatibility guarantee, qualify the date_trunc opt-in, and scope the
make_interval limit to its time component.
Drop the blanket Spark-compatible claim for supported expressions, state
the JSON fallback rule once and allow for Spark fallback, scope the
make_interval row to the interval's time component, and rewrap the
date_trunc bullet.
Drop the default-support promise for ✅ expressions, which mode and the HLL
functions contradict, and the TimestampNTZ exception for date_trunc, which
Catalyst casts to TIMESTAMP first.
Say the not-planned families lack dedicated Rust implementations rather
than acceleration (make_valid_utf8 dispatches on Spark 4), scope
spark.comet.exec.enabled to most operators, allow a literal 1 frequency
for percentile, and drop the concat_ws all-foldable clause.
Drop the both-configs notes that Comet shuffle contradicts, stop saying each
operator can be turned off individually (the aggregates share one config),
and scope the array_contains nullable-array condition to float and double
arrays.
Drop the unconditional Parquet claim from spark.comet.enabled, name only
shuffle as independent of spark.comet.exec.enabled (the cache scan is not),
limit the sort example to SortExec, and remove the array_contains routing
sentence that the expression table already covers.
Say Comet can (not always does) revert a transition-heavy stage, drop the
'reverts every stage' note, scope the convert.parquet requirement to
Parquet, and key the cache-reader bullets to the scan that runs.
Add Comet and the in-memory cache setting to the fused cache reader's
requirements, drop 'as above any other Comet operator', say Comet can (not
always does) run adjacent operators as one plan, describe direct shuffle
read as allowed for eligible operators, and convert Parquet output rather
than its schema.
Describe the convert.* settings and broadcast build-side conversion as
allowing conversion of eligible scans rather than promising it, name
CometNativeExec in the strict fallback check, and tighten two wording nits.
Align the data source and Parquet pages, and the range and cache convert
settings, with the round-21 'allows ... eligible' wording, drop the
exclusivity claims about RDD checkpoint and build-side conversion, and
rewrap one cache line.
Scope MapSort to supported scalar keys, describe typed Dataset and range
conversion as allowed for eligible inputs, require whitelisted literal
patterns for date_format's to_char route, reorder the broadcast build-side
description, and rewrap two lines.
Restore the antecedent of 'those operators' in the RangeExec row, qualify
the range config description as eligible ranges Comet can generate, drop
the unconditional Parquet-write sentence, and say allow-list.
Require the default string collation for date_format's to_char route,
describe the Rust date range as chrono's, scope the S3A bypass to the
object_store and opendal connectors, and say the array_contains dispatch
cases apply by default.
Name object_store and opendal in the S3 design doc's executor bullet,
narrow the chrono failure sentence to some casts and date fields, limit
the READ bridge and location scoping to reads that use the bridge, and
rewrap the date_format sentence.
Describe the S3 bridge by connector rather than by Parquet and Iceberg (CSV
and Text scans use it too), say dispatcher output follows the
timestamp-labelling rules and that strict label checks validate output
batches, and say Rust exports FFI output buffers rather than allocating
them.
Drop 'a wrong label only shows up there', key the direct shuffle read
slot to the serialized ShuffleScan, separate stream-reader closure from
imported batch buffer lifetime, and align two S3 connector labels.
Say the Arrow interfaces share compatible buffers rather than copying
nothing, keep imported buffers live while any owner holds them, drop the
'comparing results cannot detect a label' absolute, describe the S3 bridge
without 'every request', and stop saying reservations are released only on
spill.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Delta Delta Lake contrib (native scan, deletion vectors) area:Iceberg area:scan Parquet scan / data reading documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: move existing pages to the style guide's "native" rules

3 participants