File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/main/java/com/alipay/oceanbase/rpc/protocol/payload/impl/parser Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 2828import java .util .List ;
2929
3030import static com .alipay .oceanbase .rpc .protocol .payload .impl .parser .ObGeneratedColumnFuncName .funcToToken ;
31- import static com .alipay .oceanbase .rpc .protocol .payload .impl .parser .ObGeneratedColumnSimpleToken .COMMA ;
32- import static com .alipay .oceanbase .rpc .protocol .payload .impl .parser .ObGeneratedColumnSimpleToken .RPAREN ;
31+ import static com .alipay .oceanbase .rpc .protocol .payload .impl .parser .ObGeneratedColumnSimpleToken .*;
3332
3433public class ObGeneratedColumnExpressParser {
3534
@@ -68,7 +67,12 @@ public ObGeneratedColumnSimpleFunc parse() throws GenerateColumnParseException {
6867 throw new GenerateColumnParseException ("" );
6968 }
7069 case SUB :
70+ // -(T)
7171 // If the first token is a '-' sign, then generate the opposite number expression.
72+ lexer .nextToken ();
73+ if (lexer .token ().equals (LPAREN )) {
74+ lexer .nextToken ();
75+ }
7276 String refColumn = lexer .stringVal ();
7377 return new ObGeneratedColumnNegateFunc (refColumn );
7478 default :
You can’t perform that action at this time.
0 commit comments