summaryrefslogtreecommitdiffstats
path: root/yql/essentials/minikql/comp_nodes/mkql_exists.cpp
diff options
context:
space:
mode:
authorvvvv <[email protected]>2025-10-09 12:25:18 +0300
committervvvv <[email protected]>2025-10-09 12:57:17 +0300
commitcb77d014972b2cdb27d2e6d979fc3a2772b27ad4 (patch)
tree7f3bcd8ce71c6bd0f3ccc11e31b9f665475b819e /yql/essentials/minikql/comp_nodes/mkql_exists.cpp
parentd58a8990d353b051c27e1069141117fdfde64358 (diff)
YQL-20086 minikql
commit_hash:e96f7390db5fcbe7e9f64f898141a263ad522daa
Diffstat (limited to 'yql/essentials/minikql/comp_nodes/mkql_exists.cpp')
-rw-r--r--yql/essentials/minikql/comp_nodes/mkql_exists.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/yql/essentials/minikql/comp_nodes/mkql_exists.cpp b/yql/essentials/minikql/comp_nodes/mkql_exists.cpp
index a566a6b1672..82fd70f790c 100644
--- a/yql/essentials/minikql/comp_nodes/mkql_exists.cpp
+++ b/yql/essentials/minikql/comp_nodes/mkql_exists.cpp
@@ -1,5 +1,5 @@
#include "mkql_exists.h"
-#include <yql/essentials/minikql/computation/mkql_computation_node_codegen.h> // Y_IGNORE
+#include <yql/essentials/minikql/computation/mkql_computation_node_codegen.h> // Y_IGNORE
#include <yql/essentials/minikql/mkql_node_cast.h>
namespace NKikimr {
@@ -7,12 +7,14 @@ namespace NMiniKQL {
namespace {
-class TExistsWrapper : public TDecoratorCodegeneratorNode<TExistsWrapper> {
+class TExistsWrapper: public TDecoratorCodegeneratorNode<TExistsWrapper> {
typedef TDecoratorCodegeneratorNode<TExistsWrapper> TBaseComputation;
+
public:
TExistsWrapper(IComputationNode* optional)
: TBaseComputation(optional)
- {}
+ {
+ }
NUdf::TUnboxedValuePod DoCalculate(TComputationContext&, const NUdf::TUnboxedValuePod& value) const {
return NUdf::TUnboxedValuePod(bool(value));
@@ -22,19 +24,20 @@ public:
Value* DoGenerateGetValue(const TCodegenContext& ctx, Value* value, BasicBlock*& block) const {
auto& context = ctx.Codegen.GetContext();
const auto check = IsExists(value, block, context);
- if (Node_->IsTemporaryValue())
+ if (Node_->IsTemporaryValue()) {
ValueCleanup(Node_->GetRepresentation(), value, ctx, block);
+ }
return MakeBoolean(check, context, block);
}
#endif
};
-}
+} // namespace
IComputationNode* WrapExists(TCallable& callable, const TComputationNodeFactoryContext& ctx) {
MKQL_ENSURE(callable.GetInputsCount() == 1, "Expected 1 arg");
return new TExistsWrapper(LocateNode(ctx.NodeLocator, callable, 0));
}
-}
-}
+} // namespace NMiniKQL
+} // namespace NKikimr