You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "mbutrovich (via GitHub)" <gi...@apache.org> on 2025/09/02 20:12:12 UTC
[PR] chore: test DataFusion 50 [datafusion-comet]
mbutrovich opened a new pull request, #2286:
URL: https://github.com/apache/datafusion-comet/pull/2286
## Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
-->
Closes #.
## Rationale for this change
<!--
Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
-->
testing DataFusion 50
## What changes are included in this PR?
<!--
There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
-->
## How are these changes tested?
<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code
If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
-->
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: upgrade to DataFusion 50.0.0, Arrow 56.1.0, Parquet 56.0.0 among others [datafusion-comet]
Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on code in PR #2286:
URL: https://github.com/apache/datafusion-comet/pull/2286#discussion_r2353571004
##########
native/spark-expr/src/comet_scalar_funcs.rs:
##########
@@ -192,6 +192,24 @@ struct CometScalarFunction {
func: ScalarFunctionImplementation,
}
+impl PartialEq for CometScalarFunction {
+ fn eq(&self, other: &Self) -> bool {
+ self.name == other.name
+ && self.signature == other.signature
+ && self.data_type == other.data_type
Review Comment:
if we do not depend on the behavior, and we do not have tests, perhaps it is better to have them call `unimplemented!()` instead?
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: upgrade to DataFusion 50.0.0 [datafusion-comet]
Posted by "mbutrovich (via GitHub)" <gi...@apache.org>.
mbutrovich commented on code in PR #2286:
URL: https://github.com/apache/datafusion-comet/pull/2286#discussion_r2353167412
##########
native/spark-expr/src/comet_scalar_funcs.rs:
##########
@@ -192,6 +192,24 @@ struct CometScalarFunction {
func: ScalarFunctionImplementation,
}
+impl PartialEq for CometScalarFunction {
+ fn eq(&self, other: &Self) -> bool {
+ self.name == other.name
+ && self.signature == other.signature
+ && self.data_type == other.data_type
Review Comment:
We don't have any way to compare or hash the `ScalarFunctionImplementation` field. Is that okay?
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: upgrade to DataFusion 50.0.0 [datafusion-comet]
Posted by "mbutrovich (via GitHub)" <gi...@apache.org>.
mbutrovich commented on code in PR #2286:
URL: https://github.com/apache/datafusion-comet/pull/2286#discussion_r2353173529
##########
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:
`PartialEq` only looks at the `pattern_str` and not the child. I think I'd have to clone the `Arc` to do the comparison, and I'm not sure that's the behavior we want. However, the hasher hashes the child. What do we think?
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: upgrade to DataFusion 50.0.0, Arrow 56.1.0, Parquet 56.0.0 among others [datafusion-comet]
Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on code in PR #2286:
URL: https://github.com/apache/datafusion-comet/pull/2286#discussion_r2353476662
##########
native/spark-expr/src/comet_scalar_funcs.rs:
##########
@@ -192,6 +192,24 @@ struct CometScalarFunction {
func: ScalarFunctionImplementation,
}
+impl PartialEq for CometScalarFunction {
+ fn eq(&self, other: &Self) -> bool {
+ self.name == other.name
+ && self.signature == other.signature
+ && self.data_type == other.data_type
Review Comment:
I don't think that Comet depends on these hash implementations?
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: upgrade to DataFusion 50.0.0, Arrow 56.1.0, Parquet 56.0.0 among others [datafusion-comet]
Posted by "mbutrovich (via GitHub)" <gi...@apache.org>.
mbutrovich commented on code in PR #2286:
URL: https://github.com/apache/datafusion-comet/pull/2286#discussion_r2353353501
##########
native/Cargo.toml:
##########
@@ -31,15 +31,15 @@ license = "Apache-2.0"
edition = "2021"
# Comet uses the same minimum Rust version as DataFusion
-rust-version = "1.85"
+rust-version = "1.86"
[workspace.dependencies]
-arrow = { version = "55.2.0", features = ["prettyprint", "ffi", "chrono-tz"] }
+arrow = { version = "56.0.0", features = ["prettyprint", "ffi", "chrono-tz"] }
Review Comment:
Good catch. I locked Parquet to 56.0.0.
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: upgrade to DataFusion 50.0.0 [datafusion-comet]
Posted by "mbutrovich (via GitHub)" <gi...@apache.org>.
mbutrovich commented on code in PR #2286:
URL: https://github.com/apache/datafusion-comet/pull/2286#discussion_r2353160173
##########
native/core/src/execution/shuffle/shuffle_writer.rs:
##########
@@ -1350,7 +1350,7 @@ mod test {
#[tokio::test]
async fn shuffle_repartitioner_memory() {
let batch = create_batch(900);
- assert_eq!(8376, batch.get_array_memory_size());
+ assert_eq!(8316, batch.get_array_memory_size());
Review Comment:
Arrow changed this calculation.
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: upgrade to DataFusion 50.0.0 [datafusion-comet]
Posted by "mbutrovich (via GitHub)" <gi...@apache.org>.
mbutrovich commented on PR #2286:
URL: https://github.com/apache/datafusion-comet/pull/2286#issuecomment-3299105118
Note that there's discussion of DF 50.0.1, but I want to unblock a few features and fixes that are waiting on 50, so let's get 50.0.0 in first.
https://github.com/apache/datafusion/issues/17594
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: upgrade to DataFusion 50.0.0, Arrow 56.1.0, Parquet 56.0.0 among others [datafusion-comet]
Posted by "mbutrovich (via GitHub)" <gi...@apache.org>.
mbutrovich commented on code in PR #2286:
URL: https://github.com/apache/datafusion-comet/pull/2286#discussion_r2353659008
##########
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 made it consistent with `Hash`.
##########
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 made it consistent with `Hash`. Thanks for the sanity check!
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: upgrade to DataFusion 50.0.0 [datafusion-comet]
Posted by "mbutrovich (via GitHub)" <gi...@apache.org>.
mbutrovich commented on code in PR #2286:
URL: https://github.com/apache/datafusion-comet/pull/2286#discussion_r2353161888
##########
native/spark-expr/src/agg_funcs/covariance.rs:
##########
@@ -38,14 +38,23 @@ use std::sync::Arc;
/// The implementation mostly is the same as the DataFusion's implementation. The reason
/// we have our own implementation is that DataFusion has UInt64 for state_field count,
/// while Spark has Double for count.
-#[derive(Debug, Clone)]
+#[derive(Debug, Clone, PartialEq, Eq)]
pub struct Covariance {
name: String,
signature: Signature,
stats_type: StatsType,
null_on_divide_by_zero: bool,
}
+impl std::hash::Hash for Covariance {
+ fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
+ self.name.hash(state);
+ self.signature.hash(state);
+ (self.stats_type as u8).hash(state);
Review Comment:
StatsType does not implement Hash, so here we do a cast. `std::mem::discriminant` is the solution if the enum gets any more complex.
##########
native/spark-expr/src/agg_funcs/covariance.rs:
##########
@@ -38,14 +38,23 @@ use std::sync::Arc;
/// The implementation mostly is the same as the DataFusion's implementation. The reason
/// we have our own implementation is that DataFusion has UInt64 for state_field count,
/// while Spark has Double for count.
-#[derive(Debug, Clone)]
+#[derive(Debug, Clone, PartialEq, Eq)]
pub struct Covariance {
name: String,
signature: Signature,
stats_type: StatsType,
null_on_divide_by_zero: bool,
}
+impl std::hash::Hash for Covariance {
+ fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
+ self.name.hash(state);
+ self.signature.hash(state);
+ (self.stats_type as u8).hash(state);
Review Comment:
`StatsType` does not implement Hash, so here we do a cast. `std::mem::discriminant` is the solution if the enum gets any more complex.
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: upgrade to DataFusion 50.0.0, Arrow 56.1.0, Parquet 56.0.0 among others [datafusion-comet]
Posted by "mbutrovich (via GitHub)" <gi...@apache.org>.
mbutrovich merged PR #2286:
URL: https://github.com/apache/datafusion-comet/pull/2286
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: upgrade to DataFusion 50.0.0 and Arrow 56.1.0, among other dependencies [datafusion-comet]
Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on code in PR #2286:
URL: https://github.com/apache/datafusion-comet/pull/2286#discussion_r2353256851
##########
native/core/src/execution/shuffle/shuffle_writer.rs:
##########
@@ -1350,7 +1350,7 @@ mod test {
#[tokio::test]
async fn shuffle_repartitioner_memory() {
let batch = create_batch(900);
- assert_eq!(8376, batch.get_array_memory_size());
+ assert_eq!(8316, batch.get_array_memory_size());
Review Comment:
lets add a comment that this value is not stable for Arrow version to version upgrade?
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: upgrade to DataFusion 50.0.0 and Arrow 56.1.0, among other dependencies [datafusion-comet]
Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on PR #2286:
URL: https://github.com/apache/datafusion-comet/pull/2286#issuecomment-3299820850
For scalar functions partialEqs the DF relies on builtin mechanism
```
/// Implements [`ScalarUDFImpl`] for functions that have a single signature and
/// return type.
#[derive(PartialEq, Eq, Hash)]
pub struct SimpleScalarUDF {
name: String,
signature: Signature,
return_type: DataType,
fun: PtrEq<ScalarFunctionImplementation>,
}
```
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: upgrade to DataFusion 50.0.0, Arrow 56.1.0, Parquet 56.0.0 among others [datafusion-comet]
Posted by "parthchandra (via GitHub)" <gi...@apache.org>.
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: upgrade to DataFusion 50.0.0, Arrow 56.1.0, Parquet 56.0.0 among others [datafusion-comet]
Posted by "mbutrovich (via GitHub)" <gi...@apache.org>.
mbutrovich commented on code in PR #2286:
URL: https://github.com/apache/datafusion-comet/pull/2286#discussion_r2353705098
##########
native/spark-expr/src/comet_scalar_funcs.rs:
##########
@@ -192,6 +192,24 @@ struct CometScalarFunction {
func: ScalarFunctionImplementation,
}
+impl PartialEq for CometScalarFunction {
+ fn eq(&self, other: &Self) -> bool {
+ self.name == other.name
+ && self.signature == other.signature
+ && self.data_type == other.data_type
Review Comment:
Nevermind, they do get hashed in planner's `test_array_repeat` test.
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: upgrade to DataFusion 50.0.0 and Arrow 56.1.0, among other dependencies [datafusion-comet]
Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on code in PR #2286:
URL: https://github.com/apache/datafusion-comet/pull/2286#discussion_r2353276984
##########
native/Cargo.toml:
##########
@@ -31,15 +31,15 @@ license = "Apache-2.0"
edition = "2021"
# Comet uses the same minimum Rust version as DataFusion
-rust-version = "1.85"
+rust-version = "1.86"
[workspace.dependencies]
-arrow = { version = "55.2.0", features = ["prettyprint", "ffi", "chrono-tz"] }
+arrow = { version = "56.0.0", features = ["prettyprint", "ffi", "chrono-tz"] }
Review Comment:
so we keep arrow 56.0 because of https://github.com/apache/datafusion/issues/17575 ?
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: prepare for DataFusion 50 [datafusion-comet]
Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on PR #2286:
URL: https://github.com/apache/datafusion-comet/pull/2286#issuecomment-3298866701
@mbutrovich DataFusion 50 has now been released
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: prepare for DataFusion 50 [datafusion-comet]
Posted by "mbutrovich (via GitHub)" <gi...@apache.org>.
mbutrovich commented on PR #2286:
URL: https://github.com/apache/datafusion-comet/pull/2286#issuecomment-3299025781
> @mbutrovich DataFusion 50 has now been released
Yep I'm testing this morning and will update the PR.
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: upgrade to DataFusion 50.0.0 [datafusion-comet]
Posted by "mbutrovich (via GitHub)" <gi...@apache.org>.
mbutrovich commented on code in PR #2286:
URL: https://github.com/apache/datafusion-comet/pull/2286#discussion_r2353163786
##########
native/spark-expr/src/predicate_funcs/rlike.rs:
##########
@@ -47,19 +46,19 @@ 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
}
}
-impl DynEq for RLike {
- fn dyn_eq(&self, other: &dyn Any) -> bool {
- if let Some(other) = other.downcast_ref::<Self>() {
Review Comment:
The old `DynEq` implementation did not look at the child. Is that expected?
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: upgrade to DataFusion 50.0.0 [datafusion-comet]
Posted by "mbutrovich (via GitHub)" <gi...@apache.org>.
mbutrovich commented on code in PR #2286:
URL: https://github.com/apache/datafusion-comet/pull/2286#discussion_r2353165249
##########
native/spark-expr/src/predicate_funcs/rlike.rs:
##########
@@ -47,19 +46,19 @@ 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
}
}
-impl DynEq for RLike {
- fn dyn_eq(&self, other: &dyn Any) -> bool {
- if let Some(other) = other.downcast_ref::<Self>() {
- self.pattern_str == other.pattern_str
- } else {
- false
- }
+impl Eq for RLike {}
+
+impl Hash for RLike {
+ fn hash<H: Hasher>(&self, state: &mut H) {
+ self.child.hash(state);
Review Comment:
The new implementation hashes the child.
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: upgrade to DataFusion 50.0.0, Arrow 56.1.0, Parquet 56.0.0 among others [datafusion-comet]
Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on code in PR #2286:
URL: https://github.com/apache/datafusion-comet/pull/2286#discussion_r2353476662
##########
native/spark-expr/src/comet_scalar_funcs.rs:
##########
@@ -192,6 +192,24 @@ struct CometScalarFunction {
func: ScalarFunctionImplementation,
}
+impl PartialEq for CometScalarFunction {
+ fn eq(&self, other: &Self) -> bool {
+ self.name == other.name
+ && self.signature == other.signature
+ && self.data_type == other.data_type
Review Comment:
I don't think that Comet depends on these hash/eq implementations?
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: upgrade to DataFusion 50.0.0, Arrow 56.1.0, Parquet 56.0.0 among others [datafusion-comet]
Posted by "mbutrovich (via GitHub)" <gi...@apache.org>.
mbutrovich commented on code in PR #2286:
URL: https://github.com/apache/datafusion-comet/pull/2286#discussion_r2353648906
##########
native/spark-expr/src/comet_scalar_funcs.rs:
##########
@@ -192,6 +192,24 @@ struct CometScalarFunction {
func: ScalarFunctionImplementation,
}
+impl PartialEq for CometScalarFunction {
+ fn eq(&self, other: &Self) -> bool {
+ self.name == other.name
+ && self.signature == other.signature
+ && self.data_type == other.data_type
Review Comment:
I like this approach.
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: upgrade to DataFusion 50.0.0 [datafusion-comet]
Posted by "mbutrovich (via GitHub)" <gi...@apache.org>.
mbutrovich commented on code in PR #2286:
URL: https://github.com/apache/datafusion-comet/pull/2286#discussion_r2353158626
##########
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
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: upgrade to DataFusion 50.0.0 and Arrow 56.1.0, among other dependencies [datafusion-comet]
Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on code in PR #2286:
URL: https://github.com/apache/datafusion-comet/pull/2286#discussion_r2353255107
##########
native/Cargo.toml:
##########
@@ -34,12 +34,12 @@ edition = "2021"
rust-version = "1.85"
Review Comment:
```suggestion
rust-version = "1.86"
```
DF is already 1.86
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: upgrade to DataFusion 50.0.0, Arrow 56.1.0, Parquet 56.0.0 among others [datafusion-comet]
Posted by "mbutrovich (via GitHub)" <gi...@apache.org>.
mbutrovich commented on code in PR #2286:
URL: https://github.com/apache/datafusion-comet/pull/2286#discussion_r2353513076
##########
native/spark-expr/src/comet_scalar_funcs.rs:
##########
@@ -192,6 +192,24 @@ struct CometScalarFunction {
func: ScalarFunctionImplementation,
}
+impl PartialEq for CometScalarFunction {
+ fn eq(&self, other: &Self) -> bool {
+ self.name == other.name
+ && self.signature == other.signature
+ && self.data_type == other.data_type
Review Comment:
Yeah as long we're not sticking them in a hash map or something, or really anything that contains these objects.
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: upgrade to DataFusion 50.0.0 [datafusion-comet]
Posted by "mbutrovich (via GitHub)" <gi...@apache.org>.
mbutrovich commented on code in PR #2286:
URL: https://github.com/apache/datafusion-comet/pull/2286#discussion_r2353164723
##########
native/spark-expr/src/predicate_funcs/rlike.rs:
##########
@@ -47,19 +46,19 @@ pub struct RLike {
pattern: Regex,
}
-impl Hash for RLike {
- fn hash<H: Hasher>(&self, state: &mut H) {
Review Comment:
The old `hash` implementation did not hash the child. Is that expected?
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: test DataFusion 50 [datafusion-comet]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #2286:
URL: https://github.com/apache/datafusion-comet/pull/2286#issuecomment-3246715675
## [Codecov](https://app.codecov.io/gh/apache/datafusion-comet/pull/2286?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 33.05%. Comparing base ([`f09f8af`](https://app.codecov.io/gh/apache/datafusion-comet/commit/f09f8af64c6599255e116a376f4f008f2fd63b43?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`965ef2a`](https://app.codecov.io/gh/apache/datafusion-comet/commit/965ef2ab9fd820767089b5cff65d4cd1cdc466cc?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 446 commits behind head on main.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #2286 +/- ##
=============================================
- Coverage 56.12% 33.05% -23.08%
+ Complexity 976 732 -244
=============================================
Files 119 146 +27
Lines 11743 13370 +1627
Branches 2251 2358 +107
=============================================
- Hits 6591 4419 -2172
- Misses 4012 8147 +4135
+ Partials 1140 804 -336
```
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/datafusion-comet/pull/2286?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
</details>
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org