akupchinskiy commented on code in PR #2037:
URL: https://github.com/apache/datafusion-comet/pull/2037#discussion_r2239436301
##########
native/core/src/execution/planner.rs:
##########
@@ -798,6 +799,13 @@ impl PhysicalPlanner {
let seed = expr.seed.wrapping_add(self.partition.into());
Ok(Arc::new(RandnExpr::new(seed)))
}
+ ExprStruct::SparkPartitionId(_) =>
Ok(Arc::new(DataFusionLiteral::new(
+ ScalarValue::Int32(Some(self.partition)),
+ ))),
+ ExprStruct::MonotonicallyIncreasingId(_) => {
+ let offset = (self.partition as i64) << 33;
+ Ok(Arc::new(MonotonicallyIncreasingId::new(offset)))
Review Comment:
Good suggestion - will move this logic to the factory method
--
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]