Skip to content

Commit

Permalink
rename array_make --> make_array
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb committed Jun 11, 2023
1 parent 0947cfd commit d91f667
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions datafusion/physical-expr/src/array_expressions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ pub fn array(values: &[ColumnarValue]) -> Result<ColumnarValue> {
Ok(ColumnarValue::Array(array_array(arrays.as_slice())?))
}

/// make_array SQL function
pub fn array_make(values: &[ColumnarValue]) -> Result<ColumnarValue> {
/// `make_array` SQL function
pub fn make_array(values: &[ColumnarValue]) -> Result<ColumnarValue> {
match values[0].data_type() {
DataType::Null => Ok(datafusion_expr::ColumnarValue::Scalar(
ScalarValue::new_list(Some(vec![]), DataType::Null),
Expand Down Expand Up @@ -354,7 +354,9 @@ pub fn array_concat(args: &[ColumnarValue]) -> Result<ColumnarValue> {
.build()
.unwrap();

return Ok(ColumnarValue::Array(Arc::new(make_array(list))));
return Ok(ColumnarValue::Array(Arc::new(arrow::array::make_array(
list,
))));
}
},
_ => Err(DataFusionError::NotImplemented(format!(
Expand Down
2 changes: 1 addition & 1 deletion datafusion/physical-expr/src/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ pub fn create_physical_fun(
Arc::new(array_expressions::array_to_string)
}
BuiltinScalarFunction::Cardinality => Arc::new(array_expressions::cardinality),
BuiltinScalarFunction::MakeArray => Arc::new(array_expressions::array_make),
BuiltinScalarFunction::MakeArray => Arc::new(array_expressions::make_array),
BuiltinScalarFunction::TrimArray => Arc::new(array_expressions::trim_array),

// string functions
Expand Down

0 comments on commit d91f667

Please sign in to comment.