Skip to content

Conversation

@Manan005
Copy link

@Manan005 Manan005 commented Dec 9, 2025

Which issue does this PR close?

  • Closes #.

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added the functions Changes to functions implementation label Dec 9, 2025
Copy link
Member

@martin-g martin-g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like AI-generated code.

  • it has several compilation errors
  • it uses structs removed long time ago (e.g. BuiltinScalarFunction)
  • there are no tests


// Check if any argument is an array type
fn has_array_args(args: &[ColumnarValue]) -> bool {
use arrow::datatypes::DataType::*;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
use arrow::datatypes::DataType::*;

fn has_array_args(args: &[ColumnarValue]) -> bool {
use arrow::datatypes::DataType::*;
args.iter().any(|arg| match arg {
ColumnarValue::Array(arr) => matches!(arr.data_type(), List(_)),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ColumnarValue::Array(arr) => matches!(arr.data_type(), List(_)),
ColumnarValue::Array(arr) => matches!(arr.data_type(), DataType::List(_)),

use DataType::*;

// If any argument is an array, return the array type
if arg_types.iter().any(|t| matches!(t, List(_))) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This if is not really needed. The inner one does the same.

use arrow::datatypes::DataType::*;
args.iter().any(|arg| match arg {
ColumnarValue::Array(arr) => matches!(arr.data_type(), List(_)),
ColumnarValue::Scalar(scalar) => matches!(scalar, ScalarValue::List(_, _)),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

List(Arc<ListArray>),
- ScalarValue::List(_) accepts just one parameter

vec![Utf8View, Utf8, LargeUtf8],
Volatility::Immutable,
signature: Signature::variadic_any(Volatility::Immutable)
),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
),
,

array_concat,
args,
)))
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}
}
}

to close the impl block

use datafusion_expr::expr::{ScalarFunction, ScalarFunctionExpr};
use datafusion_expr::simplify::{ExprSimplifyResult, SimplifyInfo};
use datafusion_expr::{ColumnarValue, Documentation, Expr, Volatility, lit};
use datafusion_expr::{ColumnarValue, Documentation, Expr, Volatility, lit, BuiltinScalarFunction};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BuiltinScalarFunction has been removed from DataFusion long time ago...

@Jefffrey
Copy link
Contributor

I am closing this PR since:

We welcome contributions from the community, but please ensure appropriate effort has been put into PRs to make it easier for us to review them.

@Jefffrey Jefffrey closed this Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

functions Changes to functions implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants