Skip to content

Commit 74d8d4e

Browse files
correct logs and branches priority (#16807)
1 parent 91d556c commit 74d8d4e

File tree

3 files changed

+28
-3
lines changed

3 files changed

+28
-3
lines changed

ydb/core/formats/arrow/program/assign_internal.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ TConclusion<std::shared_ptr<TCalculationProcessor>> TCalculationProcessor::Build
4040

4141
NJson::TJsonValue TCalculationProcessor::DoDebugJson() const {
4242
NJson::TJsonValue result = NJson::JSON_MAP;
43-
result.InsertValue("kernel", KernelLogic->GetClassName());
43+
result.InsertValue("kernel", KernelLogic->DebugJson());
4444
return result;
4545
}
4646

ydb/core/formats/arrow/program/kernel_logic.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,12 @@ bool TSimpleKernelLogic::IsBoolInResult() const {
110110
}
111111
}
112112

113+
NJson::TJsonValue TSimpleKernelLogic::DoDebugJson() const {
114+
if (YqlOperationId) {
115+
return ::ToString((NYql::TKernelRequestBuilder::EBinaryOp)*YqlOperationId);
116+
} else {
117+
return NJson::JSON_NULL;
118+
}
119+
}
120+
113121
} // namespace NKikimr::NArrow::NSSA

ydb/core/formats/arrow/program/kernel_logic.h

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ enum class ECalculationHardness {
1313
NotSpecified = 3,
1414
Equals = 5,
1515
StringMatching = 10,
16-
Unknown = 20
16+
Unknown = 8
1717
};
1818

1919
class IKernelLogic {
@@ -23,8 +23,20 @@ class IKernelLogic {
2323

2424
virtual std::optional<TIndexCheckOperation> DoGetIndexCheckerOperation() const = 0;
2525
YDB_ACCESSOR_DEF(std::optional<ui32>, YqlOperationId);
26-
26+
virtual NJson::TJsonValue DoDebugJson() const {
27+
return NJson::JSON_NULL;
28+
}
2729
public:
30+
NJson::TJsonValue DebugJson() const {
31+
NJson::TJsonValue result = NJson::JSON_MAP;
32+
result.InsertValue("class_name", GetClassName());
33+
auto details = DoDebugJson();
34+
if (details.IsDefined()) {
35+
result.InsertValue("details", std::move(details));
36+
}
37+
return result;
38+
}
39+
2840
IKernelLogic() = default;
2941

3042
IKernelLogic(const ui32 yqlOperationId)
@@ -66,6 +78,7 @@ class TSimpleKernelLogic: public IKernelLogic {
6678
return false;
6779
}
6880

81+
virtual NJson::TJsonValue DoDebugJson() const override;
6982
virtual std::optional<TIndexCheckOperation> DoGetIndexCheckerOperation() const override {
7083
return std::nullopt;
7184
}
@@ -111,6 +124,10 @@ class TLogicMatchString: public IKernelLogic {
111124
const bool CaseSensitive;
112125
const bool IsSimpleFunction;
113126

127+
virtual NJson::TJsonValue DoDebugJson() const override {
128+
return ::ToString(Operation) + "::" + ::ToString(CaseSensitive) + "::" + ::ToString(IsSimpleFunction);
129+
}
130+
114131
public:
115132
TLogicMatchString(const TIndexCheckOperation::EOperation operation, const bool caseSensitive, const bool isSimpleFunction)
116133
: Operation(operation)

0 commit comments

Comments
 (0)