xiedeyantu opened a new pull request, #21226:
URL: https://github.com/apache/datafusion/pull/21226

   ## Which issue does this PR close?
   
   - Closes #.
   
   ## Rationale for this change
   
   DataFusion already supports tuple-like and `STRUCT` comparisons, but the 
user-facing documentation did not clearly describe the current comparison 
semantics, especially around lexicographical ordering and `NULL` handling. The 
`IN` documentation also did not explain tuple-like values.
   
   ## What changes are included in this PR?
   
   - Added a short `STRUCT` comparison note to 
[struct_coercion.md](/Users/jensen/code/datafusion/docs/source/user-guide/sql/struct_coercion.md),
 documenting that:
     - `STRUCT` values support standard comparison operators
     - comparisons are lexicographical by field order
     - `NULL` is ordered before non-`NULL`
   - Added minimal examples for `STRUCT` comparisons, including a `NULL` example
   - Added a short note to 
[subqueries.md](/Users/jensen/code/datafusion/docs/source/user-guide/sql/subqueries.md)
 explaining that tuple-like `IN` uses DataFusion's struct equality semantics
   - Added a concrete example:
     - `SELECT (7521, 30) IN ((7521, NULL));`
     - result: `false`
   
   ## Are these changes tested?
   
   No new tests were added. This PR only updates documentation for existing 
behavior, and the documented behavior is already covered by existing 
tuple/struct comparison and `IN` tests.
   
   ## Are there any user-facing changes?
   
   Yes. This PR updates the SQL user documentation to clarify the current 
semantics of `STRUCT` comparisons and tuple-like `IN` expressions.


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