Weijun-H commented on code in PR #9023:
URL: https://github.com/apache/arrow-datafusion/pull/9023#discussion_r1468730259
##########
datafusion/physical-expr/src/array_expressions.rs:
##########
@@ -2766,6 +2766,72 @@ where
)?))
}
+/// array_reverse SQL function
+pub fn array_reverse(arg: &[ArrayRef]) -> Result<ArrayRef> {
+ if arg.len() != 1 {
+ return exec_err!("array_reverse needs one argument");
+ }
+
+ match &arg[0].data_type() {
+ DataType::List(field) => {
+ let array = as_list_array(&arg[0])?;
+ general_array_reverse::<i32>(array, &field)
+ }
+ DataType::LargeList(field) => {
+ let array = as_large_list_array(&arg[0])?;
+ general_array_reverse::<i64>(array, &field)
+ }
+ DataType::Null => Ok(arg[0].clone()),
Review Comment:
It is still working on other pr, so I added a TODO test in slt.
--
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]