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

   ### What changes were proposed in this PR?
   
   Clear messages for the common Python UDF mistakes that show up while the 
workflow runs:
   
   - **`return` instead of `yield`** in `process_tuple`, `process_batch`, 
`process_table` or `produce` now says `process_table must yield results, not 
return them. Replace return x with yield x.` Before, users saw 
`pampy.MatchError: '_' not provided` or `'NoneType' object is not iterable`. 
Returning a list still works.
   - **`__init__` without `super().__init__()`** on a table or batch UDF no 
longer crashes with `'_TableOperator__table_data'`. The buffers are created on 
first use, the same way `Operator` already creates its template decoder.
   - **A dict of DataFrames** now says to yield the DataFrame itself.
   - **Output columns that don't match** now point to "Retain input columns" 
and "Extra output column(s)" in the property panel.
   
   Before and after, in the Console:
   
   | Before | After |
   |---|---|
   | `[upload: runtime-before.png]` | `[upload: runtime-after.png]` |
   
   ### Any related issues, documentation, discussions?
   
   Part of #8736. Split out of #8737.
   
   ### How was this PR tested?
   
   New tests in `test_operator.py` (each `return` case, a returned list still 
working, table and batch UDFs without `super().__init__()`) and 
`test_data_processor.py` (`process_tuple` returning a value, a dict of 
DataFrames, a schema mismatch). `cd amber && pytest -m "not integration"` 
passes, and ruff is clean. The screenshots are from a local Texera built from 
this change.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Claude Opus 5.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