[jOOQ/jOOQ#11987] Parser doesn't support date time arithmetic in DATE_TRUNC arguments

This commit is contained in:
Lukas Eder 2021-06-10 10:09:02 +02:00
parent 49345fff72
commit 5a6af761b0

View File

@ -6942,7 +6942,7 @@ final class DefaultParseContext extends AbstractScope implements ParseContext {
private final FieldOrRow parseSum(Type type) {
FieldOrRow r = parseFactor(type);
if (N.is(type) && r instanceof Field)
if ((N.is(type) || D.is(type)) && r instanceof Field)
for (;;)
if (parseIf('+'))
r = parseSumRightOperand(type, r, true);