diff options
author | zverevgeny <zverevgeny@ydb.tech> | 2023-08-29 21:01:11 +0300 |
---|---|---|
committer | zverevgeny <zverevgeny@ydb.tech> | 2023-08-30 02:14:46 +0300 |
commit | 2821dc198c6906c906f42b2e2a5748412222af7c (patch) | |
tree | 8a7c678b4e4f5a75256ddb8569559af9627eaba2 | |
parent | 3efee0e44ceb4687d30743b3173fecce4c74b7ed (diff) | |
download | ydb-2821dc198c6906c906f42b2e2a5748412222af7c.tar.gz |
YQL-16186 ut for initial and seek
-rw-r--r-- | ydb/library/yql/sql/v1/sql_match_recognize_ut.cpp | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/ydb/library/yql/sql/v1/sql_match_recognize_ut.cpp b/ydb/library/yql/sql/v1/sql_match_recognize_ut.cpp index 07bf8f2867..c66c96d79e 100644 --- a/ydb/library/yql/sql/v1/sql_match_recognize_ut.cpp +++ b/ydb/library/yql/sql/v1/sql_match_recognize_ut.cpp @@ -290,9 +290,34 @@ FROM Input MATCH_RECOGNIZE( UNIT_ASSERT(not r.IsOk()); } } - Y_UNIT_TEST(row_pattern_initial_or_seek) { - //TODO https://st.yandex-team.ru/YQL-16186 + Y_UNIT_TEST(row_pattern_initial) { + const auto stmt = R"( +USE plato; +SELECT * +FROM Input MATCH_RECOGNIZE( + INITIAL + PATTERN (A+ B* C?) + DEFINE A as A + ) +)"; + auto r = MatchRecognizeSqlToYql(stmt); + UNIT_ASSERT(not r.IsOk()); + } + + Y_UNIT_TEST(row_pattern_seek) { + const auto stmt = R"( +USE plato; +SELECT * +FROM Input MATCH_RECOGNIZE( + SEEK + PATTERN (A+ B* C?) + DEFINE A as A + ) +)"; + auto r = MatchRecognizeSqlToYql(stmt); + UNIT_ASSERT(not r.IsOk()); } + Y_UNIT_TEST(PatternSimple) { const auto stmt = R"( USE plato; |