Skip to content

Commit b579e60

Browse files
authored
Using try_append_value from arrow-rs 57.0.0 (#18313)
## Which issue does this PR close? Avoid panic described #17857 by using `try_append_value` ## Rationale for this change Avoid panic described in #17857. ## Are these changes tested? Code is already covered by tests ## Are there any user-facing changes? No
1 parent 2d004af commit b579e60

File tree

1 file changed

+4
-4
lines changed
  • datafusion/physical-expr/src/expressions/binary

1 file changed

+4
-4
lines changed

datafusion/physical-expr/src/expressions/binary/kernels.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ pub fn concat_elements_utf8view(
166166
buffer.clear();
167167
write!(&mut buffer, "{left}{right}")
168168
.expect("writing into string buffer failed");
169-
result.append_value(&buffer);
169+
result.try_append_value(&buffer)?;
170170
} else {
171171
// at least one of the values is null, so the output is also null
172172
result.append_null()
@@ -260,13 +260,13 @@ pub(crate) fn regex_match_dyn_scalar(
260260
let result: Result<ArrayRef> = match left.data_type() {
261261
DataType::Utf8 => {
262262
regexp_is_match_flag_scalar!(left, right, StringArray, not_match, flag)
263-
},
263+
}
264264
DataType::Utf8View => {
265265
regexp_is_match_flag_scalar!(left, right, StringViewArray, not_match, flag)
266266
}
267267
DataType::LargeUtf8 => {
268268
regexp_is_match_flag_scalar!(left, right, LargeStringArray, not_match, flag)
269-
},
269+
}
270270
DataType::Dictionary(_, _) => {
271271
let values = left.as_any_dictionary().values();
272272

@@ -288,7 +288,7 @@ pub(crate) fn regex_match_dyn_scalar(
288288
_ => unreachable!(),
289289
}
290290
)
291-
},
291+
}
292292
other => internal_err!(
293293
"Data type {} not supported for operation 'regex_match_dyn_scalar' on string array",
294294
other

0 commit comments

Comments
 (0)