EeshanBembi commented on code in PR #18137:
URL: https://github.com/apache/datafusion/pull/18137#discussion_r2658920753
##########
datafusion/functions/src/string/concat.rs:
##########
@@ -65,13 +71,64 @@ impl Default for ConcatFunc {
impl ConcatFunc {
pub fn new() -> Self {
- use DataType::*;
Self {
- signature: Signature::variadic(
- vec![Utf8View, Utf8, LargeUtf8],
- Volatility::Immutable,
- ),
+ signature: Signature::user_defined(Volatility::Immutable),
+ }
+ }
+
+ /// Get the string type with highest precedence: Utf8View > LargeUtf8 >
Utf8
Review Comment:
Added documentation explaining the rationale:
```
/// Utf8View is preferred for performance (zero-copy views),
/// LargeUtf8 supports larger strings (i64 offsets),
/// Utf8 is the fallback standard string type
```
The precedence ensures we use the most efficient type when multiple string
types are mixed.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]