diff options
author | vitya-smirnov <[email protected]> | 2025-07-03 09:03:54 +0300 |
---|---|---|
committer | vitya-smirnov <[email protected]> | 2025-07-03 09:20:48 +0300 |
commit | ca30a190eaf6cca92ab870e5147dad2c2b19339b (patch) | |
tree | ad3af457faf942a04b30da698b7ec5c50c198244 /yql/essentials/sql/v1/complete/sql_complete_ut.cpp | |
parent | 399640bac77022be833bebfbd33ba8a77627e45d (diff) |
YQL-19747: Respect WITHOUT at schema synthesis
Also fixed a bug when the same table used with
and without an alias produced duplicated column
names. This is incorrect at translator, but anyway
we need to handle it gracefully. Also refactored
some utility methods like context union.
commit_hash:45a12675e865bb9d929e5e5178e16239a763d1f5
Diffstat (limited to 'yql/essentials/sql/v1/complete/sql_complete_ut.cpp')
-rw-r--r-- | yql/essentials/sql/v1/complete/sql_complete_ut.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/yql/essentials/sql/v1/complete/sql_complete_ut.cpp b/yql/essentials/sql/v1/complete/sql_complete_ut.cpp index 2eab708acd3..d5e7e3ac55b 100644 --- a/yql/essentials/sql/v1/complete/sql_complete_ut.cpp +++ b/yql/essentials/sql/v1/complete/sql_complete_ut.cpp @@ -1211,6 +1211,30 @@ Y_UNIT_TEST_SUITE(SqlCompleteTests) { }; UNIT_ASSERT_VALUES_EQUAL(CompleteTop(4, engine, query), expected); } + { + TString query = R"( + SELECT # + FROM ( + SELECT * WITHOUT Age, eqt.course + FROM example.`/people` AS epp + JOIN example.`/yql/tutorial` AS eqt ON TRUE + JOIN testing ON TRUE + ) AS ep + JOIN example.`/people` ON TRUE + JOIN example.`/people` ON TRUE + JOIN example.`/people` AS x ON TRUE + )"; + + TVector<TCandidate> expected = { + {ColumnName, "x.Age"}, + {ColumnName, "x.Name"}, + {ColumnName, "ep.Name"}, + {ColumnName, "ep.room"}, + {ColumnName, "ep.time"}, + {Keyword, "ALL"}, + }; + UNIT_ASSERT_VALUES_EQUAL(CompleteTop(6, engine, query), expected); + } } Y_UNIT_TEST(ColumnPositions) { |