From 0dbb00180d3c2e567c79c2430f7314cc775fe147 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Tue, 8 Feb 2022 14:29:41 +0800 Subject: [PATCH] [TD-11220](query): time related functions --- src/util/src/ttokenizer.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/util/src/ttokenizer.c b/src/util/src/ttokenizer.c index 8fca992911..019b618ca3 100644 --- a/src/util/src/ttokenizer.c +++ b/src/util/src/ttokenizer.c @@ -589,6 +589,11 @@ uint32_t tGetToken(char* z, uint32_t* tokenId) { for (i = 1; ((z[i] & 0x80) == 0) && isIdChar[(uint8_t) z[i]]; i++) { } *tokenId = tKeywordCode(z, i); + + //Check for function now() + if (*tokenId == TK_NOW && z[i] == '(' && z[i + 1] == ')') { + *tokenId = TK_ID; + } return i; } } -- GitLab