@@ -1795,16 +1795,6 @@ namespace {
17951795 return true ;
17961796 }
17971797
1798- bool StoreBool (const TRule_table_setting_value& from, TDeferredAtom& to, TContext& ctx) {
1799- if (!from.HasAlt_table_setting_value6 ()) {
1800- return false ;
1801- }
1802- // bool_value
1803- const TString value = to_lower (ctx.Token (from.GetAlt_table_setting_value6 ().GetRule_bool_value1 ().GetToken1 ()));
1804- to = TDeferredAtom (BuildLiteralBool (ctx.Pos (), FromString<bool >(value)), ctx);
1805- return true ;
1806- }
1807-
18081798 bool StoreSplitBoundary (const TRule_literal_value_list& boundary, TVector<TVector<TNodePtr>>& to,
18091799 TSqlExpression& expr, TContext& ctx) {
18101800 TVector<TNodePtr> boundaryKeys;
@@ -1931,26 +1921,6 @@ namespace {
19311921 return true ;
19321922 }
19331923
1934- bool StoreViewOptionsEntry (const TIdentifier& id,
1935- const TRule_table_setting_value& value,
1936- std::map<TString, TDeferredAtom>& features,
1937- TContext& ctx) {
1938- const auto name = to_lower (id.Name );
1939- const auto publicName = to_upper (name);
1940-
1941- if (features.find (name) != features.end ()) {
1942- ctx.Error (ctx.Pos ()) << publicName << " is a duplicate" ;
1943- return false ;
1944- }
1945-
1946- if (!StoreBool (value, features[name], ctx)) {
1947- ctx.Error (ctx.Pos ()) << " Value of " << publicName << " must be a bool" ;
1948- return false ;
1949- }
1950-
1951- return true ;
1952- }
1953-
19541924 template <typename TChar>
19551925 struct TPatternComponent {
19561926 TBasicString<TChar> Prefix;
@@ -4625,7 +4595,7 @@ bool TSqlTranslation::BindParameterClause(const TRule_bind_parameter& node, TDef
46254595}
46264596
46274597bool TSqlTranslation::ObjectFeatureValueClause (const TRule_object_feature_value& node, TDeferredAtom& result) {
4628- // object_feature_value: an_id_or_type | bind_parameter;
4598+ // object_feature_value: id_or_type | bind_parameter | STRING_VALUE | bool_value ;
46294599 switch (node.Alt_case ()) {
46304600 case TRule_object_feature_value::kAltObjectFeatureValue1 :
46314601 {
@@ -4650,6 +4620,12 @@ bool TSqlTranslation::ObjectFeatureValueClause(const TRule_object_feature_value&
46504620 result = TDeferredAtom (Ctx.Pos (), strValue->Content );
46514621 break ;
46524622 }
4623+ case TRule_object_feature_value::kAltObjectFeatureValue4 :
4624+ {
4625+ TString value = Ctx.Token (node.GetAlt_object_feature_value4 ().GetRule_bool_value1 ().GetToken1 ());
4626+ result = TDeferredAtom (BuildLiteralBool (Ctx.Pos (), FromString<bool >(value)), Ctx);
4627+ break ;
4628+ }
46534629 case TRule_object_feature_value::ALT_NOT_SET:
46544630 Y_ABORT (" You should change implementation according to grammar changes" );
46554631 }
@@ -4839,32 +4815,6 @@ bool TSqlTranslation::ValidateExternalTable(const TCreateTableParameters& params
48394815 return true ;
48404816}
48414817
4842- bool TSqlTranslation::ParseViewOptions (std::map<TString, TDeferredAtom>& features,
4843- const TRule_with_table_settings& options) {
4844- const auto & firstEntry = options.GetRule_table_settings_entry3 ();
4845- if (!StoreViewOptionsEntry (IdEx (firstEntry.GetRule_an_id1 (), *this ),
4846- firstEntry.GetRule_table_setting_value3 (),
4847- features,
4848- Ctx)) {
4849- return false ;
4850- }
4851- for (const auto & block : options.GetBlock4 ()) {
4852- const auto & entry = block.GetRule_table_settings_entry2 ();
4853- if (!StoreViewOptionsEntry (IdEx (entry.GetRule_an_id1 (), *this ),
4854- entry.GetRule_table_setting_value3 (),
4855- features,
4856- Ctx)) {
4857- return false ;
4858- }
4859- }
4860- if (const auto securityInvoker = features.find (" security_invoker" );
4861- securityInvoker == features.end () || securityInvoker->second .Build ()->GetLiteralValue () != " true" ) {
4862- Ctx.Error (Ctx.Pos ()) << " SECURITY_INVOKER option must be explicitly enabled" ;
4863- return false ;
4864- }
4865- return true ;
4866- }
4867-
48684818bool TSqlTranslation::ParseViewQuery (
48694819 std::map<TString, TDeferredAtom>& features,
48704820 const TRule_select_stmt& query
0 commit comments