diff options
author | a-romanov <Anton.Romanov@ydb.tech> | 2023-04-28 13:00:09 +0300 |
---|---|---|
committer | a-romanov <Anton.Romanov@ydb.tech> | 2023-04-28 13:00:09 +0300 |
commit | f3b2c09e16a9c2faaf25e3fc928ae01b1e7fe566 (patch) | |
tree | f762596fbbf1afbeb0e3b6c1e44a567e26586f72 | |
parent | 0227a413ca5d89bbeab941ee77c0832253066667 (diff) | |
download | ydb-f3b2c09e16a9c2faaf25e3fc928ae01b1e7fe566.tar.gz |
Settings for dump node.
-rw-r--r-- | ydb/library/yql/ast/yql_expr.cpp | 43 |
1 files changed, 29 insertions, 14 deletions
diff --git a/ydb/library/yql/ast/yql_expr.cpp b/ydb/library/yql/ast/yql_expr.cpp index 1ee199e1ce3..7f72763fc7a 100644 --- a/ydb/library/yql/ast/yql_expr.cpp +++ b/ydb/library/yql/ast/yql_expr.cpp @@ -52,23 +52,38 @@ namespace { out << " <" << node.Content() << ">"; } - if (node.GetTypeAnn()) { - out << ", type: " << *node.GetTypeAnn(); + constexpr bool WithTypes = false; + constexpr bool WithConstraints = false; + constexpr bool WithScope = false; + + if constexpr (WithTypes) { + if (node.GetTypeAnn()) { + out << ", " << *node.GetTypeAnn(); + } } - if (const auto scope = node.GetDependencyScope()) { - out << ", outer lambda "; - if (const auto outer = scope->first) { - out << '#' << outer->UniqueId(); - } else { - out << "null"; + if constexpr (WithConstraints) { + if (node.GetState() >= TExprNode::EState::ConstrComplete) { + out << ", " << node.GetConstraintSet(); } + } - out << ", inner lambda "; - if (const auto inner = scope->second) { - out << '#' << inner->UniqueId(); - } else { - out << "null"; + if constexpr (WithScope) { + if (const auto scope = node.GetDependencyScope()) { + out << ", ("; + if (const auto outer = scope->first) { + out << '#' << outer->UniqueId(); + } else { + out << "null"; + } + + out << ','; + if (const auto inner = scope->second) { + out << '#' << inner->UniqueId(); + } else { + out << "null"; + } + out << ')'; } } @@ -2937,7 +2952,7 @@ bool TDictExprType::Validate(TPosition position, TExprContext& ctx) const { if (KeyType->IsComparableInternal()) { return true; - } + } ctx.AddError(TIssue(position, TStringBuilder() << "Expected hashable and equatable or internally comparable dict key type, but got: " << *KeyType)); return false; |