StaticOperandImpl op = parseStaticOperand();
if (!(op instanceof LiteralImpl)) {
throw getSyntaxError("literal");
}
LiteralImpl literal = (LiteralImpl) op;
PropertyValue value = literal.getLiteralValue();
read("AS");
value = parseCastAs(value);
read(")");
// CastLiteral
literal = factory.literal(value);
return literal;
} else {
if (supportSQL1) {
if (readIf("TIMESTAMP")) {
StaticOperandImpl op = parseStaticOperand();
if (!(op instanceof LiteralImpl)) {
throw getSyntaxError("literal");
}
LiteralImpl literal = (LiteralImpl) op;
PropertyValue value = literal.getLiteralValue();
value = PropertyValues.newDate(value.getValue(Type.DATE));
literal = factory.literal(value);
return literal;
}
}
throw getSyntaxError("static operand");