|
2 | 2 | #include "yql_yt_op_hash.h"
|
3 | 3 | #include "yql_yt_op_settings.h"
|
4 | 4 |
|
| 5 | +#include <ydb/library/yql/dq/type_ann/dq_type_ann.h> |
5 | 6 | #include <ydb/library/yql/providers/yt/expr_nodes/yql_yt_expr_nodes.h>
|
6 | 7 | #include <ydb/library/yql/providers/yt/lib/hash/yql_hash_builder.h>
|
7 | 8 | #include <ydb/library/yql/utils/log/log.h>
|
@@ -48,6 +49,37 @@ TYtNodeHashCalculator::TYtNodeHashCalculator(const TYtState::TPtr& state, const
|
48 | 49 | return TString();
|
49 | 50 | };
|
50 | 51 |
|
| 52 | + Hashers[TDqStage::CallableName()] = [this] (const TExprNode& node, TArgIndex& argIndex, ui32 frameLevel) { |
| 53 | + THashBuilder builder; |
| 54 | + builder << node.Content(); |
| 55 | + for (size_t i = 0; i < node.ChildrenSize(); ++i) { |
| 56 | + // skip _logical_id setting from hashing |
| 57 | + if (i == TDqStageBase::idx_Settings) { |
| 58 | + for (size_t j = 0; j < node.Child(i)->ChildrenSize(); ++j) { |
| 59 | + if((node.Child(i)->Child(j)->Type() == TExprNode::List) |
| 60 | + && node.Child(i)->Child(j)->ChildrenSize() > 0 |
| 61 | + && (node.Child(i)->Child(j)->Child(0)->Content() = NDq::TDqStageSettings::LogicalIdSettingName)) { |
| 62 | + continue; |
| 63 | + } |
| 64 | + if (auto partHash = GetHashImpl(*node.Child(i)->Child(j), argIndex, frameLevel)) { |
| 65 | + builder << partHash; |
| 66 | + } |
| 67 | + else { |
| 68 | + return TString(); |
| 69 | + } |
| 70 | + } |
| 71 | + } else { |
| 72 | + if (auto partHash = GetHashImpl(*node.Child(i), argIndex, frameLevel)) { |
| 73 | + builder << partHash; |
| 74 | + } |
| 75 | + else { |
| 76 | + return TString(); |
| 77 | + } |
| 78 | + } |
| 79 | + } |
| 80 | + return builder.Finish(); |
| 81 | + }; |
| 82 | + |
51 | 83 | Hashers[TYtOutput::CallableName()] = [this] (const TExprNode& node, TArgIndex& argIndex, ui32 frameLevel) {
|
52 | 84 | return GetOutputHash(node, argIndex, frameLevel);
|
53 | 85 | };
|
|
0 commit comments