diff options
author | a-romanov <Anton.Romanov@ydb.tech> | 2022-11-30 18:22:48 +0300 |
---|---|---|
committer | a-romanov <Anton.Romanov@ydb.tech> | 2022-11-30 18:22:48 +0300 |
commit | 4afdcdb812e78e27ec1c8242060c714a3deb92d9 (patch) | |
tree | dd296507882fdea788ddef24d7f64910c22af473 | |
parent | 8e02186e1b12cefe9abb4056ad282889093dbeff (diff) | |
download | ydb-4afdcdb812e78e27ec1c8242060c714a3deb92d9.tar.gz |
Fixes and cleanup about GraceJoin.
Вместо
pragma dq.EnableGraceJoin;
будет
pragma dq.HashJoinMode='grace';
8 files changed, 9 insertions, 30 deletions
diff --git a/ydb/library/yql/core/expr_nodes/yql_expr_nodes.json b/ydb/library/yql/core/expr_nodes/yql_expr_nodes.json index 307844f9f7..8e35c09274 100644 --- a/ydb/library/yql/core/expr_nodes/yql_expr_nodes.json +++ b/ydb/library/yql/core/expr_nodes/yql_expr_nodes.json @@ -1480,13 +1480,13 @@ "Base": "TCallable", "Match": {"Type": "Callable", "Name": "GraceJoinCore"}, "Children": [ - {"Index": 0, "Name": "LeftInput", "Type": "TExprBase", "Optional": true}, - {"Index": 1, "Name": "RightInput", "Type": "TExprBase" , "Optional": true}, - {"Index": 2, "Name": "JoinKind", "Type": "TCoAtom" , "Optional": true}, - {"Index": 3, "Name": "LeftKeysColumns", "Type": "TCoAtomList" , "Optional": true}, - {"Index": 4, "Name": "RightKeysColumns", "Type": "TCoAtomList", "Optional": true}, - {"Index": 5, "Name": "LeftRenames", "Type": "TCoAtomList", "Optional": true}, - {"Index": 6, "Name": "RightRenames", "Type": "TCoAtomList", "Optional": true} + {"Index": 0, "Name": "LeftInput", "Type": "TExprBase"}, + {"Index": 1, "Name": "RightInput", "Type": "TExprBase"}, + {"Index": 2, "Name": "JoinKind", "Type": "TCoAtom"}, + {"Index": 3, "Name": "LeftKeysColumns", "Type": "TCoAtomList"}, + {"Index": 4, "Name": "RightKeysColumns", "Type": "TCoAtomList"}, + {"Index": 5, "Name": "LeftRenames", "Type": "TCoAtomList"}, + {"Index": 6, "Name": "RightRenames", "Type": "TCoAtomList"} ] }, diff --git a/ydb/library/yql/dq/expr_nodes/dq_expr_nodes.json b/ydb/library/yql/dq/expr_nodes/dq_expr_nodes.json index 6fd47f46b1..11e2d47da4 100644 --- a/ydb/library/yql/dq/expr_nodes/dq_expr_nodes.json +++ b/ydb/library/yql/dq/expr_nodes/dq_expr_nodes.json @@ -47,11 +47,6 @@ "Match": {"Type": "Callable", "Name": "DqPhyMapJoin"} }, { - "Name": "TDqPhyGraceJoin", - "Base": "TDqJoinBase", - "Match": {"Type": "Callable", "Name": "GraceJoinCore"} - }, - { "Name": "TDqPhyCrossJoin", "Base": "TDqJoinBase", "Match": {"Type": "Callable", "Name": "DqPhyCrossJoin"} diff --git a/ydb/library/yql/dq/type_ann/dq_type_ann.cpp b/ydb/library/yql/dq/type_ann/dq_type_ann.cpp index 82901f8664..6988dd3f3a 100644 --- a/ydb/library/yql/dq/type_ann/dq_type_ann.cpp +++ b/ydb/library/yql/dq/type_ann/dq_type_ann.cpp @@ -721,17 +721,6 @@ TStatus AnnotateDqMapOrDictJoin(const TExprNode::TPtr& input, TExprContext& ctx) return TStatus::Ok; } -TStatus AnnotateDqGraceJoin(const TExprNode::TPtr& input, TExprContext& ctx) { - auto resultRowType = GetDqJoinResultType<true>(input, true, ctx); - if (!resultRowType) { - return TStatus::Error; - } - - input->SetTypeAnn(ctx.MakeType<TFlowExprType>(resultRowType)); - return TStatus::Ok; -} - - TStatus AnnotateDqCrossJoin(const TExprNode::TPtr& input, TExprContext& ctx) { auto resultRowType = GetDqJoinResultType<false>(input, true, ctx); if (!resultRowType) { diff --git a/ydb/library/yql/dq/type_ann/dq_type_ann.h b/ydb/library/yql/dq/type_ann/dq_type_ann.h index 9226943037..afcc29eb88 100644 --- a/ydb/library/yql/dq/type_ann/dq_type_ann.h +++ b/ydb/library/yql/dq/type_ann/dq_type_ann.h @@ -18,7 +18,6 @@ IGraphTransformer::TStatus AnnotateDqConnection(const TExprNode::TPtr& input, TE IGraphTransformer::TStatus AnnotateDqCnMerge(const TExprNode::TPtr& input, TExprContext& ctx); IGraphTransformer::TStatus AnnotateDqJoin(const TExprNode::TPtr& input, TExprContext& ctx); IGraphTransformer::TStatus AnnotateDqMapOrDictJoin(const TExprNode::TPtr& input, TExprContext& ctx); -IGraphTransformer::TStatus AnnotateDqGraceJoin(const TExprNode::TPtr& input, TExprContext& ctx); IGraphTransformer::TStatus AnnotateDqCrossJoin(const TExprNode::TPtr& input, TExprContext& ctx); IGraphTransformer::TStatus AnnotateDqSource(const TExprNode::TPtr& input, TExprContext& ctx); IGraphTransformer::TStatus AnnotateDqSink(const TExprNode::TPtr& input, TExprContext& ctx); diff --git a/ydb/library/yql/providers/dq/common/yql_dq_settings.cpp b/ydb/library/yql/providers/dq/common/yql_dq_settings.cpp index 2cdd2bdc40..61bb14a3a5 100644 --- a/ydb/library/yql/providers/dq/common/yql_dq_settings.cpp +++ b/ydb/library/yql/providers/dq/common/yql_dq_settings.cpp @@ -47,7 +47,6 @@ TDqConfiguration::TDqConfiguration() { REGISTER_SETTING(*this, _FallbackOnRuntimeErrors); REGISTER_SETTING(*this, WorkerFilter); REGISTER_SETTING(*this, _EnablePrecompute); - REGISTER_SETTING(*this, EnableGraceJoin); REGISTER_SETTING(*this, EnableDqReplicate); REGISTER_SETTING(*this, WatermarksMode); REGISTER_SETTING(*this, WatermarksGranularityMs); diff --git a/ydb/library/yql/providers/dq/common/yql_dq_settings.h b/ydb/library/yql/providers/dq/common/yql_dq_settings.h index 1d7697d61f..daae87e9d6 100644 --- a/ydb/library/yql/providers/dq/common/yql_dq_settings.h +++ b/ydb/library/yql/providers/dq/common/yql_dq_settings.h @@ -75,7 +75,6 @@ struct TDqSettings { NCommon::TConfSetting<TString, false> _FallbackOnRuntimeErrors; NCommon::TConfSetting<bool, false> _EnablePrecompute; NCommon::TConfSetting<bool, false> EnableDqReplicate; - NCommon::TConfSetting<bool, false> EnableGraceJoin; // TODO: drop. NCommon::TConfSetting<TString, false> WatermarksMode; NCommon::TConfSetting<bool, false> WatermarksEnableIdlePartitions; NCommon::TConfSetting<ui64, false> WatermarksGranularityMs; @@ -124,7 +123,6 @@ struct TDqSettings { SAVE_SETTING(ComputeActorType); SAVE_SETTING(WatermarksMode); SAVE_SETTING(WatermarksEnableIdlePartitions); - SAVE_SETTING(EnableGraceJoin); SAVE_SETTING(WatermarksGranularityMs); SAVE_SETTING(WatermarksLateArrivalDelayMs); SAVE_SETTING(UseAggPhases); diff --git a/ydb/library/yql/providers/dq/opt/physical_optimize.cpp b/ydb/library/yql/providers/dq/opt/physical_optimize.cpp index fb421dca4d..e0c6f75cab 100644 --- a/ydb/library/yql/providers/dq/opt/physical_optimize.cpp +++ b/ydb/library/yql/providers/dq/opt/physical_optimize.cpp @@ -316,7 +316,7 @@ protected: TMaybeNode<TExprBase> BuildJoin(TExprBase node, TExprContext& ctx, IOptimizationContext& optCtx, const TGetParents& getParents) { const auto join = node.Cast<TDqJoin>(); const TParentsMap* parentsMap = getParents(); - const auto mode = Config->HashJoinMode.Get().GetOrElse(Config->EnableGraceJoin.Get().GetOrElse(false) ? EHashJoinMode::Grace : EHashJoinMode::Off); + const auto mode = Config->HashJoinMode.Get().GetOrElse(EHashJoinMode::Off); return DqBuildJoin(join, ctx, optCtx, *parentsMap, IsGlobal, /* pushLeftStage = */ false /* TODO */, mode); } diff --git a/ydb/library/yql/providers/dq/provider/yql_dq_datasink_type_ann.cpp b/ydb/library/yql/providers/dq/provider/yql_dq_datasink_type_ann.cpp index 2adad93c6d..3368912d6b 100644 --- a/ydb/library/yql/providers/dq/provider/yql_dq_datasink_type_ann.cpp +++ b/ydb/library/yql/providers/dq/provider/yql_dq_datasink_type_ann.cpp @@ -33,7 +33,6 @@ public: } AddHandler({TDqJoin::CallableName()}, Hndl(&NDq::AnnotateDqJoin)); AddHandler({TDqPhyMapJoin::CallableName()}, Hndl(&NDq::AnnotateDqMapOrDictJoin)); - AddHandler({TDqPhyGraceJoin::CallableName()}, Hndl(&NDq::AnnotateDqGraceJoin)); AddHandler({TDqPhyCrossJoin::CallableName()}, Hndl(&NDq::AnnotateDqCrossJoin)); AddHandler({TDqPhyJoinDict::CallableName()}, Hndl(&NDq::AnnotateDqMapOrDictJoin)); AddHandler({TDqSink::CallableName()}, Hndl(&NDq::AnnotateDqSink)); @@ -93,4 +92,4 @@ THolder<TVisitorTransformerBase> CreateDqsDataSinkTypeAnnotationTransformer(TTyp return THolder(new TDqsDataSinkTypeAnnotationTransformer(typeCtx, enableDqReplicate)); } -} // NYql
\ No newline at end of file +} // NYql |