a = foreach b generate ToDate( EXP_DATE,'yyyyMMddHHmmss') as EXP_DATE_Out ,
(CASE
WHEN PROTOCAL_MONTH IS NULL OR PROTOCAL_MONTH=0 THEN IS_VALID
WHEN SUBSTRING(EFF_DATE,1,8)<= '2014-04-29 16:43:20'
AND SUBSTRING(ToString(DatePlusInt(ToDaTe(EFF_DATE,'yyyyMMddHHmmss'),PROTOCAL_MONTH),'yyyyMMdd'),1,8)>= '2014-04-29 16:43:20'
AND Nvl(IS_VALID,'1') = '1'
THEN '1' ELSE '0'
END) as IS_VALID_Out , Mod( SUBSTRING( 2014-04-29 16:43:20,1,6 ),2) as V_DATE_Out;
a = foreach b generate ToDate( EXP_DATE,'yyyyMMddHHmmss') as EXP_DATE_Out ,
(CASE
WHEN PROTOCAL_MONTH IS NULL OR PROTOCAL_MONTH=0 THEN IS_VALID
WHEN SUBSTRING(EFF_DATE,1,8)<= '2014-04-29 16:43:20'
AND SUBSTRING(ToString(DatePlusInt(ToDaTe(EFF_DATE,'yyyyMMddHHmmss'),PROTOCAL_MONTH),'yyyyMMdd'),1,8)>= '2014-04-29 16:43:20'
AND Nvl(IS_VALID,'1') = '1'
THEN '1' ELSE '0'
END) as IS_VALID_Out , Mod( SUBSTRING( 2014-04-29 16:43:20,1,6 ),2) as V_DATE_Out;
Description
Case when the current function is not supported is not null, expression functions, nested functions, please help solve, thank you very much.