Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up some header includes to slightly improve the build time #1319

Merged
merged 11 commits into from
Apr 12, 2024
1 change: 1 addition & 0 deletions benchmark/GroupByHashMapBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "engine/sparqlExpressions/AggregateExpression.h"
#include "engine/sparqlExpressions/GroupConcatExpression.h"
#include "engine/sparqlExpressions/LiteralExpression.h"
#include "global/RuntimeParameters.h"
#include "util/Log.h"
#include "util/Random.h"
#include "util/TypeIdentity.h"
Expand Down
1 change: 1 addition & 0 deletions src/ServerMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "CompilationInfo.h"
#include "engine/Server.h"
#include "global/Constants.h"
#include "global/RuntimeParameters.h"
#include "util/MemorySize/MemorySize.h"
#include "util/ParseableDuration.h"
#include "util/ProgramOptionsHelpers.h"
Expand Down
1 change: 1 addition & 0 deletions src/engine/GroupBy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "engine/sparqlExpressions/LiteralExpression.h"
#include "engine/sparqlExpressions/SparqlExpression.h"
#include "engine/sparqlExpressions/SparqlExpressionGenerators.h"
#include "global/RuntimeParameters.h"
#include "index/Index.h"
#include "index/IndexImpl.h"
#include "parser/Alias.h"
Expand Down
3 changes: 2 additions & 1 deletion src/engine/GroupBy.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

#pragma once

#include <gtest/gtest_prod.h>

#include <memory>
#include <string>
#include <utility>
Expand All @@ -17,7 +19,6 @@
#include "engine/sparqlExpressions/RelationalExpressionHelpers.h"
#include "engine/sparqlExpressions/SparqlExpressionPimpl.h"
#include "engine/sparqlExpressions/SparqlExpressionValueGetters.h"
#include "gtest/gtest.h"
#include "parser/Alias.h"
#include "parser/ParsedQuery.h"
#include "util/TypeIdentity.h"
Expand Down
18 changes: 10 additions & 8 deletions src/engine/Join.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,22 @@
// 2015-2017 Björn Buchhold ([email protected])
// 2018- Johannes Kalmbach ([email protected])

#include <engine/AddCombinedRowToTable.h>
#include <engine/CallFixedSize.h>
#include <engine/IndexScan.h>
#include <engine/Join.h>
#include <global/Constants.h>
#include <global/Id.h>
#include <util/Exception.h>
#include <util/HashMap.h>
#include "engine/Join.h"

#include <functional>
#include <sstream>
#include <type_traits>
#include <vector>

#include "engine/AddCombinedRowToTable.h"
#include "engine/CallFixedSize.h"
#include "engine/IndexScan.h"
#include "global/Constants.h"
#include "global/Id.h"
#include "global/RuntimeParameters.h"
#include "util/Exception.h"
#include "util/HashMap.h"

using std::endl;
using std::string;

Expand Down
10 changes: 5 additions & 5 deletions src/engine/OrderBy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@

#include "engine/CallFixedSize.h"
#include "engine/QueryExecutionTree.h"
#include "global/RuntimeParameters.h"
#include "global/ValueIdComparators.h"

using std::endl;
using std::string;
#include "util/TransparentFunctors.h"

// _____________________________________________________________________________
size_t OrderBy::getResultWidth() const { return subtree_->getResultWidth(); }
Expand All @@ -32,7 +31,7 @@ OrderBy::OrderBy(QueryExecutionContext* qec,
}

// _____________________________________________________________________________
string OrderBy::getCacheKeyImpl() const {
std::string OrderBy::getCacheKeyImpl() const {
std::ostringstream os;
os << "ORDER BY on columns:";

Expand All @@ -47,7 +46,7 @@ string OrderBy::getCacheKeyImpl() const {
}

// _____________________________________________________________________________
string OrderBy::getDescriptor() const {
std::string OrderBy::getDescriptor() const {
std::string orderByVars;
const auto& varCols = subtree_->getVariableColumns();
for (auto [sortIndex, isDescending] : sortIndices_) {
Expand All @@ -64,6 +63,7 @@ string OrderBy::getDescriptor() const {

// _____________________________________________________________________________
ResultTable OrderBy::computeResult() {
using std::endl;
LOG(DEBUG) << "Getting sub-result for OrderBy result computation..." << endl;
shared_ptr<const ResultTable> subRes = subtree_->getResult();

Expand Down
1 change: 1 addition & 0 deletions src/engine/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include "engine/ExportQueryExecutionTrees.h"
#include "engine/QueryPlanner.h"
#include "global/RuntimeParameters.h"
#include "util/AsioHelpers.h"
#include "util/MemorySize/MemorySize.h"
#include "util/OnDestructionDontThrowDuringStackUnwinding.h"
Expand Down
13 changes: 6 additions & 7 deletions src/engine/Sort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@

#include <sstream>

#include "CallFixedSize.h"
#include "QueryExecutionTree.h"

using std::endl;
using std::string;
#include "engine/CallFixedSize.h"
#include "engine/QueryExecutionTree.h"
#include "global/RuntimeParameters.h"

// _____________________________________________________________________________
size_t Sort::getResultWidth() const { return subtree_->getResultWidth(); }
Expand All @@ -25,7 +23,7 @@ Sort::Sort(QueryExecutionContext* qec,
sortColumnIndices_{std::move(sortColumnIndices)} {}

// _____________________________________________________________________________
string Sort::getCacheKeyImpl() const {
std::string Sort::getCacheKeyImpl() const {
std::ostringstream os;
os << "SORT(internal) on columns:";

Expand All @@ -37,7 +35,7 @@ string Sort::getCacheKeyImpl() const {
}

// _____________________________________________________________________________
string Sort::getDescriptor() const {
std::string Sort::getDescriptor() const {
std::string orderByVars;
const auto& varCols = subtree_->getVariableColumns();
for (auto sortColumn : sortColumnIndices_) {
Expand All @@ -53,6 +51,7 @@ string Sort::getDescriptor() const {

// _____________________________________________________________________________
ResultTable Sort::computeResult() {
using std::endl;
LOG(DEBUG) << "Getting sub-result for Sort result computation..." << endl;
shared_ptr<const ResultTable> subRes = subtree_->getResult();

Expand Down
2 changes: 2 additions & 0 deletions src/engine/VariableToColumnMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include "engine/VariableToColumnMap.h"

#include "util/TransparentFunctors.h"

// _____________________________________________________________________________
std::vector<std::pair<Variable, ColumnIndexAndTypeInfo>>
copySortedByColumnIndex(VariableToColumnMap map) {
Expand Down
1 change: 0 additions & 1 deletion src/engine/VariableToColumnMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "global/Id.h"
#include "parser/data/Variable.h"
#include "util/HashMap.h"
#include "util/TransparentFunctors.h"

// Store an index of a column together with additional information about that
// column which can be inferred from the `QueryExecutionTree` without actually
Expand Down
5 changes: 2 additions & 3 deletions src/engine/idTable/CompressedExternalIdTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
#ifndef QLEVER_COMPRESSEDEXTERNALIDTABLE_H
#define QLEVER_COMPRESSEDEXTERNALIDTABLE_H

#include <absl/strings/str_cat.h>

#include <algorithm>
#include <future>
#include <queue>
#include <ranges>

#include "absl/strings/str_cat.h"
#include "engine/CallFixedSize.h"
#include "engine/idTable/IdTable.h"
#include "util/AsyncStream.h"
Expand All @@ -19,7 +19,6 @@
#include "util/MemorySize/MemorySize.h"
#include "util/TransparentFunctors.h"
#include "util/Views.h"
#include "util/http/beast.h"

namespace ad_utility {

Expand Down
1 change: 1 addition & 0 deletions src/engine/sparqlExpressions/AggregateExpression.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "engine/sparqlExpressions/RelationalExpressionHelpers.h"
#include "engine/sparqlExpressions/SparqlExpression.h"
#include "engine/sparqlExpressions/SparqlExpressionGenerators.h"
#include "engine/sparqlExpressions/SparqlExpressionValueGetters.h"
#include "global/ValueIdComparators.h"

namespace sparqlExpression {
Expand Down
4 changes: 3 additions & 1 deletion src/engine/sparqlExpressions/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ add_library(sparqlExpressions
DateExpressions.cpp
StringExpressions.cpp
IsSomethingExpressions.cpp
ConditionalExpressions.cpp)
ConditionalExpressions.cpp
SparqlExpressionTypes.cpp
SparqlExpression.cpp)

qlever_target_link_libraries(sparqlExpressions util index Boost::url)
1 change: 1 addition & 0 deletions src/engine/sparqlExpressions/NaryExpressionImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include "engine/sparqlExpressions/NaryExpression.h"
#include "engine/sparqlExpressions/SparqlExpressionGenerators.h"
#include "engine/sparqlExpressions/SparqlExpressionValueGetters.h"

namespace sparqlExpression::detail {
template <typename NaryOperation>
Expand Down
4 changes: 3 additions & 1 deletion src/engine/sparqlExpressions/RegexExpression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@

#include "./RegexExpression.h"

#include <re2/re2.h>

#include "engine/sparqlExpressions/LiteralExpression.h"
#include "engine/sparqlExpressions/NaryExpression.h"
#include "engine/sparqlExpressions/SparqlExpressionGenerators.h"
#include "engine/sparqlExpressions/SparqlExpressionValueGetters.h"
#include "global/ValueIdComparators.h"
#include "re2/re2.h"

using namespace std::literals;

Expand Down
3 changes: 1 addition & 2 deletions src/engine/sparqlExpressions/SetOfIntervals.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
#include <utility>
#include <vector>

#include "../../util/Exception.h"
#include "../../util/TypeTraits.h"
#include "util/Exception.h"

namespace ad_utility {

Expand Down
Loading
Loading