Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ydb/library/yql/sql/v1/SQLv1.g.in
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ table_constraint:
;

table_index: INDEX an_id table_index_type
(WITH LPAREN an_id EQUALS an_id COMMA (an_id EQUALS an_id)* RPAREN)?
(WITH LPAREN an_id EQUALS an_id (COMMA an_id EQUALS an_id)* COMMA? RPAREN)?
ON LPAREN an_id_schema (COMMA an_id_schema)* RPAREN
(COVER LPAREN an_id_schema (COMMA an_id_schema)* RPAREN)?;

Expand Down
9 changes: 7 additions & 2 deletions ydb/library/yql/sql/v1/sql_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2359,6 +2359,11 @@ Y_UNIT_TEST_SUITE(SqlParsingOnly) {
UNIT_ASSERT(SqlToYql("USE plato; ALTER TABLE table SET (AUTO_PARTITIONING_BY_SIZE = DISABLED)").IsOk());
}

Y_UNIT_TEST(AlterTableAddIndexWithIsNotSupported) {
ExpectFailWithError("USE plato; ALTER TABLE table ADD INDEX idx LOCAL WITH (a=b, c=d, e=f) ON (col)",
"<main>:1:40: Error: local: alternative is not implemented yet: 692:7: local_index\n");
}

Y_UNIT_TEST(OptionalAliases) {
UNIT_ASSERT(SqlToYql("USE plato; SELECT foo FROM (SELECT key foo FROM Input);").IsOk());
UNIT_ASSERT(SqlToYql("USE plato; SELECT a.x FROM Input1 a JOIN Input2 b ON a.key = b.key;").IsOk());
Expand Down Expand Up @@ -6134,7 +6139,7 @@ Y_UNIT_TEST_SUITE(TViewSyntaxTest) {
);
UNIT_ASSERT_C(res.Root, res.Issues.ToString());
}

Y_UNIT_TEST(CreateViewFromTable) {
constexpr const char* path = "/PathPrefix/TheView";
constexpr const char* query = R"(
Expand Down Expand Up @@ -6178,7 +6183,7 @@ Y_UNIT_TEST_SUITE(TViewSyntaxTest) {
)
);
UNIT_ASSERT_C(res.Root, res.Issues.ToString());

TString reconstructedQuery = ToString(Tokenize(query));
TVerifyLineFunc verifyLine = [&](const TString& word, const TString& line) {
if (word == "query_text") {
Expand Down