Hi,
PFA patch for cast module.Please do review it and let me know in case of any issue.
Regards,Sanket MehtaSr Software engineerEnterprisedb