From df83fc78eda0422e120490a601fed3f5172007eb Mon Sep 17 00:00:00 2001 From: vitya-smirnov Date: Thu, 26 Feb 2026 18:18:51 +0300 Subject: YQL-20538: Fix format on named node line comment The problem is that a space (`' '`) followed by a openning brace (`(`) were always unconditinally inserted, which is true when it comes just after an assignment (`'='`), but does not work correctly, when an `=` is followed by a comment, so the brace-wrapped select statement should start on a next line. commit_hash:23521a65125e41f199a6244c5501fc17c5b01b85 --- yql/essentials/sql/v1/format/sql_format.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'yql/essentials/sql/v1/format/sql_format.cpp') diff --git a/yql/essentials/sql/v1/format/sql_format.cpp b/yql/essentials/sql/v1/format/sql_format.cpp index 6be56002834..257ba1dbe91 100644 --- a/yql/essentials/sql/v1/format/sql_format.cpp +++ b/yql/essentials/sql/v1/format/sql_format.cpp @@ -993,7 +993,10 @@ private: case TRule_named_nodes_stmt::TBlock3::kAlt2: { const auto& alt = msg.GetBlock3().GetAlt2(); - Out(" ("); + if (OutColumn_ != 0) { + Out(' '); + } + Out('('); NewLine(); PushCurrentIndent(); Visit(alt); -- cgit v1.3