summaryrefslogtreecommitdiffstats
path: root/yql/essentials/sql/v1/format/sql_format.cpp
diff options
context:
space:
mode:
authorAlexander Smirnov <[email protected]>2025-02-05 00:51:36 +0000
committerAlexander Smirnov <[email protected]>2025-02-05 00:51:36 +0000
commit21c282998b41e7edec2cae094f996be2feb7eb37 (patch)
tree985f632cd3809ddc5ba06449701db2f1a2ae48c3 /yql/essentials/sql/v1/format/sql_format.cpp
parent8587d8117d7b1b539a00f9e214a749d1d538691b (diff)
parent1d3a1b1e4201d7a3cbb150b881aeffc3535c2995 (diff)
Merge branch 'rightlib' into merge-libs-250205-0050
Diffstat (limited to 'yql/essentials/sql/v1/format/sql_format.cpp')
-rw-r--r--yql/essentials/sql/v1/format/sql_format.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/yql/essentials/sql/v1/format/sql_format.cpp b/yql/essentials/sql/v1/format/sql_format.cpp
index 19619bf6e89..1240e073537 100644
--- a/yql/essentials/sql/v1/format/sql_format.cpp
+++ b/yql/essentials/sql/v1/format/sql_format.cpp
@@ -2671,10 +2671,11 @@ private:
}
void VisitNeqSubexpr(const TRule_neq_subexpr& msg) {
- VisitNeqSubexprImpl(msg, false);
+ bool pushedIndent = false;
+ VisitNeqSubexprImpl(msg, pushedIndent, true);
}
- void VisitNeqSubexprImpl(const TRule_neq_subexpr& msg, bool pushedIndent) {
+ void VisitNeqSubexprImpl(const TRule_neq_subexpr& msg, bool& pushedIndent, bool top) {
auto getExpr = [](const TRule_neq_subexpr::TBlock2& b) -> const TRule_bit_subexpr& { return b.GetRule_bit_subexpr2(); };
auto getOp = [](const TRule_neq_subexpr::TBlock2& b) -> const TRule_neq_subexpr::TBlock2::TBlock1& { return b.GetBlock1(); };
VisitBinaryOp(msg.GetRule_bit_subexpr1(), getOp, getExpr, msg.GetBlock2().begin(), msg.GetBlock2().end());
@@ -2706,9 +2707,10 @@ private:
}
}
- VisitNeqSubexprImpl(alt.GetRule_neq_subexpr2(), pushedIndent);
- if (pushedIndent) {
+ VisitNeqSubexprImpl(alt.GetRule_neq_subexpr2(), pushedIndent, false);
+ if (pushedIndent && top) {
PopCurrentIndent();
+ pushedIndent = false;
}
break;