You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by GitBox <gi...@apache.org> on 2019/05/31 16:35:59 UTC

[GitHub] [samza] srinipunuru opened a new pull request #1060: SAMZA-2230: Support for ANY type arguments in udfs that expect strongly typed arguments

srinipunuru opened a new pull request #1060: SAMZA-2230: Support for ANY type arguments in udfs that expect strongly typed arguments
URL: https://github.com/apache/samza/pull/1060
 
 
   Calcite and hence Samza SQL supports untyped fields of type SamzaSqlFieldType.ANY. Corresponding java type for such fields is Object. 
   
   When an UDF expects a strongly typed field and when one of the arguments that is passed is untyped (i.e. ANY ) it fails. And calcite doesn't allow casting the ANY to a well defined type like java does.
   
   To fix this we explicitly cast the untyped arguments to the type that the UDF expects as part of the UDF code generation. Also added a test case that fails without this change. 
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services