summaryrefslogtreecommitdiffstats
path: root/yql/essentials/sql/v1/format
diff options
context:
space:
mode:
authorzhvv117 <[email protected]>2024-12-05 12:46:40 +0300
committerzhvv117 <[email protected]>2024-12-05 13:07:46 +0300
commit3b1f4cd76ffb777bc6498fd1ffcb541472c830f9 (patch)
treecd11bf0224339da51f3216fc998d60b8b0bfd892 /yql/essentials/sql/v1/format
parentcbe5c854eb8f1998f351a0471b03415d737fa41d (diff)
do not add newline after FLATTEN BY
commit_hash:929f90e2a47ca3aafdf081a36c776ae1cebef3be
Diffstat (limited to 'yql/essentials/sql/v1/format')
-rw-r--r--yql/essentials/sql/v1/format/sql_format.cpp3
-rw-r--r--yql/essentials/sql/v1/format/sql_format_ut.h2
2 files changed, 1 insertions, 4 deletions
diff --git a/yql/essentials/sql/v1/format/sql_format.cpp b/yql/essentials/sql/v1/format/sql_format.cpp
index bb8d20b9a00..d4bc63da05b 100644
--- a/yql/essentials/sql/v1/format/sql_format.cpp
+++ b/yql/essentials/sql/v1/format/sql_format.cpp
@@ -2047,10 +2047,7 @@ private:
switch (msg.Alt_case()) {
case TRule_flatten_by_arg::kAltFlattenByArg1: {
const auto& alt = msg.GetAlt_flatten_by_arg1();
- NewLine();
- PushCurrentIndent();
Visit(alt);
- PopCurrentIndent();
break;
}
case TRule_flatten_by_arg::kAltFlattenByArg2: {
diff --git a/yql/essentials/sql/v1/format/sql_format_ut.h b/yql/essentials/sql/v1/format/sql_format_ut.h
index abf893c72eb..3cd8fc0470b 100644
--- a/yql/essentials/sql/v1/format/sql_format_ut.h
+++ b/yql/essentials/sql/v1/format/sql_format_ut.h
@@ -791,7 +791,7 @@ Y_UNIT_TEST(Select) {
{"select 1 from user flatten columns",
"SELECT\n\t1\nFROM user\n\tFLATTEN COLUMNS;\n"},
{"select 1 from user flatten list by user",
- "SELECT\n\t1\nFROM user\n\tFLATTEN LIST BY\n\t\tuser;\n"},
+ "SELECT\n\t1\nFROM user\n\tFLATTEN LIST BY user;\n"},
{"select 1 from user flatten list by (user,user)",
"SELECT\n\t1\nFROM user\n\tFLATTEN LIST BY (\n\t\tuser,\n\t\tuser\n\t);\n"},
{"select 1 from $user(1,2)",