sunchao commented on code in PR #5874:
URL: https://github.com/apache/datafusion-comet/pull/5874#discussion_r3997470490


##########
native/core/src/execution/jni_api.rs:
##########
@@ -775,6 +776,7 @@ fn register_datafusion_spark_function(session_ctx: 
&SessionContext) {
     
session_ctx.register_udf(ScalarUDF::new_from_impl(SparkBitShift::right_unsigned()));
     
session_ctx.register_udf(ScalarUDF::new_from_impl(SparkSoundex::default()));
     
session_ctx.register_udf(ScalarUDF::new_from_impl(SparkSubstring::default()));
+    
session_ctx.register_udf(ScalarUDF::new_from_impl(SparkLengthFunc::default()));

Review Comment:
   ### Performance
   
   [P2] Could you add a representative `length(binary)` microbenchmark and 
report Spark-versus-Comet results before enabling this path? This registration 
also replaces the existing string implementation, so please include a 
base-versus-head string comparison. The current 
`CometStringExpressionBenchmark` only calls `length(c1)` on 1,024 string rows, 
and this PR contains no binary timings. The added 1,000-row Scala cases verify 
answers and native plans, but do not measure performance. Short and long binary 
values, nulls, and repeated versus varied values would establish the benefit of 
the new path and check the existing string path for regressions.



-- 
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]

Reply via email to