-
Notifications
You must be signed in to change notification settings - Fork 638
YDB-2568 Enable match_recognize in ydb #6807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
7fc3c75
Add enable m_r flag to query service config
kardymonds c1f3ab7
add test
kardymonds d88e17b
comment second test
kardymonds 51d01a3
fix
kardymonds 707e4f2
fix non streaming test
kardymonds 8a8d541
update canon data
kardymonds 7b1cd7b
Merge remote-tracking branch 'upstream/main' into YDB-2568-M_R_in_ydb
kardymonds 204b512
make not optional config
kardymonds 051890b
update others canondata
kardymonds 4787921
add test without order
kardymonds 8a994d3
update canon data
kardymonds File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1033,7 +1033,7 @@ class TKqpHost : public IKqpHost { | |
std::optional<TKqpFederatedQuerySetup> federatedQuerySetup, const TIntrusiveConstPtr<NACLib::TUserToken>& userToken, | ||
const NKikimr::NMiniKQL::IFunctionRegistry* funcRegistry, bool keepConfigChanges, bool isInternalCall, | ||
TKqpTempTablesState::TConstPtr tempTablesState = nullptr, NActors::TActorSystem* actorSystem = nullptr, | ||
NYql::TExprContext* ctx = nullptr) | ||
NYql::TExprContext* ctx = nullptr, const NKikimrConfig::TQueryServiceConfig& queryServiceConfig = NKikimrConfig::TQueryServiceConfig()) | ||
: Gateway(gateway) | ||
, Cluster(cluster) | ||
, GUCSettings(gUCSettings) | ||
|
@@ -1051,6 +1051,7 @@ class TKqpHost : public IKqpHost { | |
, FakeWorld(ctx ? nullptr : ExprCtx->NewWorld(TPosition())) | ||
, ExecuteCtx(MakeIntrusive<TExecuteContext>()) | ||
, ActorSystem(actorSystem ? actorSystem : NActors::TActivationContext::ActorSystem()) | ||
, QueryServiceConfig(queryServiceConfig) | ||
{ | ||
if (funcRegistry) { | ||
FuncRegistry = funcRegistry; | ||
|
@@ -1825,10 +1826,15 @@ class TKqpHost : public IKqpHost { | |
|| settingName == "FilterPushdownOverJoinOptionalSide" | ||
|| settingName == "DisableFilterPushdownOverJoinOptionalSide" | ||
|| settingName == "RotateJoinTree" | ||
|| settingName == "TimeOrderRecoverDelay" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. А эти штуки под флаг не нужно тоже затащить? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Думаю, что нет такой необходимости |
||
|| settingName == "TimeOrderRecoverAhead" | ||
|| settingName == "TimeOrderRecoverRowLimit" | ||
|| settingName == "MatchRecognizeStream" | ||
; | ||
}; | ||
auto configProvider = CreateConfigProvider(*TypesCtx, gatewaysConfig, {}, allowSettings); | ||
TypesCtx->AddDataSource(ConfigProviderName, configProvider); | ||
TypesCtx->MatchRecognize = QueryServiceConfig.GetEnableMatchRecognize(); | ||
|
||
YQL_ENSURE(TypesCtx->Initialize(*ExprCtx)); | ||
|
||
|
@@ -1930,6 +1936,7 @@ class TKqpHost : public IKqpHost { | |
|
||
TKqpTempTablesState::TConstPtr TempTablesState; | ||
NActors::TActorSystem* ActorSystem = nullptr; | ||
NKikimrConfig::TQueryServiceConfig QueryServiceConfig; | ||
}; | ||
|
||
} // namespace | ||
|
@@ -1950,11 +1957,11 @@ Ydb::Table::QueryStatsCollection::Mode GetStatsMode(NYql::EKikimrStatsMode stats | |
TIntrusivePtr<IKqpHost> CreateKqpHost(TIntrusivePtr<IKqpGateway> gateway, const TString& cluster, | ||
const TString& database, TKikimrConfiguration::TPtr config, IModuleResolver::TPtr moduleResolver, | ||
std::optional<TKqpFederatedQuerySetup> federatedQuerySetup, const TIntrusiveConstPtr<NACLib::TUserToken>& userToken, const TGUCSettings::TPtr& gUCSettings, | ||
const TMaybe<TString>& applicationName, const NKikimr::NMiniKQL::IFunctionRegistry* funcRegistry, bool keepConfigChanges, | ||
const NKikimrConfig::TQueryServiceConfig& queryServiceConfig, const TMaybe<TString>& applicationName, const NKikimr::NMiniKQL::IFunctionRegistry* funcRegistry, bool keepConfigChanges, | ||
bool isInternalCall, TKqpTempTablesState::TConstPtr tempTablesState, NActors::TActorSystem* actorSystem, NYql::TExprContext* ctx) | ||
{ | ||
return MakeIntrusive<TKqpHost>(gateway, cluster, database, gUCSettings, applicationName, config, moduleResolver, federatedQuerySetup, userToken, funcRegistry, | ||
keepConfigChanges, isInternalCall, std::move(tempTablesState), actorSystem, ctx); | ||
keepConfigChanges, isInternalCall, std::move(tempTablesState), actorSystem, ctx, queryServiceConfig); | ||
} | ||
|
||
} // namespace NKqp | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...ql/dq_file/part7/canondata/test.test_match_recognize-without_order_by--Results_/extracted
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<tmp_path>/program.sql:<main>: Fatal: Optimization | ||
|
||
<tmp_path>/program.sql:<main>:8:1: Fatal: ydb/library/yql/core/yql_opt_match_recognize.cpp:xxx ExpandMatchRecognize(): requirement sortOrder->ChildrenSize() == 1 failed, message: Expect ORDER BY timestamp for MATCH_RECOGNIZE | ||
select * from (select * from AS_TABLE($data) MATCH_RECOGNIZE( | ||
^ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Давай уберем дефолт для query service config