@@ -561,7 +561,7 @@ TNodePtr TSqlExpression::JsonValueCaseHandler(const TRule_json_case_handler& nod
561
561
}
562
562
case TRule_json_case_handler::kAltJsonCaseHandler3 :
563
563
mode = EJsonValueHandlerMode::DefaultValue;
564
- return Build (node.GetAlt_json_case_handler3 ().GetBlock1 (). GetRule_expr2 ());
564
+ return Build (node.GetAlt_json_case_handler3 ().GetRule_expr2 ());
565
565
case TRule_json_case_handler::ALT_NOT_SET:
566
566
Y_ABORT (" You should change implementation according to grammar changes" );
567
567
}
@@ -718,7 +718,7 @@ EJsonQueryWrap TSqlExpression::JsonQueryWrapper(const TRule_json_query& node) {
718
718
}
719
719
720
720
// WITH (CONDITIONAL | UNCONDITIONAL)? ARRAY? - wrapping depends on 2nd token. Default is UNCONDITIONAL
721
- const auto & withWrapperRule = wrapperRule.GetAlt_json_query_wrapper2 (). GetBlock1 () ;
721
+ const auto & withWrapperRule = wrapperRule.GetAlt_json_query_wrapper2 ();
722
722
if (!withWrapperRule.HasBlock2 ()) {
723
723
return EJsonQueryWrap::Wrap;
724
724
}
@@ -838,13 +838,13 @@ TNodePtr MatchRecognizeVarAccess(TTranslation& ctx, const TString& var, const TR
838
838
return BuildMatchRecognizeVarAccess (TPosition{}, var, column, theSameVar);
839
839
}
840
840
841
- TNodePtr TSqlExpression::RowPatternVarAccess (const TString& alias, const TRule_unary_subexpr_suffix_TBlock1_TAlt3_TBlock1_TBlock2 block) {
841
+ TNodePtr TSqlExpression::RowPatternVarAccess (const TString& alias, const TRule_unary_subexpr_suffix_TBlock1_TBlock1_TAlt3_TBlock2 block) {
842
842
switch (block.GetAltCase ()) {
843
- case TRule_unary_subexpr_suffix_TBlock1_TAlt3_TBlock1_TBlock2 ::kAlt1 :
843
+ case TRule_unary_subexpr_suffix_TBlock1_TBlock1_TAlt3_TBlock2 ::kAlt1 :
844
844
break ;
845
- case TRule_unary_subexpr_suffix_TBlock1_TAlt3_TBlock1_TBlock2 ::kAlt2 :
845
+ case TRule_unary_subexpr_suffix_TBlock1_TBlock1_TAlt3_TBlock2 ::kAlt2 :
846
846
break ;
847
- case TRule_unary_subexpr_suffix_TBlock1_TAlt3_TBlock1_TBlock2 ::kAlt3 :
847
+ case TRule_unary_subexpr_suffix_TBlock1_TBlock1_TAlt3_TBlock2 ::kAlt3 :
848
848
switch (block.GetAlt3 ().GetRule_an_id_or_type1 ().GetAltCase ()) {
849
849
case TRule_an_id_or_type::kAltAnIdOrType1 : {
850
850
const auto &idOrType = block.GetAlt3 ().GetRule_an_id_or_type1 ().GetAlt_an_id_or_type1 ().GetRule_id_or_type1 ();
@@ -869,7 +869,7 @@ TNodePtr TSqlExpression::RowPatternVarAccess(const TString& alias, const TRule_u
869
869
break ;
870
870
}
871
871
break ;
872
- case TRule_unary_subexpr_suffix_TBlock1_TAlt3_TBlock1_TBlock2 ::ALT_NOT_SET:
872
+ case TRule_unary_subexpr_suffix_TBlock1_TBlock1_TAlt3_TBlock2 ::ALT_NOT_SET:
873
873
Y_ABORT (" You should change implementation according to grammar changes" );
874
874
}
875
875
return TNodePtr{};
@@ -932,14 +932,15 @@ TNodePtr TSqlExpression::UnaryCasualExpr(const TUnaryCasualExprRule& node, const
932
932
bool isColumnRef = !expr;
933
933
bool isFirstElem = true ;
934
934
935
- for (auto & b : suffix.GetBlock1 ()) {
935
+ for (auto & _b : suffix.GetBlock1 ()) {
936
+ auto & b = _b.GetBlock1 ();
936
937
switch (b.Alt_case ()) {
937
- case TRule_unary_subexpr_suffix::TBlock1::kAlt1 : {
938
+ case TRule_unary_subexpr_suffix::TBlock1::TBlock1:: kAlt1 : {
938
939
// key_expr
939
940
// onlyDots = false;
940
941
break ;
941
942
}
942
- case TRule_unary_subexpr_suffix::TBlock1::kAlt2 : {
943
+ case TRule_unary_subexpr_suffix::TBlock1::TBlock1:: kAlt2 : {
943
944
// invoke_expr - cannot be a column, function name
944
945
if (isFirstElem) {
945
946
isColumnRef = false ;
@@ -948,20 +949,20 @@ TNodePtr TSqlExpression::UnaryCasualExpr(const TUnaryCasualExprRule& node, const
948
949
// onlyDots = false;
949
950
break ;
950
951
}
951
- case TRule_unary_subexpr_suffix::TBlock1::kAlt3 : {
952
+ case TRule_unary_subexpr_suffix::TBlock1::TBlock1:: kAlt3 : {
952
953
// In case of MATCH_RECOGNIZE lambdas
953
954
// X.Y is treated as Var.Column access
954
955
if (isColumnRef && EColumnRefState::MatchRecognize == Ctx.GetColumnReferenceState ()) {
955
956
if (auto rowPatternVarAccess = RowPatternVarAccess (
956
957
name,
957
- b.GetAlt3 ().GetBlock1 (). GetBlock2 ())
958
+ b.GetAlt3 ().GetBlock2 ())
958
959
) {
959
960
return rowPatternVarAccess;
960
961
}
961
962
}
962
963
break ;
963
964
}
964
- case TRule_unary_subexpr_suffix::TBlock1::ALT_NOT_SET:
965
+ case TRule_unary_subexpr_suffix::TBlock1::TBlock1:: ALT_NOT_SET:
965
966
AltNotImplemented (" unary_subexpr_suffix" , b);
966
967
return nullptr ;
967
968
}
@@ -1008,9 +1009,10 @@ TNodePtr TSqlExpression::UnaryCasualExpr(const TUnaryCasualExprRule& node, const
1008
1009
}
1009
1010
1010
1011
TPosition pos (Ctx.Pos ());
1011
- for (auto & b : suffix.GetBlock1 ()) {
1012
+ for (auto & _b : suffix.GetBlock1 ()) {
1013
+ auto & b = _b.GetBlock1 ();
1012
1014
switch (b.Alt_case ()) {
1013
- case TRule_unary_subexpr_suffix::TBlock1::kAlt1 : {
1015
+ case TRule_unary_subexpr_suffix::TBlock1::TBlock1:: kAlt1 : {
1014
1016
// key_expr
1015
1017
auto keyExpr = KeyExpr (b.GetAlt1 ().GetRule_key_expr1 ());
1016
1018
if (!keyExpr) {
@@ -1029,7 +1031,7 @@ TNodePtr TSqlExpression::UnaryCasualExpr(const TUnaryCasualExprRule& node, const
1029
1031
ids.clear ();
1030
1032
break ;
1031
1033
}
1032
- case TRule_unary_subexpr_suffix::TBlock1::kAlt2 : {
1034
+ case TRule_unary_subexpr_suffix::TBlock1::TBlock1:: kAlt2 : {
1033
1035
// invoke_expr - cannot be a column, function name
1034
1036
TSqlCallExpr call (Ctx, Mode);
1035
1037
if (isFirstElem && !name.Empty ()) {
@@ -1055,15 +1057,15 @@ TNodePtr TSqlExpression::UnaryCasualExpr(const TUnaryCasualExprRule& node, const
1055
1057
1056
1058
break ;
1057
1059
}
1058
- case TRule_unary_subexpr_suffix::TBlock1::kAlt3 : {
1060
+ case TRule_unary_subexpr_suffix::TBlock1::TBlock1:: kAlt3 : {
1059
1061
// dot
1060
1062
if (lastExpr) {
1061
1063
ids.push_back (lastExpr);
1062
1064
}
1063
1065
1064
- auto bb = b.GetAlt3 ().GetBlock1 (). GetBlock2 ();
1066
+ auto bb = b.GetAlt3 ().GetBlock2 ();
1065
1067
switch (bb.Alt_case ()) {
1066
- case TRule_unary_subexpr_suffix_TBlock1_TAlt3_TBlock1_TBlock2 ::kAlt1 : {
1068
+ case TRule_unary_subexpr_suffix_TBlock1_TBlock1_TAlt3_TBlock2 ::kAlt1 : {
1067
1069
TString named;
1068
1070
if (!NamedNodeImpl (bb.GetAlt1 ().GetRule_bind_parameter1 (), named, *this )) {
1069
1071
return nullptr ;
@@ -1077,16 +1079,16 @@ TNodePtr TSqlExpression::UnaryCasualExpr(const TUnaryCasualExprRule& node, const
1077
1079
ids.back ().Expr = namedNode;
1078
1080
break ;
1079
1081
}
1080
- case TRule_unary_subexpr_suffix_TBlock1_TAlt3_TBlock1_TBlock2 ::kAlt2 : {
1082
+ case TRule_unary_subexpr_suffix_TBlock1_TBlock1_TAlt3_TBlock2 ::kAlt2 : {
1081
1083
const TString str (Token (bb.GetAlt2 ().GetToken1 ()));
1082
1084
ids.push_back (str);
1083
1085
break ;
1084
1086
}
1085
- case TRule_unary_subexpr_suffix_TBlock1_TAlt3_TBlock1_TBlock2 ::kAlt3 : {
1087
+ case TRule_unary_subexpr_suffix_TBlock1_TBlock1_TAlt3_TBlock2 ::kAlt3 : {
1086
1088
ids.push_back (Id (bb.GetAlt3 ().GetRule_an_id_or_type1 (), *this ));
1087
1089
break ;
1088
1090
}
1089
- case TRule_unary_subexpr_suffix_TBlock1_TAlt3_TBlock1_TBlock2 ::ALT_NOT_SET:
1091
+ case TRule_unary_subexpr_suffix_TBlock1_TBlock1_TAlt3_TBlock2 ::ALT_NOT_SET:
1090
1092
Y_ABORT (" You should change implementation according to grammar changes" );
1091
1093
}
1092
1094
@@ -1097,7 +1099,7 @@ TNodePtr TSqlExpression::UnaryCasualExpr(const TUnaryCasualExprRule& node, const
1097
1099
1098
1100
break ;
1099
1101
}
1100
- case TRule_unary_subexpr_suffix::TBlock1::ALT_NOT_SET:
1102
+ case TRule_unary_subexpr_suffix::TBlock1::TBlock1:: ALT_NOT_SET:
1101
1103
AltNotImplemented (" unary_subexpr_suffix" , b);
1102
1104
return nullptr ;
1103
1105
}
@@ -1175,9 +1177,9 @@ TNodePtr TSqlExpression::LambdaRule(const TRule_lambda& rule) {
1175
1177
TColumnRefScope scope (Ctx, EColumnRefState::Deny);
1176
1178
scope.SetNoColumnErrContext (" in lambda function" );
1177
1179
if (bodyBlock.GetBlock2 ().HasAlt1 ()) {
1178
- ret = SqlLambdaExprBody (Ctx, bodyBlock.GetBlock2 ().GetAlt1 ().GetBlock1 (). GetRule_expr2 (), exprSeq);
1180
+ ret = SqlLambdaExprBody (Ctx, bodyBlock.GetBlock2 ().GetAlt1 ().GetRule_expr2 (), exprSeq);
1179
1181
} else {
1180
- ret = SqlLambdaExprBody (Ctx, bodyBlock.GetBlock2 ().GetAlt2 ().GetBlock1 (). GetRule_lambda_body2 (), exprSeq);
1182
+ ret = SqlLambdaExprBody (Ctx, bodyBlock.GetBlock2 ().GetAlt2 ().GetRule_lambda_body2 (), exprSeq);
1181
1183
}
1182
1184
1183
1185
TVector<TString> argNames;
0 commit comments