Samearth17 opened a new pull request, #6651:
URL: https://github.com/apache/datafusion-comet/pull/6651

   ## Which issue does this PR close?
   
   Closes #6592.
   
   ## Rationale for this change
   
   Spark accepts duplicate field names in a `from_json` struct schema, but the 
native result cannot be transferred through Arrow's JVM struct representation 
with those duplicate children. Fall back to Spark's JSON expression before 
constructing that native result.
   
   ## What changes are included in this PR?
   
   - Reject duplicate sibling field names at any level of a native `from_json` 
struct schema using the existing `DataTypeSupport` helper.
   - Add top-level and nested duplicate-field regressions that compare against 
Spark's answer and assert the fallback path.
   
   ## How are these changes tested?
   
   - `make core` (passed on macOS arm64)
   - `./mvnw test -Dtest=none 
-Dsuites=org.apache.comet.CometJsonExpressionSuite` (9 passed on Spark 4.1 / 
JDK 17)
   - The Maven test lifecycle passed Scalastyle and Spotless checks.
   - `git diff --check` passed.
   


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