fix: #10020 make concat function support array concatenation#19240
Closed
Manan005 wants to merge 1 commit intoapache:mainfrom
Closed
fix: #10020 make concat function support array concatenation#19240Manan005 wants to merge 1 commit intoapache:mainfrom
Manan005 wants to merge 1 commit intoapache:mainfrom
Conversation
martin-g
reviewed
Dec 11, 2025
Member
martin-g
left a comment
There was a problem hiding this comment.
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::*; |
Member
There was a problem hiding this comment.
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(_)), |
Member
There was a problem hiding this comment.
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(_))) { |
Member
There was a problem hiding this comment.
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(_, _)), |
Member
There was a problem hiding this comment.
- ScalarValue::List(_) accepts just one parameter
| vec![Utf8View, Utf8, LargeUtf8], | ||
| Volatility::Immutable, | ||
| signature: Signature::variadic_any(Volatility::Immutable) | ||
| ), |
| array_concat, | ||
| args, | ||
| ))) | ||
| } |
Member
There was a problem hiding this comment.
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}; |
Member
There was a problem hiding this comment.
BuiltinScalarFunction has been removed from DataFusion long time ago...
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?