我需要创建包含在foreach命令中并同时具有条件运算符的udf。
这是我的代码:
ENEE_ENR_GCP = FOREACH ENEE_ENR_GROUP GENERATE
IDT_GCP AS IDT_GCP,
((ENEE_ENR_GROUP::IDC_PSE_PCL != 1 AND ENEE_ENR_GROUP::IDC_CD_NOT != 0) ?
(FOREACH ENEE_ENR_GROUP {
DaysBetween(DA_PRM_CTR_ORDER,DA_PRM_CTR_ORDER) == 0 ?
(CD_NOT_ORDER = ORDER CD_NOT BY IDT_ETT_PSE ASC):
((CD_NOT_ORDER = ORDER CD_NOT BY DA_PRM_CTR_ORDER ASC);
CD_NOT_MIN = LIMIT CD_NOT_ORDER 1;
GENERATE group, CD_NOT_MIN }) :
但是它返回此错误:
输入“ ENEE_ENR_GROUP”不匹配,预期为LEFT_PAREN
但是我在代码的synthax中看不到任何问题。
能帮我吗?