Ma77Ball opened a new pull request, #5416:
URL: https://github.com/apache/texera/pull/5416

   ### What changes were proposed in this PR?
   - Default `SortOpDesc.attributes` to `List.empty` instead of `null`, so a 
freshly dragged Sort operator no longer throws a NullPointerException when the 
compiler eagerly calls `generatePythonCode()` during schema propagation.
   - Add two `require` guards in `generatePythonCode()`: at least one sort key 
must exist, and every key must have a non-empty attribute, so a misconfigured 
operator surfaces a clear, actionable message instead of a raw NPE (the message 
is embedded into the generated code by the existing #3265 safety net).
   - Note for follow-up: `StableMergeSortOpDesc.keys` has the same `null` 
default but runs via `OpExecWithClassName` (no eager codegen), so it does not 
hit this compile-time NPE and is left unchanged here.
   ### Any related issues, documentation, or discussions?
   Closes: #3191
   ### How was this PR tested?
   - Build check: `sbt "WorkflowOperator/compile"`, expect a clean compile.
   - Manual: drag a Sort operator onto a workflow without adding any sort key, 
confirm no NullPointerException and that schema propagation / the attribute 
dropdown still work.
   - Manual: add a sort key row but leave the attribute unselected, confirm the 
operator reports "Each sort key must have an attribute selected." rather than 
crashing.
   ### Was this PR authored or co-authored using generative AI tooling?
   Co-authored with Claude Opus 4.8 in compliance with ASF


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