From 4102cc51db70c30b633de27b37e901f60b5c0c84 Mon Sep 17 00:00:00 2001 From: Zhengqiang Duan Date: Sat, 24 Feb 2024 15:37:33 +0800 Subject: [PATCH] Revise BaeseRule for PR 30249 (#30270) --- .../src/main/antlr4/imports/sqlserver/BaseRule.g4 | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/parser/sql/dialect/sqlserver/src/main/antlr4/imports/sqlserver/BaseRule.g4 b/parser/sql/dialect/sqlserver/src/main/antlr4/imports/sqlserver/BaseRule.g4 index 380e20c58aaa7..2438350d95cef 100644 --- a/parser/sql/dialect/sqlserver/src/main/antlr4/imports/sqlserver/BaseRule.g4 +++ b/parser/sql/dialect/sqlserver/src/main/antlr4/imports/sqlserver/BaseRule.g4 @@ -315,13 +315,15 @@ distinct ; specialFunction - : conversionFunction | charFunction | openJsonFunction | jsonFunction | openRowSetFunction | windowFunction | approxFunction | openDatasourceFunction | rowNumberFunction | graphFunction | trimFunction + : conversionFunction | charFunction | openJsonFunction | jsonFunction | openRowSetFunction + | windowFunction | approxFunction | openDatasourceFunction | rowNumberFunction | graphFunction + | trimFunction ; - trimFunction - : TRIM LP_ ((LEADING | BOTH | TRAILING) expr? FROM)? expr RP_ - | TRIM LP_ (expr FROM)? expr RP_ - ; +trimFunction + : TRIM LP_ ((LEADING | BOTH | TRAILING) expr? FROM)? expr RP_ + | TRIM LP_ (expr FROM)? expr RP_ + ; graphFunction : graphAggFunction