@@ -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;
@@ -4372,7 +4342,7 @@ bool TSqlTranslation::BindParameterClause(const TRule_bind_parameter& node, TDef
43724342}
43734343
43744344bool TSqlTranslation::ObjectFeatureValueClause (const TRule_object_feature_value& node, TDeferredAtom& result) {
4375- // object_feature_value: an_id_or_type | bind_parameter;
4345+ // object_feature_value: id_or_type | bind_parameter | STRING_VALUE | bool_value ;
43764346 switch (node.Alt_case ()) {
43774347 case TRule_object_feature_value::kAltObjectFeatureValue1 :
43784348 {
@@ -4397,6 +4367,12 @@ bool TSqlTranslation::ObjectFeatureValueClause(const TRule_object_feature_value&
43974367 result = TDeferredAtom (Ctx.Pos (), strValue->Content );
43984368 break ;
43994369 }
4370+ case TRule_object_feature_value::kAltObjectFeatureValue4 :
4371+ {
4372+ TString value = Ctx.Token (node.GetAlt_object_feature_value4 ().GetRule_bool_value1 ().GetToken1 ());
4373+ result = TDeferredAtom (BuildLiteralBool (Ctx.Pos (), FromString<bool >(value)), Ctx);
4374+ break ;
4375+ }
44004376 case TRule_object_feature_value::ALT_NOT_SET:
44014377 Y_ABORT (" You should change implementation according to grammar changes" );
44024378 }
@@ -4586,32 +4562,6 @@ bool TSqlTranslation::ValidateExternalTable(const TCreateTableParameters& params
45864562 return true ;
45874563}
45884564
4589- bool TSqlTranslation::ParseViewOptions (std::map<TString, TDeferredAtom>& features,
4590- const TRule_with_table_settings& options) {
4591- const auto & firstEntry = options.GetRule_table_settings_entry3 ();
4592- if (!StoreViewOptionsEntry (IdEx (firstEntry.GetRule_an_id1 (), *this ),
4593- firstEntry.GetRule_table_setting_value3 (),
4594- features,
4595- Ctx)) {
4596- return false ;
4597- }
4598- for (const auto & block : options.GetBlock4 ()) {
4599- const auto & entry = block.GetRule_table_settings_entry2 ();
4600- if (!StoreViewOptionsEntry (IdEx (entry.GetRule_an_id1 (), *this ),
4601- entry.GetRule_table_setting_value3 (),
4602- features,
4603- Ctx)) {
4604- return false ;
4605- }
4606- }
4607- if (const auto securityInvoker = features.find (" security_invoker" );
4608- securityInvoker == features.end () || securityInvoker->second .Build ()->GetLiteralValue () != " true" ) {
4609- Ctx.Error (Ctx.Pos ()) << " SECURITY_INVOKER option must be explicitly enabled" ;
4610- return false ;
4611- }
4612- return true ;
4613- }
4614-
46154565bool TSqlTranslation::ParseViewQuery (
46164566 std::map<TString, TDeferredAtom>& features,
46174567 const TRule_select_stmt& query
0 commit comments