From 23c86af7306a32d00d14aa206ae34d99beca34c2 Mon Sep 17 00:00:00 2001 From: "cai.zhang" Date: Wed, 9 Apr 2025 20:06:27 +0800 Subject: [PATCH] fix: [2.5] Revert add a sign (positive or negative) to constants (#41192) issue: #41174 master pr: #41191 Signed-off-by: Cai Zhang --- internal/parser/planparserv2/Plan.g4 | 4 +- .../parser/planparserv2/generated/Plan.interp | 2 +- .../planparserv2/generated/plan_parser.go | 459 ++++++++---------- .../parser/planparserv2/parser_visitor.go | 4 +- .../planparserv2/plan_parser_v2_test.go | 2 +- 5 files changed, 205 insertions(+), 266 deletions(-) diff --git a/internal/parser/planparserv2/Plan.g4 b/internal/parser/planparserv2/Plan.g4 index 709e40c063..7a2d5f5efc 100644 --- a/internal/parser/planparserv2/Plan.g4 +++ b/internal/parser/planparserv2/Plan.g4 @@ -1,8 +1,8 @@ grammar Plan; expr: - (ADD | SUB)? IntegerConstant # Integer - | (ADD | SUB)? FloatingConstant # Floating + IntegerConstant # Integer + | FloatingConstant # Floating | BooleanConstant # Boolean | StringLiteral # String | (Identifier|Meta) # Identifier diff --git a/internal/parser/planparserv2/generated/Plan.interp b/internal/parser/planparserv2/generated/Plan.interp index 40b9c13998..098872e29b 100644 --- a/internal/parser/planparserv2/generated/Plan.interp +++ b/internal/parser/planparserv2/generated/Plan.interp @@ -111,4 +111,4 @@ expr atn: -[4, 1, 51, 152, 2, 0, 7, 0, 1, 0, 1, 0, 3, 0, 5, 8, 0, 1, 0, 1, 0, 3, 0, 9, 8, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 5, 0, 27, 8, 0, 10, 0, 12, 0, 30, 9, 0, 1, 0, 3, 0, 33, 8, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1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 0, 0, 9, 10, 1, 0, 0, 0, 10, 93, 5, 45, 0, 0, 11, 93, 5, 43, 0, 0, 12, 93, 5, 48, 0, 0, 13, 93, 7, 1, 0, 0, 14, 93, 5, 49, 0, 0, 15, 16, 5, 6, 0, 0, 16, 17, 5, 46, 0, 0, 17, 93, 5, 7, 0, 0, 18, 19, 5, 1, 0, 0, 19, 20, 3, 0, 0, 0, 20, 21, 5, 2, 0, 0, 21, 93, 1, 0, 0, 0, 22, 23, 5, 3, 0, 0, 23, 28, 3, 0, 0, 0, 24, 25, 5, 4, 0, 0, 25, 27, 3, 0, 0, 0, 26, 24, 1, 0, 0, 0, 27, 30, 1, 0, 0, 0, 28, 26, 1, 0, 0, 0, 28, 29, 1, 0, 0, 0, 29, 32, 1, 0, 0, 0, 30, 28, 1, 0, 0, 0, 31, 33, 5, 4, 0, 0, 32, 31, 1, 0, 0, 0, 32, 33, 1, 0, 0, 0, 33, 34, 1, 0, 0, 0, 34, 35, 5, 5, 0, 0, 35, 93, 1, 0, 0, 0, 36, 93, 5, 35, 0, 0, 37, 38, 5, 15, 0, 0, 38, 93, 3, 0, 0, 25, 39, 40, 5, 16, 0, 0, 40, 41, 5, 1, 0, 0, 41, 42, 5, 46, 0, 0, 42, 43, 5, 4, 0, 0, 43, 44, 5, 48, 0, 0, 44, 93, 5, 2, 0, 0, 45, 46, 7, 2, 0, 0, 46, 93, 3, 0, 0, 21, 47, 48, 7, 3, 0, 0, 48, 49, 5, 1, 0, 0, 49, 50, 3, 0, 0, 0, 50, 51, 5, 4, 0, 0, 51, 52, 3, 0, 0, 0, 52, 53, 5, 2, 0, 0, 53, 93, 1, 0, 0, 0, 54, 55, 7, 4, 0, 0, 55, 56, 5, 1, 0, 0, 56, 57, 3, 0, 0, 0, 57, 58, 5, 4, 0, 0, 58, 59, 3, 0, 0, 0, 59, 60, 5, 2, 0, 0, 60, 93, 1, 0, 0, 0, 61, 62, 7, 5, 0, 0, 62, 63, 5, 1, 0, 0, 63, 64, 3, 0, 0, 0, 64, 65, 5, 4, 0, 0, 65, 66, 3, 0, 0, 0, 66, 67, 5, 2, 0, 0, 67, 93, 1, 0, 0, 0, 68, 69, 5, 42, 0, 0, 69, 70, 5, 1, 0, 0, 70, 71, 7, 6, 0, 0, 71, 93, 5, 2, 0, 0, 72, 73, 5, 46, 0, 0, 73, 85, 5, 1, 0, 0, 74, 79, 3, 0, 0, 0, 75, 76, 5, 4, 0, 0, 76, 78, 3, 0, 0, 0, 77, 75, 1, 0, 0, 0, 78, 81, 1, 0, 0, 0, 79, 77, 1, 0, 0, 0, 79, 80, 1, 0, 0, 0, 80, 83, 1, 0, 0, 0, 81, 79, 1, 0, 0, 0, 82, 84, 5, 4, 0, 0, 83, 82, 1, 0, 0, 0, 83, 84, 1, 0, 0, 0, 84, 86, 1, 0, 0, 0, 85, 74, 1, 0, 0, 0, 85, 86, 1, 0, 0, 0, 86, 87, 1, 0, 0, 0, 87, 93, 5, 2, 0, 0, 88, 89, 7, 6, 0, 0, 89, 93, 5, 30, 0, 0, 90, 91, 7, 6, 0, 0, 91, 93, 5, 31, 0, 0, 92, 2, 1, 0, 0, 0, 92, 8, 1, 0, 0, 0, 92, 11, 1, 0, 0, 0, 92, 12, 1, 0, 0, 0, 92, 13, 1, 0, 0, 0, 92, 14, 1, 0, 0, 0, 92, 15, 1, 0, 0, 0, 92, 18, 1, 0, 0, 0, 92, 22, 1, 0, 0, 0, 92, 36, 1, 0, 0, 0, 92, 37, 1, 0, 0, 0, 92, 39, 1, 0, 0, 0, 92, 45, 1, 0, 0, 0, 92, 47, 1, 0, 0, 0, 92, 54, 1, 0, 0, 0, 92, 61, 1, 0, 0, 0, 92, 68, 1, 0, 0, 0, 92, 72, 1, 0, 0, 0, 92, 88, 1, 0, 0, 0, 92, 90, 1, 0, 0, 0, 93, 148, 1, 0, 0, 0, 94, 95, 10, 22, 0, 0, 95, 96, 5, 22, 0, 0, 96, 147, 3, 0, 0, 23, 97, 98, 10, 20, 0, 0, 98, 99, 7, 7, 0, 0, 99, 147, 3, 0, 0, 21, 100, 101, 10, 19, 0, 0, 101, 102, 7, 0, 0, 0, 102, 147, 3, 0, 0, 20, 103, 104, 10, 18, 0, 0, 104, 105, 7, 8, 0, 0, 105, 147, 3, 0, 0, 19, 106, 108, 10, 17, 0, 0, 107, 109, 5, 33, 0, 0, 108, 107, 1, 0, 0, 0, 108, 109, 1, 0, 0, 0, 109, 110, 1, 0, 0, 0, 110, 111, 5, 34, 0, 0, 111, 147, 3, 0, 0, 18, 112, 113, 10, 11, 0, 0, 113, 114, 7, 9, 0, 0, 114, 115, 7, 6, 0, 0, 115, 116, 7, 9, 0, 0, 116, 147, 3, 0, 0, 12, 117, 118, 10, 10, 0, 0, 118, 119, 7, 10, 0, 0, 119, 120, 7, 6, 0, 0, 120, 121, 7, 10, 0, 0, 121, 147, 3, 0, 0, 11, 122, 123, 10, 9, 0, 0, 123, 124, 7, 11, 0, 0, 124, 147, 3, 0, 0, 10, 125, 126, 10, 8, 0, 0, 126, 127, 7, 12, 0, 0, 127, 147, 3, 0, 0, 9, 128, 129, 10, 7, 0, 0, 129, 130, 5, 25, 0, 0, 130, 147, 3, 0, 0, 8, 131, 132, 10, 6, 0, 0, 132, 133, 5, 27, 0, 0, 133, 147, 3, 0, 0, 7, 134, 135, 10, 5, 0, 0, 135, 136, 5, 26, 0, 0, 136, 147, 3, 0, 0, 6, 137, 138, 10, 4, 0, 0, 138, 139, 5, 28, 0, 0, 139, 147, 3, 0, 0, 5, 140, 141, 10, 3, 0, 0, 141, 142, 5, 29, 0, 0, 142, 147, 3, 0, 0, 4, 143, 144, 10, 24, 0, 0, 144, 145, 5, 14, 0, 0, 145, 147, 5, 48, 0, 0, 146, 94, 1, 0, 0, 0, 146, 97, 1, 0, 0, 0, 146, 100, 1, 0, 0, 0, 146, 103, 1, 0, 0, 0, 146, 106, 1, 0, 0, 0, 146, 112, 1, 0, 0, 0, 146, 117, 1, 0, 0, 0, 146, 122, 1, 0, 0, 0, 146, 125,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 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 5, 0, 141, 8, 0, 10, 0, 12, 0, 144, 9, 0, 1, 0, 0, 1, 0, 1, 0, 0, 13, 1, 0, 46, 47, 2, 0, 17, 18, 32, 33, 2, 0, 36, 36, 39, 39, 2, 0, 37, 37, 40, 40, 2, 0, 38, 38, 41, 41, 2, 0, 46, 46, 49, 49, 1, 0, 19, 21, 1, 0, 17, 18, 1, 0, 23, 24, 1, 0, 8, 9, 1, 0, 10, 11, 1, 0, 8, 11, 1, 0, 12, 13, 184, 0, 86, 1, 0, 0, 0, 2, 3, 6, 0, -1, 0, 3, 87, 5, 44, 0, 0, 4, 87, 5, 45, 0, 0, 5, 87, 5, 43, 0, 0, 6, 87, 5, 48, 0, 0, 7, 87, 7, 0, 0, 0, 8, 87, 5, 49, 0, 0, 9, 10, 5, 6, 0, 0, 10, 11, 5, 46, 0, 0, 11, 87, 5, 7, 0, 0, 12, 13, 5, 1, 0, 0, 13, 14, 3, 0, 0, 0, 14, 15, 5, 2, 0, 0, 15, 87, 1, 0, 0, 0, 16, 17, 5, 3, 0, 0, 17, 22, 3, 0, 0, 0, 18, 19, 5, 4, 0, 0, 19, 21, 3, 0, 0, 0, 20, 18, 1, 0, 0, 0, 21, 24, 1, 0, 0, 0, 22, 20, 1, 0, 0, 0, 22, 23, 1, 0, 0, 0, 23, 26, 1, 0, 0, 0, 24, 22, 1, 0, 0, 0, 25, 27, 5, 4, 0, 0, 26, 25, 1, 0, 0, 0, 26, 27, 1, 0, 0, 0, 27, 28, 1, 0, 0, 0, 28, 29, 5, 5, 0, 0, 29, 87, 1, 0, 0, 0, 30, 87, 5, 35, 0, 0, 31, 32, 5, 15, 0, 0, 32, 87, 3, 0, 0, 25, 33, 34, 5, 16, 0, 0, 34, 35, 5, 1, 0, 0, 35, 36, 5, 46, 0, 0, 36, 37, 5, 4, 0, 0, 37, 38, 5, 48, 0, 0, 38, 87, 5, 2, 0, 0, 39, 40, 7, 1, 0, 0, 40, 87, 3, 0, 0, 21, 41, 42, 7, 2, 0, 0, 42, 43, 5, 1, 0, 0, 43, 44, 3, 0, 0, 0, 44, 45, 5, 4, 0, 0, 45, 46, 3, 0, 0, 0, 46, 47, 5, 2, 0, 0, 47, 87, 1, 0, 0, 0, 48, 49, 7, 3, 0, 0, 49, 50, 5, 1, 0, 0, 50, 51, 3, 0, 0, 0, 51, 52, 5, 4, 0, 0, 52, 53, 3, 0, 0, 0, 53, 54, 5, 2, 0, 0, 54, 87, 1, 0, 0, 0, 55, 56, 7, 4, 0, 0, 56, 57, 5, 1, 0, 0, 57, 58, 3, 0, 0, 0, 58, 59, 5, 4, 0, 0, 59, 60, 3, 0, 0, 0, 60, 61, 5, 2, 0, 0, 61, 87, 1, 0, 0, 0, 62, 63, 5, 42, 0, 0, 63, 64, 5, 1, 0, 0, 64, 65, 7, 5, 0, 0, 65, 87, 5, 2, 0, 0, 66, 67, 5, 46, 0, 0, 67, 79, 5, 1, 0, 0, 68, 73, 3, 0, 0, 0, 69, 70, 5, 4, 0, 0, 70, 72, 3, 0, 0, 0, 71, 69, 1, 0, 0, 0, 72, 75, 1, 0, 0, 0, 73, 71, 1, 0, 0, 0, 73, 74, 1, 0, 0, 0, 74, 77, 1, 0, 0, 0, 75, 73, 1, 0, 0, 0, 76, 78, 5, 4, 0, 0, 77, 76, 1, 0, 0, 0, 77, 78, 1, 0, 0, 0, 78, 80, 1, 0, 0, 0, 79, 68, 1, 0, 0, 0, 79, 80, 1, 0, 0, 0, 80, 81, 1, 0, 0, 0, 81, 87, 5, 2, 0, 0, 82, 83, 7, 5, 0, 0, 83, 87, 5, 30, 0, 0, 84, 85, 7, 5, 0, 0, 85, 87, 5, 31, 0, 0, 86, 2, 1, 0, 0, 0, 86, 4, 1, 0, 0, 0, 86, 5, 1, 0, 0, 0, 86, 6, 1, 0, 0, 0, 86, 7, 1, 0, 0, 0, 86, 8, 1, 0, 0, 0, 86, 9, 1, 0, 0, 0, 86, 12, 1, 0, 0, 0, 86, 16, 1, 0, 0, 0, 86, 30, 1, 0, 0, 0, 86, 31, 1, 0, 0, 0, 86, 33, 1, 0, 0, 0, 86, 39, 1, 0, 0, 0, 86, 41, 1, 0, 0, 0, 86, 48, 1, 0, 0, 0, 86, 55, 1, 0, 0, 0, 86, 62, 1, 0, 0, 0, 86, 66, 1, 0, 0, 0, 86, 82, 1, 0, 0, 0, 86, 84, 1, 0, 0, 0, 87, 142, 1, 0, 0, 0, 88, 89, 10, 22, 0, 0, 89, 90, 5, 22, 0, 0, 90, 141, 3, 0, 0, 23, 91, 92, 10, 20, 0, 0, 92, 93, 7, 6, 0, 0, 93, 141, 3, 0, 0, 21, 94, 95, 10, 19, 0, 0, 95, 96, 7, 7, 0, 0, 96, 141, 3, 0, 0, 20, 97, 98, 10, 18, 0, 0, 98, 99, 7, 8, 0, 0, 99, 141, 3, 0, 0, 19, 100, 102, 10, 17, 0, 0, 101, 103, 5, 33, 0, 0, 102, 101, 1, 0, 0, 0, 102, 103, 1, 0, 0, 0, 103, 104, 1, 0, 0, 0, 104, 105, 5, 34, 0, 0, 105, 141, 3, 0, 0, 18, 106, 107, 10, 11, 0, 0, 107, 108, 7, 9, 0, 0, 108, 109, 7, 5, 0, 0, 109, 110, 7, 9, 0, 0, 110, 141, 3, 0, 0, 12, 111, 112, 10, 10, 0, 0, 112, 113, 7, 10, 0, 0, 113, 114, 7, 5, 0, 0, 114, 115, 7, 10, 0, 0, 115, 141, 3, 0, 0, 11, 116, 117, 10, 9, 0, 0, 117, 118, 7, 11, 0, 0, 118, 141, 3, 0, 0, 10, 119, 120, 10, 8, 0, 0, 120, 121, 7, 12, 0, 0, 121, 141, 3, 0, 0, 9, 122, 123, 10, 7, 0, 0, 123, 124, 5, 25, 0, 0, 124, 141, 3, 0, 0, 8, 125, 126, 10, 6, 0, 0, 126, 127, 5, 27, 0, 0, 127, 141, 3, 0, 0, 7, 128, 129, 10, 5, 0, 0, 129, 130, 5, 26, 0, 0, 130, 141, 3, 0, 0, 6, 131, 132, 10, 4, 0, 0, 132, 133, 5, 28, 0, 0, 133, 141, 3, 0, 0, 5, 134, 135, 10, 3, 0, 0, 135, 136, 5, 29, 0, 0, 136, 141, 3, 0, 0, 4, 137, 138, 10, 24, 0, 0, 138, 139, 5, 14, 0, 0, 139, 141, 5, 48, 0, 0, 140, 88, 1, 0, 0, 0, 140, 91, 1, 0, 0, 0, 140, 94, 1, 0, 0, 0, 140, 97, 1, 0, 0, 0, 140, 100, 1, 0, 0, 0, 140, 106, 1, 0, 0, 0, 140, 111, 1, 0, 0, 0, 140, 116, 1, 0, 0, 0, 140, 119, 1, 0, 0, 0, 140, 122, 1, 0, 0, 0, 140, 125, 1, 0, 0, 0, 140, 128, 1, 0, 0, 0, 140, 131, 1, 0, 0, 0, 140, 134, 1, 0, 0, 0, 140, 137, 1, 0, 0, 0, 141, 144, 1, 0, 0, 0, 142, 140, 1, 0, 0, 0, 142, 143, 1, 0, 0, 0, 143, 1, 1, 0, 0, 0, 144, 142, 1, 0, 0, 0, 9, 22, 26, 73, 77, 79, 86, 102, 140, 142] \ No newline at end of file diff --git a/internal/parser/planparserv2/generated/plan_parser.go b/internal/parser/planparserv2/generated/plan_parser.go index c47592d1de..00a28bff25 100644 --- a/internal/parser/planparserv2/generated/plan_parser.go +++ b/internal/parser/planparserv2/generated/plan_parser.go @@ -52,80 +52,77 @@ func planParserInit() { } staticData.PredictionContextCache = antlr.NewPredictionContextCache() staticData.serializedATN = []int32{ - 4, 1, 51, 152, 2, 0, 7, 0, 1, 0, 1, 0, 3, 0, 5, 8, 0, 1, 0, 1, 0, 3, 0, - 9, 8, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, - 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 5, 0, 27, 8, 0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, 0, 0, 0, 26, 24, 1, 0, 0, 0, 27, 30, 1, 0, 0, 0, 28, - 26, 1, 0, 0, 0, 28, 29, 1, 0, 0, 0, 29, 32, 1, 0, 0, 0, 30, 28, 1, 0, 0, - 0, 31, 33, 5, 4, 0, 0, 32, 31, 1, 0, 0, 0, 32, 33, 1, 0, 0, 0, 33, 34, - 1, 0, 0, 0, 34, 35, 5, 5, 0, 0, 35, 93, 1, 0, 0, 0, 36, 93, 5, 35, 0, 0, - 37, 38, 5, 15, 0, 0, 38, 93, 3, 0, 0, 25, 39, 40, 5, 16, 0, 0, 40, 41, - 5, 1, 0, 0, 41, 42, 5, 46, 0, 0, 42, 43, 5, 4, 0, 0, 43, 44, 5, 48, 0, - 0, 44, 93, 5, 2, 0, 0, 45, 46, 7, 2, 0, 0, 46, 93, 3, 0, 0, 21, 47, 48, - 7, 3, 0, 0, 48, 49, 5, 1, 0, 0, 49, 50, 3, 0, 0, 0, 50, 51, 5, 4, 0, 0, - 51, 52, 3, 0, 0, 0, 52, 53, 5, 2, 0, 0, 53, 93, 1, 0, 0, 0, 54, 55, 7, - 4, 0, 0, 55, 56, 5, 1, 0, 0, 56, 57, 3, 0, 0, 0, 57, 58, 5, 4, 0, 0, 58, - 59, 3, 0, 0, 0, 59, 60, 5, 2, 0, 0, 60, 93, 1, 0, 0, 0, 61, 62, 7, 5, 0, - 0, 62, 63, 5, 1, 0, 0, 63, 64, 3, 0, 0, 0, 64, 65, 5, 4, 0, 0, 65, 66, - 3, 0, 0, 0, 66, 67, 5, 2, 0, 0, 67, 93, 1, 0, 0, 0, 68, 69, 5, 42, 0, 0, - 69, 70, 5, 1, 0, 0, 70, 71, 7, 6, 0, 0, 71, 93, 5, 2, 0, 0, 72, 73, 5, - 46, 0, 0, 73, 85, 5, 1, 0, 0, 74, 79, 3, 0, 0, 0, 75, 76, 5, 4, 0, 0, 76, - 78, 3, 0, 0, 0, 77, 75, 1, 0, 0, 0, 78, 81, 1, 0, 0, 0, 79, 77, 1, 0, 0, - 0, 79, 80, 1, 0, 0, 0, 80, 83, 1, 0, 0, 0, 81, 79, 1, 0, 0, 0, 82, 84, - 5, 4, 0, 0, 83, 82, 1, 0, 0, 0, 83, 84, 1, 0, 0, 0, 84, 86, 1, 0, 0, 0, - 85, 74, 1, 0, 0, 0, 85, 86, 1, 0, 0, 0, 86, 87, 1, 0, 0, 0, 87, 93, 5, - 2, 0, 0, 88, 89, 7, 6, 0, 0, 89, 93, 5, 30, 0, 0, 90, 91, 7, 6, 0, 0, 91, - 93, 5, 31, 0, 0, 92, 2, 1, 0, 0, 0, 92, 8, 1, 0, 0, 0, 92, 11, 1, 0, 0, - 0, 92, 12, 1, 0, 0, 0, 92, 13, 1, 0, 0, 0, 92, 14, 1, 0, 0, 0, 92, 15, - 1, 0, 0, 0, 92, 18, 1, 0, 0, 0, 92, 22, 1, 0, 0, 0, 92, 36, 1, 0, 0, 0, - 92, 37, 1, 0, 0, 0, 92, 39, 1, 0, 0, 0, 92, 45, 1, 0, 0, 0, 92, 47, 1, - 0, 0, 0, 92, 54, 1, 0, 0, 0, 92, 61, 1, 0, 0, 0, 92, 68, 1, 0, 0, 0, 92, - 72, 1, 0, 0, 0, 92, 88, 1, 0, 0, 0, 92, 90, 1, 0, 0, 0, 93, 148, 1, 0, - 0, 0, 94, 95, 10, 22, 0, 0, 95, 96, 5, 22, 0, 0, 96, 147, 3, 0, 0, 23, - 97, 98, 10, 20, 0, 0, 98, 99, 7, 7, 0, 0, 99, 147, 3, 0, 0, 21, 100, 101, - 10, 19, 0, 0, 101, 102, 7, 0, 0, 0, 102, 147, 3, 0, 0, 20, 103, 104, 10, - 18, 0, 0, 104, 105, 7, 8, 0, 0, 105, 147, 3, 0, 0, 19, 106, 108, 10, 17, - 0, 0, 107, 109, 5, 33, 0, 0, 108, 107, 1, 0, 0, 0, 108, 109, 1, 0, 0, 0, - 109, 110, 1, 0, 0, 0, 110, 111, 5, 34, 0, 0, 111, 147, 3, 0, 0, 18, 112, - 113, 10, 11, 0, 0, 113, 114, 7, 9, 0, 0, 114, 115, 7, 6, 0, 0, 115, 116, - 7, 9, 0, 0, 116, 147, 3, 0, 0, 12, 117, 118, 10, 10, 0, 0, 118, 119, 7, - 10, 0, 0, 119, 120, 7, 6, 0, 0, 120, 121, 7, 10, 0, 0, 121, 147, 3, 0, - 0, 11, 122, 123, 10, 9, 0, 0, 123, 124, 7, 11, 0, 0, 124, 147, 3, 0, 0, - 10, 125, 126, 10, 8, 0, 0, 126, 127, 7, 12, 0, 0, 127, 147, 3, 0, 0, 9, - 128, 129, 10, 7, 0, 0, 129, 130, 5, 25, 0, 0, 130, 147, 3, 0, 0, 8, 131, - 132, 10, 6, 0, 0, 132, 133, 5, 27, 0, 0, 133, 147, 3, 0, 0, 7, 134, 135, - 10, 5, 0, 0, 135, 136, 5, 26, 0, 0, 136, 147, 3, 0, 0, 6, 137, 138, 10, - 4, 0, 0, 138, 139, 5, 28, 0, 0, 139, 147, 3, 0, 0, 5, 140, 141, 10, 3, - 0, 0, 141, 142, 5, 29, 0, 0, 142, 147, 3, 0, 0, 4, 143, 144, 10, 24, 0, - 0, 144, 145, 5, 14, 0, 0, 145, 147, 5, 48, 0, 0, 146, 94, 1, 0, 0, 0, 146, - 97, 1, 0, 0, 0, 146, 100, 1, 0, 0, 0, 146, 103, 1, 0, 0, 0, 146, 106, 1, - 0, 0, 0, 146, 112, 1, 0, 0, 0, 146, 117, 1, 0, 0, 0, 146, 122, 1, 0, 0, - 0, 146, 125, 1, 0, 0, 0, 146, 128, 1, 0, 0, 0, 146, 131, 1, 0, 0, 0, 146, - 134, 1, 0, 0, 0, 146, 137, 1, 0, 0, 0, 146, 140, 1, 0, 0, 0, 146, 143, - 1, 0, 0, 0, 147, 150, 1, 0, 0, 0, 148, 146, 1, 0, 0, 0, 148, 149, 1, 0, - 0, 0, 149, 1, 1, 0, 0, 0, 150, 148, 1, 0, 0, 0, 11, 4, 8, 28, 32, 79, 83, - 85, 92, 108, 146, 148, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 5, 0, 141, 8, 0, 10, 0, 12, 0, 144, 9, 0, + 1, 0, 0, 1, 0, 1, 0, 0, 13, 1, 0, 46, 47, 2, 0, 17, 18, 32, 33, 2, 0, 36, + 36, 39, 39, 2, 0, 37, 37, 40, 40, 2, 0, 38, 38, 41, 41, 2, 0, 46, 46, 49, + 49, 1, 0, 19, 21, 1, 0, 17, 18, 1, 0, 23, 24, 1, 0, 8, 9, 1, 0, 10, 11, + 1, 0, 8, 11, 1, 0, 12, 13, 184, 0, 86, 1, 0, 0, 0, 2, 3, 6, 0, -1, 0, 3, + 87, 5, 44, 0, 0, 4, 87, 5, 45, 0, 0, 5, 87, 5, 43, 0, 0, 6, 87, 5, 48, + 0, 0, 7, 87, 7, 0, 0, 0, 8, 87, 5, 49, 0, 0, 9, 10, 5, 6, 0, 0, 10, 11, + 5, 46, 0, 0, 11, 87, 5, 7, 0, 0, 12, 13, 5, 1, 0, 0, 13, 14, 3, 0, 0, 0, + 14, 15, 5, 2, 0, 0, 15, 87, 1, 0, 0, 0, 16, 17, 5, 3, 0, 0, 17, 22, 3, + 0, 0, 0, 18, 19, 5, 4, 0, 0, 19, 21, 3, 0, 0, 0, 20, 18, 1, 0, 0, 0, 21, + 24, 1, 0, 0, 0, 22, 20, 1, 0, 0, 0, 22, 23, 1, 0, 0, 0, 23, 26, 1, 0, 0, + 0, 24, 22, 1, 0, 0, 0, 25, 27, 5, 4, 0, 0, 26, 25, 1, 0, 0, 0, 26, 27, + 1, 0, 0, 0, 27, 28, 1, 0, 0, 0, 28, 29, 5, 5, 0, 0, 29, 87, 1, 0, 0, 0, + 30, 87, 5, 35, 0, 0, 31, 32, 5, 15, 0, 0, 32, 87, 3, 0, 0, 25, 33, 34, + 5, 16, 0, 0, 34, 35, 5, 1, 0, 0, 35, 36, 5, 46, 0, 0, 36, 37, 5, 4, 0, + 0, 37, 38, 5, 48, 0, 0, 38, 87, 5, 2, 0, 0, 39, 40, 7, 1, 0, 0, 40, 87, + 3, 0, 0, 21, 41, 42, 7, 2, 0, 0, 42, 43, 5, 1, 0, 0, 43, 44, 3, 0, 0, 0, + 44, 45, 5, 4, 0, 0, 45, 46, 3, 0, 0, 0, 46, 47, 5, 2, 0, 0, 47, 87, 1, + 0, 0, 0, 48, 49, 7, 3, 0, 0, 49, 50, 5, 1, 0, 0, 50, 51, 3, 0, 0, 0, 51, + 52, 5, 4, 0, 0, 52, 53, 3, 0, 0, 0, 53, 54, 5, 2, 0, 0, 54, 87, 1, 0, 0, + 0, 55, 56, 7, 4, 0, 0, 56, 57, 5, 1, 0, 0, 57, 58, 3, 0, 0, 0, 58, 59, + 5, 4, 0, 0, 59, 60, 3, 0, 0, 0, 60, 61, 5, 2, 0, 0, 61, 87, 1, 0, 0, 0, + 62, 63, 5, 42, 0, 0, 63, 64, 5, 1, 0, 0, 64, 65, 7, 5, 0, 0, 65, 87, 5, + 2, 0, 0, 66, 67, 5, 46, 0, 0, 67, 79, 5, 1, 0, 0, 68, 73, 3, 0, 0, 0, 69, + 70, 5, 4, 0, 0, 70, 72, 3, 0, 0, 0, 71, 69, 1, 0, 0, 0, 72, 75, 1, 0, 0, + 0, 73, 71, 1, 0, 0, 0, 73, 74, 1, 0, 0, 0, 74, 77, 1, 0, 0, 0, 75, 73, + 1, 0, 0, 0, 76, 78, 5, 4, 0, 0, 77, 76, 1, 0, 0, 0, 77, 78, 1, 0, 0, 0, + 78, 80, 1, 0, 0, 0, 79, 68, 1, 0, 0, 0, 79, 80, 1, 0, 0, 0, 80, 81, 1, + 0, 0, 0, 81, 87, 5, 2, 0, 0, 82, 83, 7, 5, 0, 0, 83, 87, 5, 30, 0, 0, 84, + 85, 7, 5, 0, 0, 85, 87, 5, 31, 0, 0, 86, 2, 1, 0, 0, 0, 86, 4, 1, 0, 0, + 0, 86, 5, 1, 0, 0, 0, 86, 6, 1, 0, 0, 0, 86, 7, 1, 0, 0, 0, 86, 8, 1, 0, + 0, 0, 86, 9, 1, 0, 0, 0, 86, 12, 1, 0, 0, 0, 86, 16, 1, 0, 0, 0, 86, 30, + 1, 0, 0, 0, 86, 31, 1, 0, 0, 0, 86, 33, 1, 0, 0, 0, 86, 39, 1, 0, 0, 0, + 86, 41, 1, 0, 0, 0, 86, 48, 1, 0, 0, 0, 86, 55, 1, 0, 0, 0, 86, 62, 1, + 0, 0, 0, 86, 66, 1, 0, 0, 0, 86, 82, 1, 0, 0, 0, 86, 84, 1, 0, 0, 0, 87, + 142, 1, 0, 0, 0, 88, 89, 10, 22, 0, 0, 89, 90, 5, 22, 0, 0, 90, 141, 3, + 0, 0, 23, 91, 92, 10, 20, 0, 0, 92, 93, 7, 6, 0, 0, 93, 141, 3, 0, 0, 21, + 94, 95, 10, 19, 0, 0, 95, 96, 7, 7, 0, 0, 96, 141, 3, 0, 0, 20, 97, 98, + 10, 18, 0, 0, 98, 99, 7, 8, 0, 0, 99, 141, 3, 0, 0, 19, 100, 102, 10, 17, + 0, 0, 101, 103, 5, 33, 0, 0, 102, 101, 1, 0, 0, 0, 102, 103, 1, 0, 0, 0, + 103, 104, 1, 0, 0, 0, 104, 105, 5, 34, 0, 0, 105, 141, 3, 0, 0, 18, 106, + 107, 10, 11, 0, 0, 107, 108, 7, 9, 0, 0, 108, 109, 7, 5, 0, 0, 109, 110, + 7, 9, 0, 0, 110, 141, 3, 0, 0, 12, 111, 112, 10, 10, 0, 0, 112, 113, 7, + 10, 0, 0, 113, 114, 7, 5, 0, 0, 114, 115, 7, 10, 0, 0, 115, 141, 3, 0, + 0, 11, 116, 117, 10, 9, 0, 0, 117, 118, 7, 11, 0, 0, 118, 141, 3, 0, 0, + 10, 119, 120, 10, 8, 0, 0, 120, 121, 7, 12, 0, 0, 121, 141, 3, 0, 0, 9, + 122, 123, 10, 7, 0, 0, 123, 124, 5, 25, 0, 0, 124, 141, 3, 0, 0, 8, 125, + 126, 10, 6, 0, 0, 126, 127, 5, 27, 0, 0, 127, 141, 3, 0, 0, 7, 128, 129, + 10, 5, 0, 0, 129, 130, 5, 26, 0, 0, 130, 141, 3, 0, 0, 6, 131, 132, 10, + 4, 0, 0, 132, 133, 5, 28, 0, 0, 133, 141, 3, 0, 0, 5, 134, 135, 10, 3, + 0, 0, 135, 136, 5, 29, 0, 0, 136, 141, 3, 0, 0, 4, 137, 138, 10, 24, 0, + 0, 138, 139, 5, 14, 0, 0, 139, 141, 5, 48, 0, 0, 140, 88, 1, 0, 0, 0, 140, + 91, 1, 0, 0, 0, 140, 94, 1, 0, 0, 0, 140, 97, 1, 0, 0, 0, 140, 100, 1, + 0, 0, 0, 140, 106, 1, 0, 0, 0, 140, 111, 1, 0, 0, 0, 140, 116, 1, 0, 0, + 0, 140, 119, 1, 0, 0, 0, 140, 122, 1, 0, 0, 0, 140, 125, 1, 0, 0, 0, 140, + 128, 1, 0, 0, 0, 140, 131, 1, 0, 0, 0, 140, 134, 1, 0, 0, 0, 140, 137, + 1, 0, 0, 0, 141, 144, 1, 0, 0, 0, 142, 140, 1, 0, 0, 0, 142, 143, 1, 0, + 0, 0, 143, 1, 1, 0, 0, 0, 144, 142, 1, 0, 0, 0, 9, 22, 26, 73, 77, 79, + 86, 102, 140, 142, } deserializer := antlr.NewATNDeserializer(nil) staticData.atn = deserializer.Deserialize(staticData.serializedATN) @@ -404,14 +401,6 @@ func (s *FloatingContext) FloatingConstant() antlr.TerminalNode { return s.GetToken(PlanParserFloatingConstant, 0) } -func (s *FloatingContext) ADD() antlr.TerminalNode { - return s.GetToken(PlanParserADD, 0) -} - -func (s *FloatingContext) SUB() antlr.TerminalNode { - return s.GetToken(PlanParserSUB, 0) -} - func (s *FloatingContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { switch t := visitor.(type) { case PlanVisitor: @@ -1977,14 +1966,6 @@ func (s *IntegerContext) IntegerConstant() antlr.TerminalNode { return s.GetToken(PlanParserIntegerConstant, 0) } -func (s *IntegerContext) ADD() antlr.TerminalNode { - return s.GetToken(PlanParserADD, 0) -} - -func (s *IntegerContext) SUB() antlr.TerminalNode { - return s.GetToken(PlanParserSUB, 0) -} - func (s *IntegerContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { switch t := visitor.(type) { case PlanVisitor: @@ -2466,41 +2447,20 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { var _alt int p.EnterOuterAlt(localctx, 1) - p.SetState(92) + p.SetState(86) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 7, p.GetParserRuleContext()) { + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 5, p.GetParserRuleContext()) { case 1: localctx = NewIntegerContext(p, localctx) p.SetParserRuleContext(localctx) _prevctx = localctx - p.SetState(4) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == PlanParserADD || _la == PlanParserSUB { - { - p.SetState(3) - _la = p.GetTokenStream().LA(1) - - if !(_la == PlanParserADD || _la == PlanParserSUB) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - - } { - p.SetState(6) + p.SetState(3) p.Match(PlanParserIntegerConstant) if p.HasError() { // Recognition error - abort rule @@ -2512,29 +2472,8 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { localctx = NewFloatingContext(p, localctx) p.SetParserRuleContext(localctx) _prevctx = localctx - p.SetState(8) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == PlanParserADD || _la == PlanParserSUB { - { - p.SetState(7) - _la = p.GetTokenStream().LA(1) - - if !(_la == PlanParserADD || _la == PlanParserSUB) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - - } { - p.SetState(10) + p.SetState(4) p.Match(PlanParserFloatingConstant) if p.HasError() { // Recognition error - abort rule @@ -2547,7 +2486,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(11) + p.SetState(5) p.Match(PlanParserBooleanConstant) if p.HasError() { // Recognition error - abort rule @@ -2560,7 +2499,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(12) + p.SetState(6) p.Match(PlanParserStringLiteral) if p.HasError() { // Recognition error - abort rule @@ -2573,7 +2512,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(13) + p.SetState(7) _la = p.GetTokenStream().LA(1) if !(_la == PlanParserIdentifier || _la == PlanParserMeta) { @@ -2589,7 +2528,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(14) + p.SetState(8) p.Match(PlanParserJSONIdentifier) if p.HasError() { // Recognition error - abort rule @@ -2602,7 +2541,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(15) + p.SetState(9) p.Match(PlanParserLBRACE) if p.HasError() { // Recognition error - abort rule @@ -2610,7 +2549,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(16) + p.SetState(10) p.Match(PlanParserIdentifier) if p.HasError() { // Recognition error - abort rule @@ -2618,7 +2557,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(17) + p.SetState(11) p.Match(PlanParserRBRACE) if p.HasError() { // Recognition error - abort rule @@ -2631,7 +2570,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(18) + p.SetState(12) p.Match(PlanParserT__0) if p.HasError() { // Recognition error - abort rule @@ -2639,11 +2578,11 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(19) + p.SetState(13) p.expr(0) } { - p.SetState(20) + p.SetState(14) p.Match(PlanParserT__1) if p.HasError() { // Recognition error - abort rule @@ -2656,7 +2595,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(22) + p.SetState(16) p.Match(PlanParserT__2) if p.HasError() { // Recognition error - abort rule @@ -2664,22 +2603,22 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(23) + p.SetState(17) p.expr(0) } - p.SetState(28) + p.SetState(22) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 2, p.GetParserRuleContext()) + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 0, p.GetParserRuleContext()) if p.HasError() { goto errorExit } for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { if _alt == 1 { { - p.SetState(24) + p.SetState(18) p.Match(PlanParserT__3) if p.HasError() { // Recognition error - abort rule @@ -2687,22 +2626,22 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(25) + p.SetState(19) p.expr(0) } } - p.SetState(30) + p.SetState(24) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 2, p.GetParserRuleContext()) + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 0, p.GetParserRuleContext()) if p.HasError() { goto errorExit } } - p.SetState(32) + p.SetState(26) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -2711,7 +2650,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { if _la == PlanParserT__3 { { - p.SetState(31) + p.SetState(25) p.Match(PlanParserT__3) if p.HasError() { // Recognition error - abort rule @@ -2721,7 +2660,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } { - p.SetState(34) + p.SetState(28) p.Match(PlanParserT__4) if p.HasError() { // Recognition error - abort rule @@ -2734,7 +2673,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(36) + p.SetState(30) p.Match(PlanParserEmptyArray) if p.HasError() { // Recognition error - abort rule @@ -2747,7 +2686,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(37) + p.SetState(31) p.Match(PlanParserEXISTS) if p.HasError() { // Recognition error - abort rule @@ -2755,7 +2694,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(38) + p.SetState(32) p.expr(25) } @@ -2764,7 +2703,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(39) + p.SetState(33) p.Match(PlanParserTEXTMATCH) if p.HasError() { // Recognition error - abort rule @@ -2772,7 +2711,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(40) + p.SetState(34) p.Match(PlanParserT__0) if p.HasError() { // Recognition error - abort rule @@ -2780,7 +2719,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(41) + p.SetState(35) p.Match(PlanParserIdentifier) if p.HasError() { // Recognition error - abort rule @@ -2788,7 +2727,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(42) + p.SetState(36) p.Match(PlanParserT__3) if p.HasError() { // Recognition error - abort rule @@ -2796,7 +2735,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(43) + p.SetState(37) p.Match(PlanParserStringLiteral) if p.HasError() { // Recognition error - abort rule @@ -2804,7 +2743,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(44) + p.SetState(38) p.Match(PlanParserT__1) if p.HasError() { // Recognition error - abort rule @@ -2817,7 +2756,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(45) + p.SetState(39) var _lt = p.GetTokenStream().LT(1) @@ -2835,7 +2774,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(46) + p.SetState(40) p.expr(21) } @@ -2844,7 +2783,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(47) + p.SetState(41) _la = p.GetTokenStream().LA(1) if !(_la == PlanParserJSONContains || _la == PlanParserArrayContains) { @@ -2855,7 +2794,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(48) + p.SetState(42) p.Match(PlanParserT__0) if p.HasError() { // Recognition error - abort rule @@ -2863,11 +2802,11 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(49) + p.SetState(43) p.expr(0) } { - p.SetState(50) + p.SetState(44) p.Match(PlanParserT__3) if p.HasError() { // Recognition error - abort rule @@ -2875,11 +2814,11 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(51) + p.SetState(45) p.expr(0) } { - p.SetState(52) + p.SetState(46) p.Match(PlanParserT__1) if p.HasError() { // Recognition error - abort rule @@ -2892,7 +2831,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(54) + p.SetState(48) _la = p.GetTokenStream().LA(1) if !(_la == PlanParserJSONContainsAll || _la == PlanParserArrayContainsAll) { @@ -2903,7 +2842,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(55) + p.SetState(49) p.Match(PlanParserT__0) if p.HasError() { // Recognition error - abort rule @@ -2911,11 +2850,11 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(56) + p.SetState(50) p.expr(0) } { - p.SetState(57) + p.SetState(51) p.Match(PlanParserT__3) if p.HasError() { // Recognition error - abort rule @@ -2923,11 +2862,11 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(58) + p.SetState(52) p.expr(0) } { - p.SetState(59) + p.SetState(53) p.Match(PlanParserT__1) if p.HasError() { // Recognition error - abort rule @@ -2940,7 +2879,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(61) + p.SetState(55) _la = p.GetTokenStream().LA(1) if !(_la == PlanParserJSONContainsAny || _la == PlanParserArrayContainsAny) { @@ -2951,7 +2890,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(62) + p.SetState(56) p.Match(PlanParserT__0) if p.HasError() { // Recognition error - abort rule @@ -2959,11 +2898,11 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(63) + p.SetState(57) p.expr(0) } { - p.SetState(64) + p.SetState(58) p.Match(PlanParserT__3) if p.HasError() { // Recognition error - abort rule @@ -2971,11 +2910,11 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(65) + p.SetState(59) p.expr(0) } { - p.SetState(66) + p.SetState(60) p.Match(PlanParserT__1) if p.HasError() { // Recognition error - abort rule @@ -2988,7 +2927,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(68) + p.SetState(62) p.Match(PlanParserArrayLength) if p.HasError() { // Recognition error - abort rule @@ -2996,7 +2935,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(69) + p.SetState(63) p.Match(PlanParserT__0) if p.HasError() { // Recognition error - abort rule @@ -3004,7 +2943,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(70) + p.SetState(64) _la = p.GetTokenStream().LA(1) if !(_la == PlanParserIdentifier || _la == PlanParserJSONIdentifier) { @@ -3015,7 +2954,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(71) + p.SetState(65) p.Match(PlanParserT__1) if p.HasError() { // Recognition error - abort rule @@ -3028,7 +2967,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(72) + p.SetState(66) p.Match(PlanParserIdentifier) if p.HasError() { // Recognition error - abort rule @@ -3036,14 +2975,14 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(73) + p.SetState(67) p.Match(PlanParserT__0) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(85) + p.SetState(79) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -3052,22 +2991,22 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { if (int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&1125878432497738) != 0 { { - p.SetState(74) + p.SetState(68) p.expr(0) } - p.SetState(79) + p.SetState(73) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 4, p.GetParserRuleContext()) + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 2, p.GetParserRuleContext()) if p.HasError() { goto errorExit } for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { if _alt == 1 { { - p.SetState(75) + p.SetState(69) p.Match(PlanParserT__3) if p.HasError() { // Recognition error - abort rule @@ -3075,22 +3014,22 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(76) + p.SetState(70) p.expr(0) } } - p.SetState(81) + p.SetState(75) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 4, p.GetParserRuleContext()) + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 2, p.GetParserRuleContext()) if p.HasError() { goto errorExit } } - p.SetState(83) + p.SetState(77) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -3099,7 +3038,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { if _la == PlanParserT__3 { { - p.SetState(82) + p.SetState(76) p.Match(PlanParserT__3) if p.HasError() { // Recognition error - abort rule @@ -3111,7 +3050,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } { - p.SetState(87) + p.SetState(81) p.Match(PlanParserT__1) if p.HasError() { // Recognition error - abort rule @@ -3124,7 +3063,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(88) + p.SetState(82) _la = p.GetTokenStream().LA(1) if !(_la == PlanParserIdentifier || _la == PlanParserJSONIdentifier) { @@ -3135,7 +3074,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(89) + p.SetState(83) p.Match(PlanParserISNULL) if p.HasError() { // Recognition error - abort rule @@ -3148,7 +3087,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(90) + p.SetState(84) _la = p.GetTokenStream().LA(1) if !(_la == PlanParserIdentifier || _la == PlanParserJSONIdentifier) { @@ -3159,7 +3098,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(91) + p.SetState(85) p.Match(PlanParserISNOTNULL) if p.HasError() { // Recognition error - abort rule @@ -3171,12 +3110,12 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { goto errorExit } p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1)) - p.SetState(148) + p.SetState(142) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 10, p.GetParserRuleContext()) + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 8, p.GetParserRuleContext()) if p.HasError() { goto errorExit } @@ -3186,24 +3125,24 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { p.TriggerExitRuleEvent() } _prevctx = localctx - p.SetState(146) + p.SetState(140) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 9, p.GetParserRuleContext()) { + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 7, p.GetParserRuleContext()) { case 1: localctx = NewPowerContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(94) + p.SetState(88) if !(p.Precpred(p.GetParserRuleContext(), 22)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 22)", "")) goto errorExit } { - p.SetState(95) + p.SetState(89) p.Match(PlanParserPOW) if p.HasError() { // Recognition error - abort rule @@ -3211,21 +3150,21 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(96) + p.SetState(90) p.expr(23) } case 2: localctx = NewMulDivModContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(97) + p.SetState(91) if !(p.Precpred(p.GetParserRuleContext(), 20)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 20)", "")) goto errorExit } { - p.SetState(98) + p.SetState(92) var _lt = p.GetTokenStream().LT(1) @@ -3243,21 +3182,21 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(99) + p.SetState(93) p.expr(21) } case 3: localctx = NewAddSubContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(100) + p.SetState(94) if !(p.Precpred(p.GetParserRuleContext(), 19)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 19)", "")) goto errorExit } { - p.SetState(101) + p.SetState(95) var _lt = p.GetTokenStream().LT(1) @@ -3275,21 +3214,21 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(102) + p.SetState(96) p.expr(20) } case 4: localctx = NewShiftContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(103) + p.SetState(97) if !(p.Precpred(p.GetParserRuleContext(), 18)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 18)", "")) goto errorExit } { - p.SetState(104) + p.SetState(98) var _lt = p.GetTokenStream().LT(1) @@ -3307,20 +3246,20 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(105) + p.SetState(99) p.expr(19) } case 5: localctx = NewTermContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(106) + p.SetState(100) if !(p.Precpred(p.GetParserRuleContext(), 17)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 17)", "")) goto errorExit } - p.SetState(108) + p.SetState(102) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -3329,7 +3268,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { if _la == PlanParserNOT { { - p.SetState(107) + p.SetState(101) var _m = p.Match(PlanParserNOT) @@ -3342,7 +3281,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } { - p.SetState(110) + p.SetState(104) p.Match(PlanParserIN) if p.HasError() { // Recognition error - abort rule @@ -3350,21 +3289,21 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(111) + p.SetState(105) p.expr(18) } case 6: localctx = NewRangeContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(112) + p.SetState(106) if !(p.Precpred(p.GetParserRuleContext(), 11)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 11)", "")) goto errorExit } { - p.SetState(113) + p.SetState(107) var _lt = p.GetTokenStream().LT(1) @@ -3382,7 +3321,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(114) + p.SetState(108) _la = p.GetTokenStream().LA(1) if !(_la == PlanParserIdentifier || _la == PlanParserJSONIdentifier) { @@ -3393,7 +3332,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(115) + p.SetState(109) var _lt = p.GetTokenStream().LT(1) @@ -3411,21 +3350,21 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(116) + p.SetState(110) p.expr(12) } case 7: localctx = NewReverseRangeContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(117) + p.SetState(111) if !(p.Precpred(p.GetParserRuleContext(), 10)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 10)", "")) goto errorExit } { - p.SetState(118) + p.SetState(112) var _lt = p.GetTokenStream().LT(1) @@ -3443,7 +3382,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(119) + p.SetState(113) _la = p.GetTokenStream().LA(1) if !(_la == PlanParserIdentifier || _la == PlanParserJSONIdentifier) { @@ -3454,7 +3393,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(120) + p.SetState(114) var _lt = p.GetTokenStream().LT(1) @@ -3472,21 +3411,21 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(121) + p.SetState(115) p.expr(11) } case 8: localctx = NewRelationalContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(122) + p.SetState(116) if !(p.Precpred(p.GetParserRuleContext(), 9)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 9)", "")) goto errorExit } { - p.SetState(123) + p.SetState(117) var _lt = p.GetTokenStream().LT(1) @@ -3504,21 +3443,21 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(124) + p.SetState(118) p.expr(10) } case 9: localctx = NewEqualityContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(125) + p.SetState(119) if !(p.Precpred(p.GetParserRuleContext(), 8)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 8)", "")) goto errorExit } { - p.SetState(126) + p.SetState(120) var _lt = p.GetTokenStream().LT(1) @@ -3536,21 +3475,21 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(127) + p.SetState(121) p.expr(9) } case 10: localctx = NewBitAndContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(128) + p.SetState(122) if !(p.Precpred(p.GetParserRuleContext(), 7)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 7)", "")) goto errorExit } { - p.SetState(129) + p.SetState(123) p.Match(PlanParserBAND) if p.HasError() { // Recognition error - abort rule @@ -3558,21 +3497,21 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(130) + p.SetState(124) p.expr(8) } case 11: localctx = NewBitXorContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(131) + p.SetState(125) if !(p.Precpred(p.GetParserRuleContext(), 6)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 6)", "")) goto errorExit } { - p.SetState(132) + p.SetState(126) p.Match(PlanParserBXOR) if p.HasError() { // Recognition error - abort rule @@ -3580,21 +3519,21 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(133) + p.SetState(127) p.expr(7) } case 12: localctx = NewBitOrContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(134) + p.SetState(128) if !(p.Precpred(p.GetParserRuleContext(), 5)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 5)", "")) goto errorExit } { - p.SetState(135) + p.SetState(129) p.Match(PlanParserBOR) if p.HasError() { // Recognition error - abort rule @@ -3602,21 +3541,21 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(136) + p.SetState(130) p.expr(6) } case 13: localctx = NewLogicalAndContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(137) + p.SetState(131) if !(p.Precpred(p.GetParserRuleContext(), 4)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 4)", "")) goto errorExit } { - p.SetState(138) + p.SetState(132) p.Match(PlanParserAND) if p.HasError() { // Recognition error - abort rule @@ -3624,21 +3563,21 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(139) + p.SetState(133) p.expr(5) } case 14: localctx = NewLogicalOrContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(140) + p.SetState(134) if !(p.Precpred(p.GetParserRuleContext(), 3)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 3)", "")) goto errorExit } { - p.SetState(141) + p.SetState(135) p.Match(PlanParserOR) if p.HasError() { // Recognition error - abort rule @@ -3646,21 +3585,21 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(142) + p.SetState(136) p.expr(4) } case 15: localctx = NewLikeContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(143) + p.SetState(137) if !(p.Precpred(p.GetParserRuleContext(), 24)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 24)", "")) goto errorExit } { - p.SetState(144) + p.SetState(138) p.Match(PlanParserLIKE) if p.HasError() { // Recognition error - abort rule @@ -3668,7 +3607,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(145) + p.SetState(139) p.Match(PlanParserStringLiteral) if p.HasError() { // Recognition error - abort rule @@ -3681,12 +3620,12 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } - p.SetState(150) + p.SetState(144) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 10, p.GetParserRuleContext()) + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 8, p.GetParserRuleContext()) if p.HasError() { goto errorExit } diff --git a/internal/parser/planparserv2/parser_visitor.go b/internal/parser/planparserv2/parser_visitor.go index 51e0d75376..535bf06856 100644 --- a/internal/parser/planparserv2/parser_visitor.go +++ b/internal/parser/planparserv2/parser_visitor.go @@ -93,7 +93,7 @@ func (v *ParserVisitor) VisitBoolean(ctx *parser.BooleanContext) interface{} { // VisitInteger translates expr to GenericValue. func (v *ParserVisitor) VisitInteger(ctx *parser.IntegerContext) interface{} { - literal := ctx.GetText() + literal := ctx.IntegerConstant().GetText() i, err := strconv.ParseInt(literal, 0, 64) if err != nil { return err @@ -113,7 +113,7 @@ func (v *ParserVisitor) VisitInteger(ctx *parser.IntegerContext) interface{} { // VisitFloating translates expr to GenericValue. func (v *ParserVisitor) VisitFloating(ctx *parser.FloatingContext) interface{} { - literal := ctx.GetText() + literal := ctx.FloatingConstant().GetText() f, err := strconv.ParseFloat(literal, 64) if err != nil { return err diff --git a/internal/parser/planparserv2/plan_parser_v2_test.go b/internal/parser/planparserv2/plan_parser_v2_test.go index 483f8dd2b8..307550d633 100644 --- a/internal/parser/planparserv2/plan_parser_v2_test.go +++ b/internal/parser/planparserv2/plan_parser_v2_test.go @@ -182,7 +182,6 @@ func TestExpr_UnaryRange(t *testing.T) { `VarCharField <= "str7"`, `JSONField["A"] > 10`, `$meta["A"] > 10`, - `A == -9223372036854775808`, } for _, exprStr := range exprStrs { assertValidExpr(t, helper, exprStr) @@ -638,6 +637,7 @@ func TestExpr_Invalid(t *testing.T) { `"str" != false`, `VarCharField != FloatField`, `FloatField == VarCharField`, + `A == -9223372036854775808`, // ---------------------- relational -------------------- //`not_in_schema < 1`, // maybe in json //`1 <= not_in_schema`, // maybe in json