Skip to content

Commit 04543d6

Browse files
committed
Fixed issues
1 parent cf2b376 commit 04543d6

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

ydb/core/fq/libs/row_dispatcher/common.cpp

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,26 @@ namespace {
1010

1111
class TPureCalcProgramFactory : public IPureCalcProgramFactory {
1212
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+
}
1517

18+
NYql::NPureCalc::IProgramFactoryPtr GetFactory(const TSettings& settings) const override {
1619
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+
}
2023

21-
return ProgramFactories.insert({settings, NYql::NPureCalc::MakeProgramFactory(
24+
private:
25+
void CreateFactory(const TSettings& settings) {
26+
ProgramFactories.insert({settings, NYql::NPureCalc::MakeProgramFactory(
2227
NYql::NPureCalc::TProgramFactoryOptions()
2328
.SetLLVMSettings(settings.EnabledLLVM ? "ON" : "OFF")
24-
)}).first->second;
29+
)});
2530
}
2631

2732
private:
28-
TMutex FactoriesMutex;
2933
std::map<TSettings, NYql::NPureCalc::IProgramFactoryPtr> ProgramFactories;
3034
};
3135

ydb/core/fq/libs/row_dispatcher/common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class IPureCalcProgramFactory : public TThrRefBase {
1717
};
1818

1919
public:
20-
virtual NYql::NPureCalc::IProgramFactoryPtr GetFactory(const TSettings& settings) = 0;
20+
virtual NYql::NPureCalc::IProgramFactoryPtr GetFactory(const TSettings& settings) const = 0;
2121
};
2222

2323
IPureCalcProgramFactory::TPtr CreatePureCalcProgramFactory();

ydb/library/yql/providers/pq/provider/yql_pq_dq_integration.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ class TPqDqIntegration: public TDqIntegrationBase {
209209
srcDesc.SetClusterType(ToClusterType(clusterDesc->ClusterType));
210210
srcDesc.SetDatabaseId(clusterDesc->DatabaseId);
211211

212-
srcDesc.SetEnabledLLVM(false);
213212
if (const auto& types = State_->Types) {
214213
if (const auto& optLLVM = types->OptLLVM) {
215214
srcDesc.SetEnabledLLVM(!optLLVM->Empty() && *optLLVM != "OFF");

0 commit comments

Comments
 (0)