diff options
| author | ziganshinmr <[email protected]> | 2025-09-22 12:41:08 +0300 | 
|---|---|---|
| committer | ziganshinmr <[email protected]> | 2025-09-22 13:29:40 +0300 | 
| commit | 36776eedf3d8715a88152f3d1947c5432c5905da (patch) | |
| tree | b02a478135176de611b21fedc072813dbb8a4db0 /yql/essentials/sql | |
| parent | bed24d65a2f9ee59b96775ef4c00c362693e4a67 (diff) | |
Do not use DependsOn in TablePath/TableRecord
commit_hash:0241dcec17f0a9b9cf2abfc955a4af169084c387
Diffstat (limited to 'yql/essentials/sql')
| -rw-r--r-- | yql/essentials/sql/v1/builtin.cpp | 6 | ||||
| -rw-r--r-- | yql/essentials/sql/v1/context.cpp | 1 | ||||
| -rw-r--r-- | yql/essentials/sql/v1/context.h | 1 | ||||
| -rw-r--r-- | yql/essentials/sql/v1/node.cpp | 10 | ||||
| -rw-r--r-- | yql/essentials/sql/v1/query.cpp | 5 | ||||
| -rw-r--r-- | yql/essentials/sql/v1/sql_query.cpp | 1 | 
6 files changed, 21 insertions, 3 deletions
| diff --git a/yql/essentials/sql/v1/builtin.cpp b/yql/essentials/sql/v1/builtin.cpp index 234282d4945..13eb074abc9 100644 --- a/yql/essentials/sql/v1/builtin.cpp +++ b/yql/essentials/sql/v1/builtin.cpp @@ -538,7 +538,11 @@ public:                  }              } -            Args_.push_back(Y("TablePath", Y("DependsOn", "row"))); +            if (ctx.DirectRowDependsOn.GetOrElse(true)) { +                Args_.push_back(Y("TablePath", Y("DependsOn", "row"))); +            } else { +                Args_.push_back(Y("TablePath", "row")); +            }          }          if (Args_.size() == 2) { diff --git a/yql/essentials/sql/v1/context.cpp b/yql/essentials/sql/v1/context.cpp index 127b684029d..f24258da66f 100644 --- a/yql/essentials/sql/v1/context.cpp +++ b/yql/essentials/sql/v1/context.cpp @@ -86,6 +86,7 @@ THashMap<TStringBuf, TPragmaMaybeField> CTX_PRAGMA_MAYBE_FIELDS = {      {"AnsiInForEmptyOrNullableItemsCollections", &TContext::AnsiInForEmptyOrNullableItemsCollections},      {"EmitAggApply", &TContext::EmitAggApply},      {"CompactGroupBy", &TContext::CompactGroupBy}, +    {"DirectRowDependsOn", &TContext::DirectRowDependsOn},  };  } // namespace diff --git a/yql/essentials/sql/v1/context.h b/yql/essentials/sql/v1/context.h index 70880280610..6bd89f16e29 100644 --- a/yql/essentials/sql/v1/context.h +++ b/yql/essentials/sql/v1/context.h @@ -391,6 +391,7 @@ namespace NSQLTranslationV1 {          bool DisableLegacyNotNull = false;          bool DebugPositions = false;          bool StrictWarningAsError = false; +        TMaybe<bool> DirectRowDependsOn;          TVector<size_t> ForAllStatementsParts;          TMaybe<TString> Engine; diff --git a/yql/essentials/sql/v1/node.cpp b/yql/essentials/sql/v1/node.cpp index 41295dcabd3..c832839a143 100644 --- a/yql/essentials/sql/v1/node.cpp +++ b/yql/essentials/sql/v1/node.cpp @@ -1014,7 +1014,7 @@ bool TCallNodeDepArgs::DoInit(TContext& ctx, ISource* src) {      return true;  } -TCallDirectRow::TPtr TCallDirectRow::DoClone() const { +INode::TPtr TCallDirectRow::DoClone() const {      return new TCallDirectRow(Pos_, OpName_, CloneContainer(Args_));  } @@ -1038,7 +1038,13 @@ bool TCallDirectRow::DoInit(TContext& ctx, ISource* src) {      if (!TCallNode::DoInit(ctx, src)) {          return false;      } -    Nodes_.push_back(Y("DependsOn", "row")); + +    if (ctx.DirectRowDependsOn.GetOrElse(true)) { +        Nodes_.push_back(Y("DependsOn", "row")); +    } else { +        Nodes_.push_back(AstNode("row")); +    } +      return true;  } diff --git a/yql/essentials/sql/v1/query.cpp b/yql/essentials/sql/v1/query.cpp index 6fed44cadc0..a4263c43022 100644 --- a/yql/essentials/sql/v1/query.cpp +++ b/yql/essentials/sql/v1/query.cpp @@ -3344,6 +3344,11 @@ public:                      Add(Y("let", "world", Y(TString(ConfigureName), "world", configSource,                          BuildQuotedAtom(Pos_, "DebugPositions"))));                  } + +                if (ctx.DirectRowDependsOn.Defined()) { +                    const TString pragmaName = *ctx.DirectRowDependsOn ? "DirectRowDependsOn" : "DisableDirectRowDependsOn"; +                    currentWorlds->Add(Y("let", "world", Y(TString(ConfigureName), "world", configSource, BuildQuotedAtom(Pos_, pragmaName)))); +                }              }          } diff --git a/yql/essentials/sql/v1/sql_query.cpp b/yql/essentials/sql/v1/sql_query.cpp index 0715a8b2803..a1478b54598 100644 --- a/yql/essentials/sql/v1/sql_query.cpp +++ b/yql/essentials/sql/v1/sql_query.cpp @@ -3466,6 +3466,7 @@ THashMap<TString, TPragmaDescr> PragmaDescrs{      PAIRED_TABLE_ELEM("JsonQueryReturnsJsonDocument", JsonQueryReturnsJsonDocument),      PAIRED_TABLE_ELEM("EmitAggApply", EmitAggApply),      PAIRED_TABLE_ELEM("CompactGroupBy", CompactGroupBy), +    PAIRED_TABLE_ELEM("DirectRowDependsOn", DirectRowDependsOn),      // bool fields.      TABLE_ELEM("RefSelect", PragmaRefSelect, true), | 
