dbtsai opened a new pull request, #133: URL: https://github.com/apache/spark-connect-rust/pull/133
### What changes were proposed in this pull request? Derive input Decimal scale from the canonical string already obtained by the PyO3 converter when the object has exactly the Decimal class. This avoids materializing a DecimalTuple and its coefficient digits per input cell. Decimal subclasses retain the existing `str` then `as_tuple` fallback and exception behavior. Trailing zeros, signed zeros, E/e exponents and special-value scale handling are preserved. Based directly on master; no dependency on SPARK-60696's separate scientific-input parser fix. No core parser or workflow changes. ### Why are the changes needed? The unchanged client benchmark (10,000 x 3 Decimal cells, five fresh samples per client) improves tuple input from 23.049 to 15.321 ms (33.5%) and pandas input from 25.520 to 18.102 ms (29.1%). All 195 samples across 13 cases and three clients pass; all eleven unrelated guard timing ranges overlap. ### Does this PR introduce _any_ user-facing change? Faster construction from exact Python Decimal values. Existing value, inferred scale, subclass and error behavior are preserved. ### How was this patch tested? - 392 Rust library tests pass; all integration targets compile with/without wasm-udf; formatting and diff checks pass. Clippy is unavailable in the offline toolchain. - Existing CI-selected offline suite: 319 passed, including 45 new Decimal regressions. Unchanged master passes 44 behavior checks and fails the allocation sensitivity check as expected. - Independent Arrow IPC schema, validity and every Decimal128 cell validated for tuple/pandas and explicit/inferred schemas; eight explicit cases pass against the frozen official Python reference. - 28 special-value cases preserve exact master results/errors. 20,022 canonical strings match independently derived tuple scale. - 40 scientific IPC cases pass in each separate correctness-only environment with the same SPARK-60696 parser patch on both sides; payloads match byte-for-byte. That parser patch is absent from this PR and its performance measurements. - No JVM/live Spark server; separate-process localhost gRPC mock for IPC capture. Existing scientific parser limitations remain unchanged. ### 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]
