From c2e0ce93caca80d69a67482ef8e764657e1ea437 Mon Sep 17 00:00:00 2001 From: taichong Date: Thu, 26 May 2022 02:42:02 +0800 Subject: [PATCH] Support plan v2 for user() function and add stateless test --- common/ast/src/parser/token.rs | 4 ++-- .../0_stateless/02_function/02_0016_function_context.result | 1 + .../0_stateless/02_function/02_0016_function_context.sql | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/common/ast/src/parser/token.rs b/common/ast/src/parser/token.rs index 0be7f13761324..2b72e1b774798 100644 --- a/common/ast/src/parser/token.rs +++ b/common/ast/src/parser/token.rs @@ -749,7 +749,7 @@ impl TokenKind { | TokenKind::TRUE | TokenKind::TRY_CAST // | TokenKind::UNIQUE - | TokenKind::USER + //| TokenKind::USER | TokenKind::USING | TokenKind::VALUES | TokenKind::VARCHAR @@ -876,7 +876,7 @@ impl TokenKind { | TokenKind::TRAILING | TokenKind::TRUE // | TokenKind::UNIQUE - | TokenKind::USER + //| TokenKind::USER | TokenKind::USING // | TokenKind::VARIADIC // | TokenKind::VERBOSE diff --git a/tests/suites/0_stateless/02_function/02_0016_function_context.result b/tests/suites/0_stateless/02_function/02_0016_function_context.result index de94794e9b775..79b67c7ba4799 100644 --- a/tests/suites/0_stateless/02_function/02_0016_function_context.result +++ b/tests/suites/0_stateless/02_function/02_0016_function_context.result @@ -1 +1,2 @@ 'default'@'127.0.0.1' +'default'@'127.0.0.1' diff --git a/tests/suites/0_stateless/02_function/02_0016_function_context.sql b/tests/suites/0_stateless/02_function/02_0016_function_context.sql index 0bf2720c217d9..55a1fb3b5c98f 100644 --- a/tests/suites/0_stateless/02_function/02_0016_function_context.sql +++ b/tests/suites/0_stateless/02_function/02_0016_function_context.sql @@ -1 +1,2 @@ SELECT current_user(); +SELECT user();