File tree Expand file tree Collapse file tree 3 files changed +13
-10
lines changed
core/fq/libs/row_dispatcher
library/yql/providers/pq/provider Expand file tree Collapse file tree 3 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -10,22 +10,26 @@ namespace {
10
10
11
11
class TPureCalcProgramFactory : public IPureCalcProgramFactory {
12
12
public:
13
- NYql::NPureCalc::IProgramFactoryPtr GetFactory (const TSettings& settings) override {
14
- TGuard<TMutex> guard (FactoriesMutex);
13
+ TPureCalcProgramFactory () {
14
+ CreateFactory ({.EnabledLLVM = false });
15
+ CreateFactory ({.EnabledLLVM = true });
16
+ }
15
17
18
+ NYql::NPureCalc::IProgramFactoryPtr GetFactory (const TSettings& settings) const override {
16
19
const auto it = ProgramFactories.find (settings);
17
- if (it != ProgramFactories.end ()) {
18
- return it->second ;
19
- }
20
+ Y_ENSURE (it != ProgramFactories.end ());
21
+ return it->second ;
22
+ }
20
23
21
- return ProgramFactories.insert ({settings, NYql::NPureCalc::MakeProgramFactory (
24
+ private:
25
+ void CreateFactory (const TSettings& settings) {
26
+ ProgramFactories.insert ({settings, NYql::NPureCalc::MakeProgramFactory (
22
27
NYql::NPureCalc::TProgramFactoryOptions ()
23
28
.SetLLVMSettings (settings.EnabledLLVM ? " ON" : " OFF" )
24
- )}). first -> second ;
29
+ )});
25
30
}
26
31
27
32
private:
28
- TMutex FactoriesMutex;
29
33
std::map<TSettings, NYql::NPureCalc::IProgramFactoryPtr> ProgramFactories;
30
34
};
31
35
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ class IPureCalcProgramFactory : public TThrRefBase {
17
17
};
18
18
19
19
public:
20
- virtual NYql::NPureCalc::IProgramFactoryPtr GetFactory (const TSettings& settings) = 0;
20
+ virtual NYql::NPureCalc::IProgramFactoryPtr GetFactory (const TSettings& settings) const = 0;
21
21
};
22
22
23
23
IPureCalcProgramFactory::TPtr CreatePureCalcProgramFactory ();
Original file line number Diff line number Diff line change @@ -209,7 +209,6 @@ class TPqDqIntegration: public TDqIntegrationBase {
209
209
srcDesc.SetClusterType (ToClusterType (clusterDesc->ClusterType ));
210
210
srcDesc.SetDatabaseId (clusterDesc->DatabaseId );
211
211
212
- srcDesc.SetEnabledLLVM (false );
213
212
if (const auto & types = State_->Types ) {
214
213
if (const auto & optLLVM = types->OptLLVM ) {
215
214
srcDesc.SetEnabledLLVM (!optLLVM->Empty () && *optLLVM != " OFF" );
You can’t perform that action at this time.
0 commit comments