parthchandra commented on code in PR #2286:
URL: https://github.com/apache/datafusion-comet/pull/2286#discussion_r2353569875
##########
native/spark-expr/src/predicate_funcs/rlike.rs:
##########
@@ -47,19 +46,18 @@ pub struct RLike {
pattern: Regex,
}
-impl Hash for RLike {
- fn hash<H: Hasher>(&self, state: &mut H) {
- state.write(self.pattern_str.as_bytes());
+impl PartialEq for RLike {
+ fn eq(&self, other: &Self) -> bool {
+ self.pattern_str == other.pattern_str
Review Comment:
I don't know. I feel it is more correct to have `PartialEq/Eq` consistent
with `Hash`. I'm not sure what impact it has on `rlike` though.
##########
native/core/src/execution/planner.rs:
##########
@@ -622,8 +623,13 @@ impl PhysicalPlanner {
let args = vec![child];
let comet_hour =
Arc::new(ScalarUDF::new_from_impl(SparkHour::new(timezone)));
let field_ref = Arc::new(Field::new("hour", DataType::Int32,
true));
- let expr: ScalarFunctionExpr =
- ScalarFunctionExpr::new("hour", comet_hour, args,
field_ref);
+ let expr: ScalarFunctionExpr = ScalarFunctionExpr::new(
+ "hour",
+ comet_hour,
+ args,
+ field_ref,
+ Arc::new(ConfigOptions::default()),
Review Comment:
> Instead of possibly instantiating multiple default `ConfigOptions`, in the
future we stash one somewhere. This would have the benefits of:
>
> 1. A custom config would propagate throughout
> 2. Reduced memory overhead
That would be in the `ExecutionContext` perhaps?
--
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]