comphead commented on PR #2324:
URL: 
https://github.com/apache/arrow-datafusion/pull/2324#issuecomment-1107514476

   Implement math POWER function with signatures like 
[https://www.postgresql.org/docs/14/functions-math.html](url)
   
   
   Example usage
   >
           "SELECT power(i32, 3) as power_i32,
                    power(i64, 3) as power_i64,
                    power(f32, 3) as power_f32,
                    power(f64, 3) as power_f64,
                    power(2, 3) as power_int_scalar,
                    power(2.5, 3) as power_float_scalar
             FROM test";
   
   Output
   >
           
"+-----------+-----------+-----------+-----------+------------------+--------------------+",
           "| power_i32 | power_i64 | power_f32 | power_f64 | power_int_scalar 
| power_float_scalar |",
           
"+-----------+-----------+-----------+-----------+------------------+--------------------+",
           "| 8         | 8         | 1         | 1         | 8                
| 15.625             |",
           "| 125       | 125       | 15.625    | 15.625    | 8                
| 15.625             |",
           "| 0         | 0         | 0         | 0         | 8                
| 15.625             |",
           "| -2744     | -2744     | -3048.625 | -3048.625 | 8                
| 15.625             |",
           "|           |           |           |           | 8                
| 15.625             |",
           
"+-----------+-----------+-----------+-----------+------------------+--------------------+",


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