Milesian111 opened a new pull request, #29078:
URL: https://github.com/apache/flink/pull/29078

   ## What is the purpose of the change
   
   This pull request adds sorting support to the PyFlink DataFrame API. It 
introduces a lazy `DataFrame.sort()` transformation backed by the existing 
Table API `order_by()` operation, allowing users to sort by one or more columns 
or expressions without triggering execution.
   
   ## Brief change log
   
   - Added `DataFrame.sort()` with support for single-column and multi-column 
sorting.
   - Added scalar and per-column `descending` options.
   - Added scalar and per-column `nulls_first` options.
   - Added validation to reject expressions that already contain `.asc` or 
`.desc`.
   - Kept sorting lazy and ensured the original DataFrame remains unchanged.
   - Added public API documentation.
   
   ## Verifying this change
   
   This change added focused tests covering:
   
   - Single-column and multi-column sorting.
   - Expression-based sorting.
   - Scalar and per-column sort directions.
   - Explicit NULL ordering.
   - Invalid inputs and mismatched option lengths.
   - Lazy plan construction and DataFrame immutability.
   - Batch execution with deterministic ordering and NULL handling.
   
   The focused sorting tests and complete DataFrame batch integration tests 
pass locally. The full DataFrame test module has one unrelated Windows-only 
failure involving pre-epoch timestamp conversion in `time.mktime`.
   
   ## Does this pull request potentially affect one of the following parts:
   
   - Dependencies: no
   - The public API: yes
   - The serializers: no
   - The runtime per-record code paths: no
   - Anything that affects deployment or recovery: no
   - The S3 file system connector: no
   
   ## Documentation
   
   - Does this pull request introduce a new feature? yes
   - If yes, how is the feature documented? docs
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes
   
   Generated-by: Codex GPT-5


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

Reply via email to