aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraneporada <aneporada@ydb.tech>2022-12-21 18:57:29 +0300
committeraneporada <aneporada@ydb.tech>2022-12-21 18:57:29 +0300
commit99c0ebbafdea901b71fb0be0696bc2b6fa58f0f6 (patch)
tree430cc7059f8820796ec1c25b3ef00037710fd68f
parent34fcd78a2d18d9846fd68339c8e240702857e1e5 (diff)
downloadydb-99c0ebbafdea901b71fb0be0696bc2b6fa58f0f6.tar.gz
BlockExpandChunked: add forgotten file
-rw-r--r--library/cpp/neh/multiclient.cpp2
-rw-r--r--library/cpp/neh/wfmo.h41
-rw-r--r--ydb/library/yql/providers/common/mkql/yql_provider_mkql.cpp5
3 files changed, 29 insertions, 19 deletions
diff --git a/library/cpp/neh/multiclient.cpp b/library/cpp/neh/multiclient.cpp
index cb7672755e..650688ae6b 100644
--- a/library/cpp/neh/multiclient.cpp
+++ b/library/cpp/neh/multiclient.cpp
@@ -280,7 +280,7 @@ namespace {
void ScheduleRequest(TIntrusivePtr<TRequestSupervisor>& rs, const THandleRef& h, const TInstant& deadline) {
TJobPtr j(new TNewRequest(rs));
JQ_.Enqueue(j);
- if (!h->Signalled) {
+ if (!h->Signalled()) {
if (deadline.GetValue() < GetNearDeadline_()) {
Signal();
}
diff --git a/library/cpp/neh/wfmo.h b/library/cpp/neh/wfmo.h
index a51d391612..15d92e3ef5 100644
--- a/library/cpp/neh/wfmo.h
+++ b/library/cpp/neh/wfmo.h
@@ -28,37 +28,42 @@ namespace NNeh {
class TWaitQueue {
public:
- struct TWaitHandle {
- inline TWaitHandle() noexcept
- : Signalled(false)
- , Parent(nullptr)
- {
- }
-
- inline void Signal() noexcept {
+ class TWaitHandle {
+ public:
+ void Signal() noexcept {
TGuard<TSpinLock> lock(M_);
- Signalled = true;
+ Signalled_ = true;
- if (Parent) {
- Parent->Notify(this);
+ if (Parent_) {
+ Parent_->Notify(this);
}
}
- inline void Register(TWaitQueue* parent) noexcept {
+ void Register(TWaitQueue* parent) noexcept {
TGuard<TSpinLock> lock(M_);
- Parent = parent;
+ Parent_ = parent;
- if (Signalled) {
- if (Parent) {
- Parent->Notify(this);
+ if (Signalled_) {
+ if (Parent_) {
+ Parent_->Notify(this);
}
}
}
- NAtomic::TBool Signalled;
- TWaitQueue* Parent;
+ bool Signalled() const {
+ return Signalled_;
+ }
+
+ void ResetState() {
+ TGuard<TSpinLock> lock(M_);
+
+ Signalled_ = false;
+ }
+ private:
+ NAtomic::TBool Signalled_ = false;
+ TWaitQueue* Parent_ = nullptr;
TSpinLock M_;
};
diff --git a/ydb/library/yql/providers/common/mkql/yql_provider_mkql.cpp b/ydb/library/yql/providers/common/mkql/yql_provider_mkql.cpp
index dff429c515..84421c87b9 100644
--- a/ydb/library/yql/providers/common/mkql/yql_provider_mkql.cpp
+++ b/ydb/library/yql/providers/common/mkql/yql_provider_mkql.cpp
@@ -2481,6 +2481,11 @@ TMkqlCommonCallableCompiler::TShared::TShared() {
return ctx.ProgramBuilder.BlockCompress(flow, index);
});
+ AddCallable("BlockExpandChunked", [](const TExprNode& node, TMkqlBuildContext& ctx) {
+ const auto flow = MkqlBuildExpr(node.Head(), ctx);
+ return ctx.ProgramBuilder.BlockExpandChunked(flow);
+ });
+
AddCallable("PgArray", [](const TExprNode& node, TMkqlBuildContext& ctx) {
std::vector<TRuntimeNode> args;
args.reserve(node.ChildrenSize());