Skip to content

Commit 5bb8a9e

Browse files
authored
Merge 8a8d541 into a0de26d
2 parents a0de26d + 8a8d541 commit 5bb8a9e

File tree

19 files changed

+153
-38
lines changed

19 files changed

+153
-38
lines changed

ydb/core/kqp/compile_service/kqp_compile_actor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ class TKqpCompileActor : public TActorBootstrapped<TKqpCompileActor> {
275275

276276
KqpHost = CreateKqpHost(Gateway, QueryId.Cluster, QueryId.Database, Config, ModuleResolverState->ModuleResolver,
277277
FederatedQuerySetup, UserToken, GUCSettings, ApplicationName, AppData(ctx)->FunctionRegistry,
278-
false, false, std::move(TempTablesState), nullptr, SplitCtx);
278+
false, false, std::move(TempTablesState), nullptr, SplitCtx, QueryServiceConfig);
279279

280280
IKqpHost::TPrepareSettings prepareSettings;
281281
prepareSettings.DocumentApiRestricted = QueryId.Settings.DocumentApiRestricted;

ydb/core/kqp/executer_actor/ut/kqp_executer_ut.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <ydb/library/yql/core/services/mounts/yql_mounts.h>
99

1010
#include <library/cpp/protobuf/util/pb_io.h>
11+
#include <ydb/core/protos/config.pb.h>
1112

1213
namespace NKikimr {
1314
namespace NKqp {
@@ -28,7 +29,7 @@ NKqpProto::TKqpPhyTx BuildTxPlan(const TString& sql, TIntrusivePtr<IKqpGateway>
2829
IModuleResolver::TPtr moduleResolver;
2930
UNIT_ASSERT(GetYqlDefaultModuleResolver(moduleCtx, moduleResolver));
3031

31-
auto qp = CreateKqpHost(gateway, cluster, "/Root", config, moduleResolver, NYql::IHTTPGateway::Make(), nullptr, nullptr, Nothing(), nullptr, nullptr, false, false, nullptr, actorSystem);
32+
auto qp = CreateKqpHost(gateway, cluster, "/Root", config, moduleResolver, NYql::IHTTPGateway::Make(), nullptr, nullptr, Nothing(), nullptr, nullptr, false, false, nullptr, actorSystem, nullptr, NKikimrConfig::TQueryServiceConfig());
3233
auto result = qp->SyncPrepareDataQuery(sql, IKqpHost::TPrepareSettings());
3334
result.Issues().PrintTo(Cerr);
3435
UNIT_ASSERT(result.Success());

ydb/core/kqp/host/kqp_host.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,7 @@ class TKqpHost : public IKqpHost {
10331033
std::optional<TKqpFederatedQuerySetup> federatedQuerySetup, const TIntrusiveConstPtr<NACLib::TUserToken>& userToken,
10341034
const NKikimr::NMiniKQL::IFunctionRegistry* funcRegistry, bool keepConfigChanges, bool isInternalCall,
10351035
TKqpTempTablesState::TConstPtr tempTablesState = nullptr, NActors::TActorSystem* actorSystem = nullptr,
1036-
NYql::TExprContext* ctx = nullptr)
1036+
NYql::TExprContext* ctx = nullptr, const NKikimrConfig::TQueryServiceConfig& queryServiceConfig = NKikimrConfig::TQueryServiceConfig())
10371037
: Gateway(gateway)
10381038
, Cluster(cluster)
10391039
, GUCSettings(gUCSettings)
@@ -1051,6 +1051,7 @@ class TKqpHost : public IKqpHost {
10511051
, FakeWorld(ctx ? nullptr : ExprCtx->NewWorld(TPosition()))
10521052
, ExecuteCtx(MakeIntrusive<TExecuteContext>())
10531053
, ActorSystem(actorSystem ? actorSystem : NActors::TActivationContext::ActorSystem())
1054+
, QueryServiceConfig(queryServiceConfig)
10541055
{
10551056
if (funcRegistry) {
10561057
FuncRegistry = funcRegistry;
@@ -1825,10 +1826,15 @@ class TKqpHost : public IKqpHost {
18251826
|| settingName == "FilterPushdownOverJoinOptionalSide"
18261827
|| settingName == "DisableFilterPushdownOverJoinOptionalSide"
18271828
|| settingName == "RotateJoinTree"
1829+
|| settingName == "TimeOrderRecoverDelay"
1830+
|| settingName == "TimeOrderRecoverAhead"
1831+
|| settingName == "TimeOrderRecoverRowLimit"
1832+
|| settingName == "MatchRecognizeStream"
18281833
;
18291834
};
18301835
auto configProvider = CreateConfigProvider(*TypesCtx, gatewaysConfig, {}, allowSettings);
18311836
TypesCtx->AddDataSource(ConfigProviderName, configProvider);
1837+
TypesCtx->MatchRecognize = QueryServiceConfig.GetEnableMatchRecognize();
18321838

18331839
YQL_ENSURE(TypesCtx->Initialize(*ExprCtx));
18341840

@@ -1930,6 +1936,7 @@ class TKqpHost : public IKqpHost {
19301936

19311937
TKqpTempTablesState::TConstPtr TempTablesState;
19321938
NActors::TActorSystem* ActorSystem = nullptr;
1939+
NKikimrConfig::TQueryServiceConfig QueryServiceConfig;
19331940
};
19341941

19351942
} // namespace
@@ -1951,10 +1958,11 @@ TIntrusivePtr<IKqpHost> CreateKqpHost(TIntrusivePtr<IKqpGateway> gateway, const
19511958
const TString& database, TKikimrConfiguration::TPtr config, IModuleResolver::TPtr moduleResolver,
19521959
std::optional<TKqpFederatedQuerySetup> federatedQuerySetup, const TIntrusiveConstPtr<NACLib::TUserToken>& userToken, const TGUCSettings::TPtr& gUCSettings,
19531960
const TMaybe<TString>& applicationName, const NKikimr::NMiniKQL::IFunctionRegistry* funcRegistry, bool keepConfigChanges,
1954-
bool isInternalCall, TKqpTempTablesState::TConstPtr tempTablesState, NActors::TActorSystem* actorSystem, NYql::TExprContext* ctx)
1961+
bool isInternalCall, TKqpTempTablesState::TConstPtr tempTablesState, NActors::TActorSystem* actorSystem, NYql::TExprContext* ctx,
1962+
const NKikimrConfig::TQueryServiceConfig& queryServiceConfig)
19551963
{
19561964
return MakeIntrusive<TKqpHost>(gateway, cluster, database, gUCSettings, applicationName, config, moduleResolver, federatedQuerySetup, userToken, funcRegistry,
1957-
keepConfigChanges, isInternalCall, std::move(tempTablesState), actorSystem, ctx);
1965+
keepConfigChanges, isInternalCall, std::move(tempTablesState), actorSystem, ctx, queryServiceConfig);
19581966
}
19591967

19601968
} // namespace NKqp

ydb/core/kqp/host/kqp_host.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ TIntrusivePtr<IKqpHost> CreateKqpHost(TIntrusivePtr<IKqpGateway> gateway,
123123
const TMaybe<TString>& applicationName = Nothing(), const NKikimr::NMiniKQL::IFunctionRegistry* funcRegistry = nullptr,
124124
bool keepConfigChanges = false, bool isInternalCall = false, TKqpTempTablesState::TConstPtr tempTablesState = nullptr,
125125
NActors::TActorSystem* actorSystem = nullptr /*take from TLS by default*/,
126-
NYql::TExprContext* ctx = nullptr);
126+
NYql::TExprContext* ctx = nullptr,
127+
const NKikimrConfig::TQueryServiceConfig& queryServiceConfig = NKikimrConfig::TQueryServiceConfig());
127128

128129
} // namespace NKqp
129130
} // namespace NKikimr

ydb/core/kqp/opt/logical/kqp_opt_log.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <ydb/core/kqp/opt/physical/kqp_opt_phy_rules.h>
77
#include <ydb/core/kqp/provider/yql_kikimr_provider_impl.h>
88

9+
#include <ydb/library/yql/core/yql_opt_match_recognize.h>
910
#include <ydb/library/yql/core/yql_opt_utils.h>
1011
#include <ydb/library/yql/dq/opt/dq_opt_join.h>
1112
#include <ydb/library/yql/dq/opt/dq_opt_log.h>
@@ -60,6 +61,7 @@ class TKqpLogicalOptTransformer : public TOptimizeTransformerBase {
6061
AddHandler(0, &TCoNarrowFlatMap::Match, HNDL(DqReadWideWrapFieldSubset));
6162
AddHandler(0, &TCoNarrowMultiMap::Match, HNDL(DqReadWideWrapFieldSubset));
6263
AddHandler(0, &TCoWideMap::Match, HNDL(DqReadWideWrapFieldSubset));
64+
AddHandler(0, &TCoMatchRecognize::Match, HNDL(MatchRecognize));
6365

6466
AddHandler(1, &TCoTop::Match, HNDL(RewriteTopSortOverIndexRead));
6567
AddHandler(1, &TCoTopSort::Match, HNDL(RewriteTopSortOverIndexRead));
@@ -288,6 +290,14 @@ class TKqpLogicalOptTransformer : public TOptimizeTransformerBase {
288290
return output;
289291
}
290292

293+
TMaybeNode<TExprBase> MatchRecognize(TExprBase node, TExprContext& ctx) {
294+
auto output = ExpandMatchRecognize(node.Ptr(), ctx, TypesCtx);
295+
if (output) {
296+
DumpAppliedRule("MatchRecognize", node.Ptr(), output, ctx);
297+
}
298+
return output;
299+
}
300+
291301
TMaybeNode<TExprBase> DqReadWrapByProvider(TExprBase node, TExprContext& ctx) {
292302
auto output = NDq::DqReadWrapByProvider(node, ctx, TypesCtx);
293303
if (output) {

ydb/core/kqp/session_actor/kqp_worker_actor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ class TKqpWorkerActor : public TActorBootstrapped<TKqpWorkerActor> {
194194
Config->FeatureFlags = AppData(ctx)->FeatureFlags;
195195

196196
KqpHost = CreateKqpHost(Gateway, Settings.Cluster, Settings.Database, Config, ModuleResolverState->ModuleResolver, FederatedQuerySetup,
197-
QueryState->RequestEv->GetUserToken(), GUCSettings, Settings.ApplicationName, AppData(ctx)->FunctionRegistry, !Settings.LongSession, false);
197+
QueryState->RequestEv->GetUserToken(), GUCSettings, Settings.ApplicationName, AppData(ctx)->FunctionRegistry, !Settings.LongSession, false, nullptr, nullptr, nullptr, QueryServiceConfig);
198198

199199
auto& queryRequest = QueryState->RequestEv;
200200
QueryState->ProxyRequestId = proxyRequestId;

ydb/core/kqp/ut/indexes/kqp_indexes_ut.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ TIntrusivePtr<IKqpHost> CreateKikimrQueryProcessor(TIntrusivePtr<IKqpGateway> ga
5555

5656
auto federatedQuerySetup = std::make_optional<TKqpFederatedQuerySetup>({NYql::IHTTPGateway::Make(), nullptr, nullptr, nullptr, {}, {}, {}, nullptr, nullptr, {}});
5757
return NKqp::CreateKqpHost(gateway, cluster, "/Root", kikimrConfig, moduleResolver,
58-
federatedQuerySetup, nullptr, nullptr, {}, funcRegistry, funcRegistry, keepConfigChanges, nullptr, actorSystem);
58+
federatedQuerySetup, nullptr, nullptr, {}, funcRegistry, funcRegistry, keepConfigChanges, nullptr, actorSystem, nullptr, NKikimrConfig::TQueryServiceConfig());
5959
}
6060

6161
NYql::NNodes::TExprBase GetExpr(const TString& ast, NYql::TExprContext& ctx, NYql::IModuleResolver* moduleResolver) {

ydb/core/kqp/ut/yql/kqp_pragma_ut.cpp

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,93 @@ Y_UNIT_TEST_SUITE(KqpPragma) {
8484
UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::SUCCESS, result.GetIssues().ToString());
8585
UNIT_ASSERT_C(result.GetIssues().Empty(), result.GetIssues().ToString());
8686
}
87+
88+
Y_UNIT_TEST(MatchRecognizeWithTimeOrderRecoverer) {
89+
TKikimrSettings settings;
90+
NKikimrConfig::TAppConfig appConfig;
91+
appConfig.MutableQueryServiceConfig()->SetEnableMatchRecognize(true);
92+
settings.SetAppConfig(appConfig);
93+
94+
TKikimrRunner kikimr(settings);
95+
NYdb::NScripting::TScriptingClient client(kikimr.GetDriver());
96+
97+
auto result = client.ExecuteYqlScript(R"(
98+
PRAGMA FeatureR010="prototype";
99+
100+
CREATE TABLE `/Root/NewTable` (
101+
dt Uint64,
102+
value String,
103+
PRIMARY KEY (dt)
104+
);
105+
COMMIT;
106+
107+
INSERT INTO `/Root/NewTable` (dt, value) VALUES
108+
(1, 'value1'), (2, 'value2'), (3, 'value3'), (4, 'value4');
109+
COMMIT;
110+
111+
SELECT * FROM (SELECT dt, value FROM `/Root/NewTable`)
112+
MATCH_RECOGNIZE(
113+
ORDER BY CAST(dt as Timestamp)
114+
MEASURES
115+
LAST(V1.dt) as v1,
116+
LAST(V4.dt) as v4
117+
ONE ROW PER MATCH
118+
PATTERN (V1 V* V4)
119+
DEFINE
120+
V1 as V1.value = "value1",
121+
V as True,
122+
V4 as V4.value = "value4"
123+
);
124+
)").GetValueSync();
125+
UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::SUCCESS, result.GetIssues().ToString());
126+
CompareYson(R"([
127+
[[1u];[4u]];
128+
])", FormatResultSetYson(result.GetResultSet(0)));
129+
}
130+
131+
Y_UNIT_TEST(MatchRecognizeWithoutTimeOrderRecoverer) {
132+
TKikimrSettings settings;
133+
NKikimrConfig::TAppConfig appConfig;
134+
appConfig.MutableQueryServiceConfig()->SetEnableMatchRecognize(true);
135+
settings.SetAppConfig(appConfig);
136+
137+
TKikimrRunner kikimr(settings);
138+
NYdb::NScripting::TScriptingClient client(kikimr.GetDriver());
139+
140+
auto result = client.ExecuteYqlScript(R"(
141+
PRAGMA FeatureR010="prototype";
142+
PRAGMA config.flags("MatchRecognizeStream", "disable");
143+
144+
CREATE TABLE `/Root/NewTable` (
145+
dt Uint64,
146+
value String,
147+
PRIMARY KEY (dt)
148+
);
149+
COMMIT;
150+
151+
INSERT INTO `/Root/NewTable` (dt, value) VALUES
152+
(1, 'value1'), (2, 'value2'), (3, 'value3'), (4, 'value4');
153+
COMMIT;
154+
155+
SELECT * FROM (SELECT dt, value FROM `/Root/NewTable`)
156+
MATCH_RECOGNIZE(
157+
ORDER BY CAST(dt as Timestamp)
158+
MEASURES
159+
LAST(V1.dt) as v1,
160+
LAST(V4.dt) as v4
161+
ONE ROW PER MATCH
162+
PATTERN (V1 V* V4)
163+
DEFINE
164+
V1 as V1.value = "value1",
165+
V as True,
166+
V4 as V4.value = "value4"
167+
);
168+
)").GetValueSync();
169+
UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::SUCCESS, result.GetIssues().ToString());
170+
CompareYson(R"([
171+
[[1u];[4u]];
172+
])", FormatResultSetYson(result.GetResultSet(0)));
173+
}
87174
}
88175

89176
} // namspace NKqp

ydb/core/protos/config.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,6 +1016,7 @@ message TQueryServiceConfig {
10161016
optional TFinalizeScriptServiceConfig FinalizeScriptServiceConfig = 12;
10171017
optional uint64 ProgressStatsPeriodMs = 14 [default = 0]; // 0 = disabled
10181018
optional uint32 QueryTimeoutDefaultSeconds = 19 [default = 1800];
1019+
optional bool EnableMatchRecognize = 20 [default = false];
10191020
}
10201021

10211022
// Config describes immediate controls and allows

ydb/library/yql/core/yql_opt_match_recognize.cpp

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ TExprNode::TPtr ExpandMatchRecognize(const TExprNode::TPtr& node, TExprContext&
145145
TExprNode::TPtr sortOrder;
146146
ExtractSortKeyAndOrder(pos, sortTraits, sortKey, sortOrder, ctx);
147147
TExprNode::TPtr result;
148+
YQL_ENSURE(sortOrder->ChildrenSize() == 1, "Expect ORDER BY timestamp for MATCH_RECOGNIZE");
148149
if (isStreaming) {
149-
YQL_ENSURE(sortOrder->ChildrenSize() == 1, "Expect ORDER BY timestamp for MATCH_RECOGNIZE on streams");
150150
const auto reordered = ctx.Builder(pos)
151151
.Lambda()
152152
.Param("partition")
@@ -216,7 +216,6 @@ TExprNode::TPtr ExpandMatchRecognize(const TExprNode::TPtr& node, TExprContext&
216216
.Seal()
217217
.Build();
218218
} else { //non-streaming
219-
if (partitionColumns->ChildrenSize() != 0) {
220219
result = ctx.Builder(pos)
221220
.Callable("PartitionsByKeys")
222221
.Add(0, input)
@@ -226,27 +225,6 @@ TExprNode::TPtr ExpandMatchRecognize(const TExprNode::TPtr& node, TExprContext&
226225
.Add(4, matchRecognize)
227226
.Seal()
228227
.Build();
229-
} else {
230-
if (sortOrder->IsCallable("Void")) {
231-
result = ctx.Builder(pos)
232-
.Apply(matchRecognize)
233-
.With(0, input)
234-
.Seal()
235-
.Build();;
236-
} else {
237-
result = ctx.Builder(pos)
238-
.Apply(matchRecognize)
239-
.With(0)
240-
.Callable("Sort")
241-
.Add(0, input)
242-
.Add(1, sortOrder)
243-
.Add(2, sortKey)
244-
.Seal()
245-
.Done()
246-
.Seal()
247-
.Build();
248-
}
249-
}
250228
}
251229
YQL_CLOG(INFO, Core) << "Expanded MatchRecognize";
252230
return result;

ydb/library/yql/tests/sql/dq_file/part16/canondata/result.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1892,9 +1892,9 @@
18921892
],
18931893
"test.test[match_recognize-test_type-default.txt-Debug]": [
18941894
{
1895-
"checksum": "cb5512aae3f5566055b2388be6d114af",
1896-
"size": 3220,
1897-
"uri": "https://{canondata_backend}/1937367/518bbcf510ad7a43c5e77746bafd21ed0e3fdc6e/resource.tar.gz#test.test_match_recognize-test_type-default.txt-Debug_/opt.yql_patched"
1895+
"checksum": "648119cc488bae598a0936f9d2c82b7e",
1896+
"size": 3458,
1897+
"uri": "https://{canondata_backend}/1916746/c4d7dbc720e57397caf847cd2616b1362110ddd2/resource.tar.gz#test.test_match_recognize-test_type-default.txt-Debug_/opt.yql_patched"
18981898
}
18991899
],
19001900
"test.test[match_recognize-test_type-default.txt-Plan]": [

ydb/library/yql/tests/sql/dq_file/part17/canondata/result.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1717,9 +1717,9 @@
17171717
],
17181718
"test.test[match_recognize-alerts-default.txt-Debug]": [
17191719
{
1720-
"checksum": "782bb90b80a43308dfef1dbd81055b12",
1721-
"size": 5618,
1722-
"uri": "https://{canondata_backend}/1942173/e32f1de19c4f2770a6f215d1dc22bc97e318bf22/resource.tar.gz#test.test_match_recognize-alerts-default.txt-Debug_/opt.yql_patched"
1720+
"checksum": "c8b1e13d6da573f8a1afd415db1d00e7",
1721+
"size": 5787,
1722+
"uri": "https://{canondata_backend}/1775319/86ab0de654a60bf1e3145a3d8e3d7eae4a9f26b8/resource.tar.gz#test.test_match_recognize-alerts-default.txt-Debug_/opt.yql_patched"
17231723
}
17241724
],
17251725
"test.test[match_recognize-alerts-default.txt-Plan]": [

ydb/library/yql/tests/sql/dq_file/part7/canondata/result.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1812,6 +1812,11 @@
18121812
}
18131813
],
18141814
"test.test[match_recognize-simple_paritioning-default.txt-Results]": [],
1815+
"test.test[match_recognize-without_order_by--Results]": [
1816+
{
1817+
"uri": "file://test.test_match_recognize-without_order_by--Results_/extracted"
1818+
}
1819+
],
18151820
"test.test[optimizers-combinebykey_fields_subset--Analyze]": [
18161821
{
18171822
"checksum": "7bed37d7e9b15a7d4515b8cda8e73b3e",

ydb/library/yql/tests/sql/suites/match_recognize/test_type.sql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ $data = [<|dt:4, host:"fqdn1", key:14|>];
77

88
-- NoPartitionNoMeasure
99
select * from AS_TABLE($data) MATCH_RECOGNIZE(
10+
ORDER BY CAST(dt as Timestamp)
1011
ONE ROW PER MATCH
1112
AFTER MATCH SKIP TO NEXT ROW
1213
PATTERN (
@@ -18,6 +19,7 @@ select * from AS_TABLE($data) MATCH_RECOGNIZE(
1819

1920
--NoPartitionStringMeasure
2021
select * from AS_TABLE($data) MATCH_RECOGNIZE(
22+
ORDER BY CAST(dt as Timestamp)
2123
MEASURES
2224
"SomeString" as Measure1
2325
ONE ROW PER MATCH
@@ -32,6 +34,7 @@ select * from AS_TABLE($data) MATCH_RECOGNIZE(
3234
--IntPartitionColNoMeasure
3335
select * from AS_TABLE($data) MATCH_RECOGNIZE(
3436
PARTITION BY dt
37+
ORDER BY CAST(dt as Timestamp)
3538
ONE ROW PER MATCH
3639
AFTER MATCH SKIP TO NEXT ROW
3740
PATTERN (
@@ -44,6 +47,7 @@ select * from AS_TABLE($data) MATCH_RECOGNIZE(
4447
--StringPartitionColStringMeasure
4548
select * from AS_TABLE($data) MATCH_RECOGNIZE(
4649
PARTITION BY host
50+
ORDER BY CAST(dt as Timestamp)
4751
MEASURES
4852
"SomeString" as Measure1
4953
ONE ROW PER MATCH
@@ -58,6 +62,7 @@ select * from AS_TABLE($data) MATCH_RECOGNIZE(
5862
--TwoPartitionColsTwoMeasures
5963
select * from AS_TABLE($data) MATCH_RECOGNIZE(
6064
PARTITION BY host, dt
65+
ORDER BY CAST(dt as Timestamp)
6166
MEASURES
6267
"SomeString" as S,
6368
345 as I
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
xfail
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
pragma FeatureR010="prototype";
2+
pragma config.flags("MatchRecognizeStream", "disable");
3+
4+
USE plato;
5+
6+
$data = [<||>];
7+
8+
select * from (select * from AS_TABLE($data) MATCH_RECOGNIZE(
9+
AFTER MATCH SKIP TO NEXT ROW
10+
PATTERN (
11+
A
12+
)
13+
DEFINE
14+
A as True
15+
));

ydb/library/yql/tools/dqrun/examples/gateways.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ YqlCore {
124124
Flags {
125125
Name: "_EnableStreamLookupJoin"
126126
}
127+
Flags {
128+
Name: "_EnableMatchRecognize"
129+
}
127130
}
128131

129132
SqlCore {

0 commit comments

Comments
 (0)