@@ -504,7 +504,7 @@ fn registry_decodes_named_extension_expr() -> Result<()> {
504504
505505 let session = session_with (
506506 SessionConfig :: new ( ) . with_batch_size ( 1234 ) ,
507- TagExpr :: register ,
507+ TagExpr :: register_proto ,
508508 ) ?;
509509 let decoded = from_wire ( & node, & session, & TestCodec :: Refusing ) ?;
510510 let decoded = decoded. downcast_ref :: < TagExpr > ( ) . unwrap ( ) ;
@@ -523,7 +523,7 @@ fn unnamed_or_unregistered_falls_back_to_codec() -> Result<()> {
523523 set_expr_name ( & mut unnamed, None ) ;
524524
525525 let empty = SessionContext :: new ( ) ;
526- let registered = session_with ( SessionConfig :: new ( ) , TagExpr :: register ) ?;
526+ let registered = session_with ( SessionConfig :: new ( ) , TagExpr :: register_proto ) ?;
527527 for ( node, session) in [ ( & named, & empty) , ( & unnamed, & registered) ] {
528528 let decoded = from_wire ( node, session, & TestCodec :: Tag ) ?;
529529 let decoded = decoded. downcast_ref :: < TagExpr > ( ) . unwrap ( ) ;
@@ -539,7 +539,8 @@ fn unnamed_or_unregistered_falls_back_to_codec() -> Result<()> {
539539#[ test]
540540fn codec_failure_keeps_its_error_and_names_the_missing_registration ( ) -> Result < ( ) > {
541541 let named = to_wire ( & tag_expr ( ) ?, & TestCodec :: Refusing ) ?;
542- let session = session_with ( SessionConfig :: new ( ) , <TaggedExpr < Other > >:: register) ?;
542+ let session =
543+ session_with ( SessionConfig :: new ( ) , <TaggedExpr < Other > >:: register_proto) ?;
543544
544545 let err = from_wire ( & named, & session, & TestCodec :: Exhausted ) . unwrap_err ( ) ;
545546 assert ! (
@@ -572,17 +573,19 @@ fn codec_failure_keeps_its_error_and_names_the_missing_registration() -> Result<
572573#[ test]
573574fn registration_rejects_collisions_and_empty_names ( ) -> Result < ( ) > {
574575 let mut registry = ProtoDecoderRegistry :: new ( ) ;
575- TagExpr :: register ( & mut registry) ?;
576- TagExpr :: register ( & mut registry) ?;
576+ TagExpr :: register_proto ( & mut registry) ?;
577+ TagExpr :: register_proto ( & mut registry) ?;
577578
578- let err = <TaggedExpr < TagClone > as ExtensionExprFromProto >:: register ( & mut registry)
579- . unwrap_err ( )
580- . to_string ( ) ;
579+ let err =
580+ <TaggedExpr < TagClone > as ExtensionExprFromProto >:: register_proto ( & mut registry)
581+ . unwrap_err ( )
582+ . to_string ( ) ;
581583 assert ! ( err. contains( "already registered" ) , "{err}" ) ;
582584
583- let err = <TaggedExpr < Unnamed > as ExtensionExprFromProto >:: register ( & mut registry)
584- . unwrap_err ( )
585- . to_string ( ) ;
585+ let err =
586+ <TaggedExpr < Unnamed > as ExtensionExprFromProto >:: register_proto ( & mut registry)
587+ . unwrap_err ( )
588+ . to_string ( ) ;
586589 assert ! ( err. contains( "empty name" ) , "{err}" ) ;
587590
588591 assert_eq ! (
@@ -600,7 +603,7 @@ fn nested_extension_exprs_both_decode_through_the_registry() -> Result<()> {
600603 Arc :: new ( TagExpr :: new ( "inner" , col ( "a" , & test_schema ( ) ) ?) ) ;
601604 let outer: Arc < dyn PhysicalExpr > = Arc :: new ( TagExpr :: new ( "outer" , inner) ) ;
602605 let node = to_wire ( & outer, & TestCodec :: Refusing ) ?;
603- let session = session_with ( SessionConfig :: new ( ) , TagExpr :: register ) ?;
606+ let session = session_with ( SessionConfig :: new ( ) , TagExpr :: register_proto ) ?;
604607
605608 let decoded = from_wire ( & node, & session, & TestCodec :: Refusing ) ?;
606609 let outer = decoded. downcast_ref :: < TagExpr > ( ) . unwrap ( ) ;
@@ -615,7 +618,8 @@ fn nested_extension_exprs_both_decode_through_the_registry() -> Result<()> {
615618#[ test]
616619fn a_failing_registry_decoder_does_not_fall_through_to_the_codec ( ) -> Result < ( ) > {
617620 let node = to_wire ( & tag_expr ( ) ?, & TestCodec :: Tag ) ?;
618- let session = session_with ( SessionConfig :: new ( ) , <TaggedExpr < Failing > >:: register) ?;
621+ let session =
622+ session_with ( SessionConfig :: new ( ) , <TaggedExpr < Failing > >:: register_proto) ?;
619623 let err = from_wire ( & node, & session, & TestCodec :: Tag ) . unwrap_err ( ) ;
620624 assert ! (
621625 err. to_string( )
@@ -630,7 +634,7 @@ fn a_failing_registry_decoder_does_not_fall_through_to_the_codec() -> Result<()>
630634/// session.
631635#[ test]
632636fn extension_expr_resolves_scalar_and_aggregate_udfs_from_the_session ( ) -> Result < ( ) > {
633- let session = session_with ( SessionConfig :: new ( ) , FunctionRefExpr :: register ) ?;
637+ let session = session_with ( SessionConfig :: new ( ) , FunctionRefExpr :: register_proto ) ?;
634638 session. register_udf ( create_udf (
635639 "my_add_one" ,
636640 vec ! [ DataType :: Int64 ] ,
@@ -664,7 +668,7 @@ fn extension_expr_resolves_scalar_and_aggregate_udfs_from_the_session() -> Resul
664668 child : col ( "a" , & test_schema ( ) ) ?,
665669 } ) ;
666670 let node = to_wire ( & expr, & TestCodec :: Refusing ) ?;
667- let reader = session_with ( SessionConfig :: new ( ) , FunctionRefExpr :: register ) ?;
671+ let reader = session_with ( SessionConfig :: new ( ) , FunctionRefExpr :: register_proto ) ?;
668672 let err = from_wire ( & node, & reader, & TestCodec :: Refusing ) . unwrap_err ( ) ;
669673 assert ! ( err. to_string( ) . contains( "my_add_one" ) , "{err}" ) ;
670674 Ok ( ( ) )
@@ -686,7 +690,7 @@ fn registry_expr_survives_a_whole_plan_roundtrip() -> Result<()> {
686690
687691 let session = session_with (
688692 SessionConfig :: new ( ) . with_batch_size ( 4096 ) ,
689- TagExpr :: register ,
693+ TagExpr :: register_proto ,
690694 ) ?;
691695 let decoded = physical_plan_from_bytes_with_extension_codec (
692696 & bytes,
@@ -838,7 +842,7 @@ fn registry_expr_keeps_its_expression_id_for_deduplication() -> Result<()> {
838842 "the serializer must stamp the expression id"
839843 ) ;
840844
841- let session = session_with ( SessionConfig :: new ( ) , IdentityExpr :: register ) ?;
845+ let session = session_with ( SessionConfig :: new ( ) , IdentityExpr :: register_proto ) ?;
842846 let task_ctx = session. task_ctx ( ) ;
843847 let decode_ctx = PhysicalPlanDecodeContext :: new ( task_ctx. as_ref ( ) , & codec) ;
844848 let decoded = converter. proto_to_physical_expr ( & node, & schema, & decode_ctx) ?;
@@ -949,8 +953,8 @@ fn registry_plan_and_expr_with_the_same_name_roundtrip_together() -> Result<()>
949953 let bytes = physical_plan_to_bytes_with_extension_codec ( plan, & TestCodec :: Refusing ) ?;
950954
951955 let session = session_with ( SessionConfig :: new ( ) . with_batch_size ( 2048 ) , |registry| {
952- SameNameExec :: register ( registry) ?;
953- TagExpr :: register ( registry)
956+ SameNameExec :: register_proto ( registry) ?;
957+ TagExpr :: register_proto ( registry)
954958 } ) ?;
955959 let decoded = physical_plan_from_bytes_with_extension_codec (
956960 & bytes,
0 commit comments