diff options
author | ssmike <ssmike@ydb.tech> | 2022-12-15 15:56:52 +0300 |
---|---|---|
committer | ssmike <ssmike@ydb.tech> | 2022-12-15 15:56:52 +0300 |
commit | ce6fad28b04f0ab00d85dd7300b98029d754403e (patch) | |
tree | 5e4c592befb797c20eee70528785dfa838387712 | |
parent | b0756cd49efba4719aecd33c0b442ad22dbf4aa2 (diff) | |
download | ydb-ce6fad28b04f0ab00d85dd7300b98029d754403e.tar.gz |
Disable evread for sysviews
-rw-r--r-- | ydb/core/kqp/opt/physical/kqp_opt_phy_build_stage.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ydb/core/kqp/opt/physical/kqp_opt_phy_build_stage.cpp b/ydb/core/kqp/opt/physical/kqp_opt_phy_build_stage.cpp index 9fde823cd8..918a2600bf 100644 --- a/ydb/core/kqp/opt/physical/kqp_opt_phy_build_stage.cpp +++ b/ydb/core/kqp/opt/physical/kqp_opt_phy_build_stage.cpp @@ -59,8 +59,11 @@ TExprBase KqpBuildReadTableStage(TExprBase node, TExprContext& ctx, const TKqpOp return node; } const TKqlReadTable& read = node.Cast<TKqlReadTable>(); + auto& tableDesc = kqpCtx.Tables->ExistingTable(kqpCtx.Cluster, read.Table().Path()); + bool useSource = kqpCtx.Config->EnableKqpScanQuerySourceRead && kqpCtx.IsScanQuery(); useSource = useSource || (kqpCtx.Config->EnableKqpDataQuerySourceRead && kqpCtx.IsDataQuery()); + useSource = useSource && tableDesc.Metadata->Kind != EKikimrTableKind::SysView; TVector<TExprBase> values; TNodeOnNodeOwnedMap replaceMap; @@ -169,8 +172,6 @@ TExprBase KqpBuildReadTableStage(TExprBase node, TExprContext& ctx, const TKqpOp .Done()); } - auto& tableDesc = kqpCtx.Tables->ExistingTable(kqpCtx.Cluster, read.Table().Path()); - TMaybeNode<TExprBase> phyRead; switch (tableDesc.Metadata->Kind) { case EKikimrTableKind::Datashard: @@ -227,6 +228,8 @@ TExprBase KqpBuildReadTableRangesStage(TExprBase node, TExprContext& ctx, bool useSource = kqpCtx.Config->EnableKqpScanQuerySourceRead && kqpCtx.IsScanQuery(); useSource = useSource || (kqpCtx.Config->EnableKqpDataQuerySourceRead && kqpCtx.IsDataQuery()); + useSource = useSource && tableDesc.Metadata->Kind != EKikimrTableKind::SysView; + bool fullScan = TCoVoid::Match(ranges.Raw()); TVector<TExprBase> input; |