Skip to content

Commit

Permalink
Fixed CREATE TABLE AS SELECT for yt + kqp (ydb-platform#4562)
Browse files Browse the repository at this point in the history
  • Loading branch information
GrigoriyPA authored and MrLolthe1st committed May 28, 2024
1 parent abfb4e4 commit c768154
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
9 changes: 3 additions & 6 deletions ydb/core/kqp/executer_actor/kqp_data_executer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2095,8 +2095,7 @@ class TKqpDataExecuter : public TKqpExecuterBase<TKqpDataExecuter, EExecType::Da
KqpShardsResolverId = this->RegisterWithSameMailbox(kqpShardsResolver);
return;
} else if (HasOlapTable) {
GetResourcesSnapshot();
return;
ResourceSnapshotRequired = true;
}
}
DoExecute();
Expand All @@ -2106,10 +2105,8 @@ class TKqpDataExecuter : public TKqpExecuterBase<TKqpDataExecuter, EExecType::Da
if (!TBase::HandleResolve(ev)) {
return;
}
if (HasOlapTable) {
GetResourcesSnapshot();
return;
} else if (HasDatashardSourceScan) {
if (HasOlapTable || HasDatashardSourceScan) {
ResourceSnapshotRequired = ResourceSnapshotRequired || HasOlapTable;
DoExecute();
return;
}
Expand Down
3 changes: 3 additions & 0 deletions ydb/core/kqp/host/kqp_host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <ydb/library/yql/providers/generic/provider/yql_generic_provider.h>
#include <ydb/library/yql/providers/pg/provider/yql_pg_provider_impl.h>
#include <ydb/library/yql/providers/generic/provider/yql_generic_state.h>
#include <ydb/library/yql/providers/yt/expr_nodes/yql_yt_expr_nodes.h>
#include <ydb/library/yql/providers/yt/provider/yql_yt_provider.h>
#include <ydb/library/yql/minikql/invoke_builtins/mkql_builtins.h>

Expand Down Expand Up @@ -921,6 +922,8 @@ class TKqpQueryExecutor : public IKikimrQueryExecutor {
hasFederatedSorcesOrSinks = hasFederatedSorcesOrSinks
|| node.Maybe<TS3DataSource>()
|| node.Maybe<TS3DataSink>()
|| node.Maybe<TYtDSource>()
|| node.Maybe<TYtDSink>()
|| node.Maybe<TGenDataSource>();

return !hasFederatedSorcesOrSinks;
Expand Down
1 change: 1 addition & 0 deletions ydb/tests/tools/kqprun/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ udfs
*.json
*.sql
*.bin
*.txt
1 change: 1 addition & 0 deletions ydb/tests/tools/kqprun/configuration/app_config.conf
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ TableServiceConfig {
BindingsMode: BM_DROP
CompileTimeoutMs: 600000
EnableCreateTableAs: true
EnableOlapSink: true
EnablePerStatementQueryExecution: true
SessionsLimitPerNode: 1000

Expand Down

0 comments on commit c768154

Please sign in to comment.