forked from ydb-platform/ydb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
YQ RD enable LLVM in purecalc filters (ydb-platform#11442)
- Loading branch information
1 parent
5fe3c6f
commit 5fe3ee7
Showing
15 changed files
with
121 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#include "common.h" | ||
|
||
#include <util/system/mutex.h> | ||
|
||
#include <ydb/library/yql/public/purecalc/common/interface.h> | ||
|
||
namespace NFq { | ||
|
||
namespace { | ||
|
||
class TPureCalcProgramFactory : public IPureCalcProgramFactory { | ||
public: | ||
TPureCalcProgramFactory() { | ||
CreateFactory({.EnabledLLVM = false}); | ||
CreateFactory({.EnabledLLVM = true}); | ||
} | ||
|
||
NYql::NPureCalc::IProgramFactoryPtr GetFactory(const TSettings& settings) const override { | ||
const auto it = ProgramFactories.find(settings); | ||
Y_ENSURE(it != ProgramFactories.end()); | ||
return it->second; | ||
} | ||
|
||
private: | ||
void CreateFactory(const TSettings& settings) { | ||
ProgramFactories.insert({settings, NYql::NPureCalc::MakeProgramFactory( | ||
NYql::NPureCalc::TProgramFactoryOptions() | ||
.SetLLVMSettings(settings.EnabledLLVM ? "ON" : "OFF") | ||
)}); | ||
} | ||
|
||
private: | ||
std::map<TSettings, NYql::NPureCalc::IProgramFactoryPtr> ProgramFactories; | ||
}; | ||
|
||
} // anonymous namespace | ||
|
||
IPureCalcProgramFactory::TPtr CreatePureCalcProgramFactory() { | ||
return MakeIntrusive<TPureCalcProgramFactory>(); | ||
} | ||
|
||
} // namespace NFq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#pragma once | ||
|
||
#include <util/generic/ptr.h> | ||
|
||
#include <ydb/library/yql/public/purecalc/common/fwd.h> | ||
|
||
namespace NFq { | ||
|
||
class IPureCalcProgramFactory : public TThrRefBase { | ||
public: | ||
using TPtr = TIntrusivePtr<IPureCalcProgramFactory>; | ||
|
||
struct TSettings { | ||
bool EnabledLLVM = false; | ||
|
||
std::strong_ordering operator<=>(const TSettings& other) const = default; | ||
}; | ||
|
||
public: | ||
virtual NYql::NPureCalc::IProgramFactoryPtr GetFactory(const TSettings& settings) const = 0; | ||
}; | ||
|
||
IPureCalcProgramFactory::TPtr CreatePureCalcProgramFactory(); | ||
|
||
} // namespace NFq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ LIBRARY() | |
|
||
SRCS( | ||
actors_factory.cpp | ||
common.cpp | ||
coordinator.cpp | ||
json_filter.cpp | ||
json_parser.cpp | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.