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

Small refactoring changes #1257

Merged
merged 6 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/CompilationInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
#pragma once
#include <string_view>
namespace qlever::version {
// The git hash of the commit that was used to QLever.
extern const std::string_view GitHash;
// Short version of GitHash
// Short version of the hash of the commit that was used to QLever.
extern const std::string_view GitShortHash;
// The date and time at which QLever was compiled.
extern const std::string_view DatetimeOfCompilation;
Expand Down
7 changes: 3 additions & 4 deletions src/engine/Distinct.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
#include <utility>
#include <vector>

#include "../parser/ParsedQuery.h"
#include "./Operation.h"
#include "./QueryExecutionTree.h"
#include "engine/Operation.h"
#include "engine/QueryExecutionTree.h"
#include "parser/ParsedQuery.h"

using std::pair;
using std::vector;

class Distinct : public Operation {
Expand Down
4 changes: 2 additions & 2 deletions src/engine/OptionalJoin.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
// Florian Kramer ([email protected])
#pragma once

#include "./Operation.h"
#include "./QueryExecutionTree.h"
#include "engine/Operation.h"
#include "engine/QueryExecutionTree.h"

class OptionalJoin : public Operation {
private:
Expand Down
2 changes: 2 additions & 0 deletions src/global/Constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -269,5 +269,7 @@ using parallel_tag = int;
} // namespace ad_utility
#endif
constexpr size_t NUM_SORT_THREADS = 4;
/// ANSI escape sequence for bold text in the console
constexpr std::string_view EMPH_ON = "\033[1m";
RobinTF marked this conversation as resolved.
Show resolved Hide resolved
/// ANSI escape sequence to print "normal" text again in the console.
constexpr std::string_view EMPH_OFF = "\033[22m";
5 changes: 2 additions & 3 deletions src/index/IndexImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ void IndexImpl::setPrefixCompression(bool compressed) {
void IndexImpl::writeConfiguration() const {
// Copy the configuration and add the current commit hash.
auto configuration = configurationJson_;
configuration["git-hash"] = qlever::version::GitHash;
configuration["git-hash"] = qlever::version::GitShortHash;
configuration["index-format-version"] = qlever::indexFormatVersion;
auto f = ad_utility::makeOfstream(onDiskBase_ + CONFIGURATION_FILE);
f << configuration;
Expand All @@ -896,8 +896,7 @@ void IndexImpl::readConfiguration() {
f >> configurationJson_;
if (configurationJson_.find("git-hash") != configurationJson_.end()) {
LOG(INFO) << "The git hash used to build this index was "
<< configurationJson_["git-hash"].get<std::string_view>().substr(
0, 6)
<< configurationJson_["git-hash"].get<std::string_view>()
joka921 marked this conversation as resolved.
Show resolved Hide resolved
<< std::endl;
} else {
LOG(INFO) << "The index was built before git commit hashes were stored in "
Expand Down
Loading