ccciudatu commented on code in PR #13772:
URL: https://github.com/apache/datafusion/pull/13772#discussion_r1885702520
##########
datafusion/core/src/execution/context/mod.rs:
##########
@@ -1679,27 +1679,7 @@ pub enum RegisterFunction {
#[derive(Debug)]
pub struct EmptySerializerRegistry;
-impl SerializerRegistry for EmptySerializerRegistry {
- fn serialize_logical_plan(
- &self,
- node: &dyn UserDefinedLogicalNode,
- ) -> Result<Vec<u8>> {
- not_impl_err!(
- "Serializing user defined logical plan node `{}` is not supported",
- node.name()
- )
- }
-
- fn deserialize_logical_plan(
- &self,
- name: &str,
- _bytes: &[u8],
- ) -> Result<Arc<dyn UserDefinedLogicalNode>> {
- not_impl_err!(
- "Deserializing user defined logical plan node `{name}` is not
supported"
- )
- }
-}
Review Comment:
The `SerializerRegistry` trait now has two more methods for handling tables
(with default implementations for backwards compatibility), so it makes sense
for the existing methods to have default implementations as well.
This will allow implementors to conveniently implement the trait for
user-defined logical nodes only or for tables only.
Since the implementations here are perfect as trait defaults, this PR just
moves them into the trait itself.
--
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]