@@ -1647,16 +1647,6 @@ namespace {
1647
1647
return true ;
1648
1648
}
1649
1649
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
-
1660
1650
bool StoreSplitBoundary (const TRule_literal_value_list& boundary, TVector<TVector<TNodePtr>>& to,
1661
1651
TSqlExpression& expr, TContext& ctx) {
1662
1652
TVector<TNodePtr> boundaryKeys;
@@ -1783,26 +1773,6 @@ namespace {
1783
1773
return true ;
1784
1774
}
1785
1775
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
-
1806
1776
template <typename TChar>
1807
1777
struct TPatternComponent {
1808
1778
TBasicString<TChar> Prefix;
@@ -4394,7 +4364,7 @@ bool TSqlTranslation::BindParameterClause(const TRule_bind_parameter& node, TDef
4394
4364
}
4395
4365
4396
4366
bool 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 ;
4398
4368
switch (node.Alt_case ()) {
4399
4369
case TRule_object_feature_value::kAltObjectFeatureValue1 :
4400
4370
{
@@ -4419,6 +4389,12 @@ bool TSqlTranslation::ObjectFeatureValueClause(const TRule_object_feature_value&
4419
4389
result = TDeferredAtom (Ctx.Pos (), strValue->Content );
4420
4390
break ;
4421
4391
}
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
+ }
4422
4398
case TRule_object_feature_value::ALT_NOT_SET:
4423
4399
Y_ABORT (" You should change implementation according to grammar changes" );
4424
4400
}
@@ -4608,32 +4584,6 @@ bool TSqlTranslation::ValidateExternalTable(const TCreateTableParameters& params
4608
4584
return true ;
4609
4585
}
4610
4586
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
-
4637
4587
bool TSqlTranslation::ParseViewQuery (
4638
4588
std::map<TString, TDeferredAtom>& features,
4639
4589
const TRule_select_stmt& query
0 commit comments