FelixYBW commented on issue #12263:
URL: https://github.com/apache/gluten/issues/12263#issuecomment-4676604316
Arrow UDTF:
```python
from pyspark.sql.functions import lit, udtf
import math
@udtf(returnType="num: int, square: int, cube: int, factorial: int",
useArrow=True)
class GenerateComplexNumbers:
def eval(self, start: int, end: int):
for num in range(start, end + 1):
yield (num, num ** 2, num ** 3, math.factorial(num))
GenerateComplexNumbers(lit(1), lit(10)).show()
```
<img width="334" height="820" alt="Image"
src="https://github.com/user-attachments/assets/04cd1c04-cfcc-426a-af37-ddd45980e79f"
/>
See if we can make a general solution. Let's submit PRs to upstream Spark if
we need to. @zhztheplayer @JkSelf
--
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]