// so the following cases should throw error until that changes.
List<Class<?>> opsToCheckFor = new ArrayList<Class<?>>();
opsToCheckFor.add(RegexExpression.class);
int errCode = 1110;
if(checkSuccessors(project, opsToCheckFor)) {
throw new FrontendException("Unsupported query: " +
"You have an partition column ("
+ fieldName + ") inside a regexp operator in the " +
"filter condition.", errCode, PigException.INPUT);
}
opsToCheckFor.set(0, UserFuncExpression.class);
if(checkSuccessors(project, opsToCheckFor)) {
throw new FrontendException("Unsupported query: " +
"You have an partition column ("
+ fieldName + ") inside a function in the " +
"filter condition.", errCode, PigException.INPUT);
}
opsToCheckFor.set(0, CastExpression.class);
if(checkSuccessors(project, opsToCheckFor)) {
throw new FrontendException("Unsupported query: " +
"You have an partition column ("
+ fieldName + ") inside a cast in the " +
"filter condition.", errCode, PigException.INPUT);
}
opsToCheckFor.set(0, IsNullExpression.class);
if(checkSuccessors(project, opsToCheckFor)) {
throw new FrontendException("Unsupported query: " +
"You have an partition column ("
+ fieldName + ") inside a null check operator in the " +
"filter condition.", errCode, PigException.INPUT);
}
opsToCheckFor.set(0, BinCondExpression.class);
if(checkSuccessors(project, opsToCheckFor)) {
throw new FrontendException("Unsupported query: " +
"You have an partition column ("
+ fieldName + ") inside a bincond operator in the " +
"filter condition.", errCode, PigException.INPUT);
}
opsToCheckFor.set(0, AndExpression.class);
opsToCheckFor.add(OrExpression.class);
if(checkSuccessors(project, opsToCheckFor)) {
errCode = 1112;
throw new FrontendException("Unsupported query: " +
"You have an partition column (" + fieldName +
" ) in a construction like: " +
"(pcond and ...) or (pcond and ...) " +
"where pcond is a condition on a partition column.",
errCode, PigException.INPUT);