HappenLee opened a new issue, #66687:
URL: https://github.com/apache/doris/issues/66687

   ### Search before asking
   
   - [x] I searched existing Apache Doris issues and pull requests and found no 
similar request or implementation.
   
   ### Description
   
   Doris master currently does not register a stack function in 
BuiltinTableGeneratingFunctions, and I could not find an equivalent built-in 
implementation.
   
   Please consider adding a Spark/Hive-compatible stack(num_rows, expr1, ..., 
exprN) table-generating function.
   
   Expected semantics:
   
   - num_rows must be a positive constant integer.
   - The remaining expressions are arranged in row-major order into num_rows 
rows.
   - The number of output columns is ceil(N / num_rows).
   - Missing values in the last row are padded with NULL.
   - Values that belong to the same output column should follow compatible type 
rules.
   
   For example, stack(2, 1, 2, 3) should produce:
   
       1, 2
       3, NULL
   
   Is anyone already working on this function? If not, is there interest in 
adding it to the Doris table-generating function framework?
   
   ### Use case
   
   This improves Spark/Hive SQL compatibility and reduces SQL rewrites when 
migrating workloads to Doris or using Doris in ecosystems that emit stack 
expressions.
   
   ### Related issues
   
   None found.
   
   ### Are you willing to submit PR?
   
   Not specified yet; first checking whether an implementation is already in 
progress.
   
   ### Code of Conduct
   
   - [x] I agree to follow this project Code of Conduct.


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