adriangb commented on code in PR #24003:
URL: https://github.com/apache/datafusion/pull/24003#discussion_r3688011809
##########
datafusion/proto/tests/cases/roundtrip_physical_plan.rs:
##########
@@ -2374,6 +2374,52 @@ fn roundtrip_range_partitioning() -> Result<()> {
roundtrip_test(Arc::new(repartition))
}
+/// `parse_protobuf_hash_partitioning` has no in-tree callers left; it
delegates
+/// to the shared `Partitioning::try_from_proto`, so pin that it still decodes
+/// the hash message it is handed.
+#[test]
+fn parse_hash_partitioning_delegates_to_shared_decoder() -> Result<()> {
+ use
datafusion_proto::physical_plan::from_proto::parse_protobuf_hash_partitioning;
+
+ let schema = Schema::new(vec![Field::new("a", DataType::Int64, false)]);
+ let ctx = SessionContext::new();
+ let task_ctx = ctx.task_ctx();
+ let codec = DefaultPhysicalExtensionCodec {};
+ let decode_ctx = PhysicalPlanDecodeContext::new(&task_ctx, &codec);
+ let proto_converter = DefaultPhysicalProtoConverter {};
+
+ let hash_expr = serialize_physical_expr_with_converter(
+ &col("a", &schema)?,
+ &codec,
+ &proto_converter,
+ )?;
+ let hash = protobuf::PhysicalHashRepartition {
+ hash_expr: vec![hash_expr],
+ partition_count: 4,
Review Comment:
Done in eeb9ed3
--
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]