yew1eb opened a new issue, #1688:
URL: https://github.com/apache/auron/issues/1688

   **Describe the bug**
   
   using lpad(str, len, pad) or rpad(str, len, pad) with len as Int32 (Spark 
IntegerType) causes native execution to panic. Our lpad/rpad map to DataFusion 
implementations, whose signatures expect the second argument len to be Int64. 
The type mismatch leads to a cast failure and a runtime panic on the native 
side.
   
   <img width="709" height="593" alt="Image" 
src="https://github.com/user-attachments/assets/c2f57372-49e3-48af-84fa-1eb3d2742250";
 />
   
   
   **To Reproduce**  
   Run:
   ```
   CREATE TABLE pad_tbl(id INT, txt STRING, len INT, pad STRING) USING parquet;
   INSERT INTO pad_tbl VALUES(1, 'abc', 5, 'x');
   SELECT LPAD(txt, len, pad), rpad(txt, len, pad) FROM pad_tbl;
   ```
   
   Observed Error:   
   ```
   Caused by: java.lang.RuntimeException: java.lang.RuntimeException: poll 
record batch error:
   Execution error: native execution panics: Execution error: Execution error: 
output_with_sender[Project] error:
   Execution error: output_with_sender[Project]: output() returns error:
   Internal error: could not cast array of type Int32 to 
   
arrow_array::array::primitive_array::PrimitiveArray<arrow_array::types::Int64Type>
   ```


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