@@ -1647,16 +1647,6 @@ namespace {
16471647 return true ;
16481648 }
16491649
1650- bool StoreBool (const TRule_table_setting_value& from, TDeferredAtom& to, TContext& ctx) {
1651- if (!from.HasAlt_table_setting_value6 ()) {
1652- return false ;
1653- }
1654- // bool_value
1655- const TString value = to_lower (ctx.Token (from.GetAlt_table_setting_value6 ().GetRule_bool_value1 ().GetToken1 ()));
1656- to = TDeferredAtom (BuildLiteralBool (ctx.Pos (), FromString<bool >(value)), ctx);
1657- return true ;
1658- }
1659-
16601650 bool StoreSplitBoundary (const TRule_literal_value_list& boundary, TVector<TVector<TNodePtr>>& to,
16611651 TSqlExpression& expr, TContext& ctx) {
16621652 TVector<TNodePtr> boundaryKeys;
@@ -1783,26 +1773,6 @@ namespace {
17831773 return true ;
17841774 }
17851775
1786- bool StoreViewOptionsEntry (const TIdentifier& id,
1787- const TRule_table_setting_value& value,
1788- std::map<TString, TDeferredAtom>& features,
1789- TContext& ctx) {
1790- const auto name = to_lower (id.Name );
1791- const auto publicName = to_upper (name);
1792-
1793- if (features.find (name) != features.end ()) {
1794- ctx.Error (ctx.Pos ()) << publicName << " is a duplicate" ;
1795- return false ;
1796- }
1797-
1798- if (!StoreBool (value, features[name], ctx)) {
1799- ctx.Error (ctx.Pos ()) << " Value of " << publicName << " must be a bool" ;
1800- return false ;
1801- }
1802-
1803- return true ;
1804- }
1805-
18061776 template <typename TChar>
18071777 struct TPatternComponent {
18081778 TBasicString<TChar> Prefix;
@@ -4394,7 +4364,7 @@ bool TSqlTranslation::BindParameterClause(const TRule_bind_parameter& node, TDef
43944364}
43954365
43964366bool TSqlTranslation::ObjectFeatureValueClause (const TRule_object_feature_value& node, TDeferredAtom& result) {
4397- // object_feature_value: an_id_or_type | bind_parameter;
4367+ // object_feature_value: id_or_type | bind_parameter | STRING_VALUE | bool_value ;
43984368 switch (node.Alt_case ()) {
43994369 case TRule_object_feature_value::kAltObjectFeatureValue1 :
44004370 {
@@ -4419,6 +4389,12 @@ bool TSqlTranslation::ObjectFeatureValueClause(const TRule_object_feature_value&
44194389 result = TDeferredAtom (Ctx.Pos (), strValue->Content );
44204390 break ;
44214391 }
4392+ case TRule_object_feature_value::kAltObjectFeatureValue4 :
4393+ {
4394+ TString value = Ctx.Token (node.GetAlt_object_feature_value4 ().GetRule_bool_value1 ().GetToken1 ());
4395+ result = TDeferredAtom (BuildLiteralBool (Ctx.Pos (), FromString<bool >(value)), Ctx);
4396+ break ;
4397+ }
44224398 case TRule_object_feature_value::ALT_NOT_SET:
44234399 Y_ABORT (" You should change implementation according to grammar changes" );
44244400 }
@@ -4608,32 +4584,6 @@ bool TSqlTranslation::ValidateExternalTable(const TCreateTableParameters& params
46084584 return true ;
46094585}
46104586
4611- bool TSqlTranslation::ParseViewOptions (std::map<TString, TDeferredAtom>& features,
4612- const TRule_with_table_settings& options) {
4613- const auto & firstEntry = options.GetRule_table_settings_entry3 ();
4614- if (!StoreViewOptionsEntry (IdEx (firstEntry.GetRule_an_id1 (), *this ),
4615- firstEntry.GetRule_table_setting_value3 (),
4616- features,
4617- Ctx)) {
4618- return false ;
4619- }
4620- for (const auto & block : options.GetBlock4 ()) {
4621- const auto & entry = block.GetRule_table_settings_entry2 ();
4622- if (!StoreViewOptionsEntry (IdEx (entry.GetRule_an_id1 (), *this ),
4623- entry.GetRule_table_setting_value3 (),
4624- features,
4625- Ctx)) {
4626- return false ;
4627- }
4628- }
4629- if (const auto securityInvoker = features.find (" security_invoker" );
4630- securityInvoker == features.end () || securityInvoker->second .Build ()->GetLiteralValue () != " true" ) {
4631- Ctx.Error (Ctx.Pos ()) << " SECURITY_INVOKER option must be explicitly enabled" ;
4632- return false ;
4633- }
4634- return true ;
4635- }
4636-
46374587bool TSqlTranslation::ParseViewQuery (
46384588 std::map<TString, TDeferredAtom>& features,
46394589 const TRule_select_stmt& query
0 commit comments