dbtsai opened a new pull request, #397:
URL: https://github.com/apache/spark-connect-rust/pull/397

   ### What changes were proposed in this pull request?
   
   Adapt Row-containing inferred columns after customized pandas DataFrame 
normalization, then use whole-column Arrow conversion to determine their types 
and values. Preserve the converted Arrow arrays, resolved column names, 
nullability, dictionary inference and conversion-safety settings. Explicit 
struct schemas, local-row construction and the fallback without PyArrow retain 
their existing behavior.
   
   ### Why are the changes needed?
   
   The native normalization path currently infers named `Row` values as 
structs. PySpark Connect's Arrow conversion treats them positionally as 
sequences, so the clients produce different inferred schemas and mixed-value 
conversion errors. The parity ledger records the remaining normalization-hook 
and conversion limits.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. On the current development branch, a customized pandas frame containing 
`Row(a=1, b=2)` in an inferred object column produces 
`struct<a:bigint,b:bigint>`. This change produces `array<bigint>` with value 
`[1, 2]`, matching PySpark Connect. Nested Rows, numeric and Decimal inference, 
short Row values and incompatible mixed values follow the corresponding Arrow 
conversion behavior.
   
   ### How was this patch tested?
   
   Added and updated tests cover inferred Rows, nested and mixed values, 
dictionary inference, conversion-safety settings and error behavior.
   
   - Offline Python suites: **2,682 passed**, including **all 125 required 
cases**; **8 inherited live-only tests skipped** because they require 
`SPARK_REMOTE`.
   - General pandas live regressions: **8/8 passed**. API introspection found 
no missing members across the **12 compared classes**; Row has no missing 
members and remains a tuple subclass.
   - Bounded reference/native conversion observations: **35/35 matched** (20 
successful conversions and 15 expected errors). The equality projection 
compares logical types, names, nullability, values and errors; recorded raw 
Arrow schema/type strings are excluded. The 19 raw Arrow schema-header 
differences contain only the top-level internal placeholder name before the 
final column alias. These comparisons also exclude raw IPC bytes, chunking and 
schema metadata.
   - Paired high-level client checks against an actual JVM: **39/39 passed in 
each client**, comprising **24 schema/ordered-collection successes and 15 
expected conversion errors**. All 39 compared projections match, including full 
schema JSON, row field names, ordered values, requested settings and exact 
error fields.
   - Advisory Clippy: **exit 101**. Focused binding-library lint reached the 
final source and emitted **125 errors in unchanged master source**. No 
diagnostic overlaps changed source spans, and neither corrected error closure 
emitted a diagnostic. This is an attributed failed lint run.
   
   The release Rust library tests, formatting, all integration-test compilation 
with and without `wasm-udf`, and native extension build passed. The final 
full-patch review reported no remaining actionable source findings.
   
   The official Python suite executed through this patch's Rust transport: **87 
ordinary modules, 2,586 passed and 641 skipped**, with zero unexpected failures 
or errors. One catalog test was deselected by the existing environment manifest 
and reconfirmed as an expected missing-test-catalog failure by its drift check. 
The separate local-cluster/resource phase completed **4 modules, 15 passed and 
14 skipped**, with zero unexpected failures or errors. These are transport 
results; native inference is covered by the separate offline and paired JVM 
checks above. No complete pandas or performance parity is claimed.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: OpenAI Codex
   
   This pull request and its description were written by OpenAI Codex.
   


-- 
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]

Reply via email to