You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "milenkovicm (via GitHub)" <gi...@apache.org> on 2023/05/19 13:49:30 UTC

[GitHub] [arrow-datafusion] milenkovicm commented on issue #6387: `datafusion_proto::physical_plan_to_bytes` has a problem with `characterlength` function

milenkovicm commented on issue #6387:
URL: https://github.com/apache/arrow-datafusion/issues/6387#issuecomment-1554603100

   thanks @alamb ,
   
   Got some time to have a look at this. 
   
   I believe this is problem with serialization, which serialize it as `ScalarUdf` thus deserialization can't find it in UDF registry.
   
   to elaborate a bit, at:
   
   https://github.com/apache/arrow-datafusion/blob/412867aa2596a2df93635b6ac31d48aa14111c40/datafusion/proto/src/physical_plan/to_proto.rs#L324
   
   `expr.name()` for `length` returns `characterlength` which is then matched in 
   
   https://github.com/apache/arrow-datafusion/blob/98839dbceb835c9e78154a27bb96c9dad58de7c6/datafusion/expr/src/built_in_function.rs#L326
   
   which is expecting `character_length`, and as it does not match it will jump to else branch 
   
   https://github.com/apache/arrow-datafusion/blob/412867aa2596a2df93635b6ac31d48aa14111c40/datafusion/proto/src/physical_plan/to_proto.rs#L339
   
   if i'm not mistaken. 
   
   at the end deserialization gets a wrong expression type. 
   
   I guess there may be a bit problems with function names with `_` in the name, but did not investigate further at this stage. 
   
   


-- 
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@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org