dbtsai opened a new pull request, #288:
URL: https://github.com/apache/spark-connect-rust/pull/288
### What changes were proposed in this pull request?
Keep a positive schema depth at least one after numeric conversion. With
`Fraction(1, 10**400)` or `Decimal("1e-1000")`, the current conversion
underflows to zero, which the tree renderer interprets as unlimited depth. A
request to print one level therefore prints the complete tree. This follow-up
to #131 clamps that positive conversion result and adds cases to the existing
exact-output tests for both `DataFrame.printSchema` and
`StructType.treeString`, including the no-ExecutePlan assertion.
### Why are the changes needed?
Follow-up to
[SPARK-60695](https://issues.apache.org/jira/browse/SPARK-60695). Positive
limits should remain bounded. Other floating-point normalization semantics are
unchanged; this does not claim exact arbitrary-number parity near every integer
boundary.
### Does this PR introduce any user-facing change?
Tiny positive numeric depth values print only top-level fields, as official
PySpark does, instead of printing all nested fields.
### How was this patch tested?
**Draft: source review is complete; compiled validation remains incomplete.**
- Official PySpark 4.2.0 produced the expected exact output for tiny
Fraction/Decimal values through both schema entry points, using an in-memory
schema holder for `DataFrame.printSchema`; this did not use a live server.
- Changed Python test source parses, `git diff --check` passes, and normal
commit hooks passed.
- Genuine local Claude Code 2.1.314 completed two full-patch source review
rounds (`system.ai.claude-fable-5-1`, session
`05614004-d1c5-419b-a553-9c0f07dc888d`). Codex assessed every finding; an
unverified formatting concern was disproved with official source/runtime
evidence, and final Claude review found no actionable source finding. Accepted
exact-number precision, UDT fallback and optional nits remain documented.
- The campaign-locked Cargo command acquired the lock but failed with
`FileNotFoundError: cargo`. Rust formatting/build/tests/Clippy, a rebuilt
native extension, native regression/offline tests, API comparison and the
applicable official parity gate have not run. No candidate runtime or CI pass
is claimed.
A separate read-only source assessment found no regression in the narrowed
change; it does not replace mandatory Claude review or compiled validation. The
earlier newline/documentation nits from #131 were already fixed by #169.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: OpenAI Codex (GPT-6).
This pull request and its description were written by Isaac.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]