wForget commented on code in PR #2425:
URL: https://github.com/apache/datafusion-comet/pull/2425#discussion_r2422702775
##########
native/spark-expr/src/conversion_funcs/cast.rs:
##########
@@ -1239,6 +1241,39 @@ fn cast_struct_to_struct(
}
}
+fn cast_array_to_string(
+ array: &ListArray,
+ spark_cast_options: &SparkCastOptions,
+) -> DataFusionResult<ArrayRef> {
+ let mut builder = StringBuilder::with_capacity(array.len(), array.len() *
16);
+ let mut str = String::with_capacity(array.len() * 16);
+ for row_index in 0..array.len() {
+ if array.is_null(row_index) {
+ builder.append_null();
+ } else {
+ str.clear();
+ let value_ref = array.value(row_index);
+ let native_cast_result = cast_array(value_ref, &Utf8,
spark_cast_options).unwrap();
Review Comment:
> BTW, does Rust/Comet have any tool for running micro‑benchmarks?
There is a documentation for cargo-bench:
https://datafusion.apache.org/comet/contributor-guide/profiling_native_code.html#running-micro-benchmarks-with-cargo-bench
--
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]