8000 Revert all non-critical changes in order to move them into another PR · arangodb/arangodb@f67e632 · GitHub
[go: up one dir, main page]

Skip to content

Commit f67e632

Browse files
committed
Revert all non-critical changes in order to move them into another PR
1 parent 60f3c0d commit f67e632

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+234
-124
lines changed

CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@ if (CMAKE_COMPILER_IS_GNUCC)
896896
message(STATUS "Compiler type GNU: ${CMAKE_CXX_COMPILER}")
897897
endif ()
898898

899-
set(BASE_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-deprecated-declarations ${BASE_FLAGS}")
899+
set(BASE_FLAGS "-Wall -Wextra -Wno-unused-parameter ${BASE_FLAGS}")
900900

901901
set(CMAKE_C_FLAGS "-g" CACHE INTERNAL "default C compiler flags")
902902
set(CMAKE_C_FLAGS_DEBUG "-O0 -g -D_DEBUG=1" CACHE INTERNAL "C debug flags")
@@ -915,7 +915,7 @@ elseif (CMAKE_COMPILER_IS_CLANG)
915915
message(STATUS "Compiler type CLANG: ${CMAKE_CXX_COMPILER}")
916916
endif ()
917917

918-
set(BASE_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-deprecated-declarations ${BASE_FLAGS}")
918+
set(BASE_FLAGS "-Wall -Wextra -Wno-unused-parameter ${BASE_FLAGS}")
919919

920920
set(CMAKE_C_FLAGS "-g" CACHE INTERNAL "default C compiler flags")
921921
set(CMAKE_C_FLAGS_DEBUG "-O0 -g -D_DEBUG=1" CACHE INTERNAL "C debug flags")
@@ -934,8 +934,6 @@ elseif (MSVC)
934934
message(STATUS "Compiler type MSVC: ${CMAKE_CXX_COMPILER}")
935935
endif ()
936936

937-
set(BASE_FLAGS "/wd4996 ${BASE_FLAGS}")
938-
939937
set(CMAKE_C_FLAGS "/MTd" CACHE INTERNAL "default C++ compiler flags")
940938
set(CMAKE_C_FLAGS_DEBUG "/D _DEBUG /MTd /Zi /Ob0 /Od /RTC1 /bigobj" CACHE INTERNAL "C++ debug flags")
941939
set(CMAKE_C_FLAGS_MINSIZEREL "/MT /O1 /Ob1" CACHE INTERNAL "C++ minimal size flags")

arangod/Aql/AllRowsFetcher.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ class ShadowAqlItemRow;
5757
* => If all rows have been Fetched, it will return DONE and an AqlItemMatrix, the Matrix will return results
5858
* => Any later call will return DONE and a nullptr. So make sure you keep the Matrix.
5959
* => This state can be left only if the shadowRow is fetched.
60+
* - fetchBlockForPassthrough()
61+
* => Cannot be used! Only required to make the code compile
6062
* - preFetchNumberOfRows()
6163
* => Will do the same as fetchAllRows, but NOT give out the data, it will only hold it internally.
6264
* => On response it will inform the caller on exactly how many Rows will be returned until the next ShadowRow appears.

arangod/Aql/AqlValue.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -331,13 +331,11 @@ struct AqlValue final {
331331

332332
/// @brief materializes a value into the builder
333333
void toVelocyPack(velocypack::Options const*, arangodb::velocypack::Builder&, bool resolveExternals) const;
334-
[[deprecated("Pass VPackOptions instead of the transaction")]]
335334
void toVelocyPack(transaction::Methods*, arangodb::velocypack::Builder&, bool resolveExternals) const;
336335

337336
/// @brief materialize a value into a new one. this expands docvecs and
338337
/// ranges
339338
AqlValue materialize(velocypack::Options const*, bool& hasCopied, bool resolveExternals) const;
340-
[[deprecated("Pass VPackOptions instead of the transaction")]]
341339
AqlValue materialize(transaction::Methods*, bool& hasCopied, bool resolveExternals) const;
342340

343341
/// @brief return the slice for the value
@@ -370,7 +368,6 @@ struct AqlValue final {
370368
/// @brief compare function for two values
371369
static int Compare(velocypack::Options const*, AqlValue const& left,
372370
AqlValue const& right, bool useUtf8);
373-
[[deprecated("Pass VPackOptions instead of the transaction")]]
374371
static int Compare(transaction::Methods*, AqlValue const& left,
375372
AqlValue const& right, bool useUtf8);
376373

arangod/Aql/AqlValueMaterializer.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ namespace aql {
4242

4343
struct AqlValueMaterializer {
4444
explicit AqlValueMaterializer(velocypack::Options const* options);
45-
[[deprecated("Pass VPackOptions instead of the transaction")]]
4645
explicit AqlValueMaterializer(arangodb::transaction::Methods* trx);
4746

4847
AqlValueMaterializer(AqlValueMaterializer const& other);

arangod/Aql/CalculationExecutor.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@
3636
using namespace arangodb;
3737
using namespace arangodb::aql;
3838

39+
template <CalculationType calculationType>
40+
constexpr bool CalculationExecutor<calculationType>::Properties::preservesOrder;
41+
template <CalculationType calculationType>
42+
constexpr BlockPassthrough CalculationExecutor<calculationType>::Properties::allowsBlockPassthrough;
43+
template <CalculationType calculationType>
44+
constexpr bool CalculationExecutor<calculationType>::Properties::inputSizeRestrictsOutputSize;
45+
3946
CalculationExecutorInfos::CalculationExecutorInfos(
4047
RegisterId outputRegister, RegisterId nrInputRegisters,
4148
RegisterId nrOutputRegisters, std::unordered_set<RegisterId> registersToClear,

arangod/Aql/ConstrainedSortExecutor.cpp

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@
3636
using namespace arangodb;
3737
using namespace arangodb::aql;
3838

39+
constexpr bool ConstrainedSortExecutor::Properties::preservesOrder;
40+
constexpr BlockPassthrough ConstrainedSortExecutor::Properties::allowsBlockPassthrough;
41+
constexpr bool ConstrainedSortExecutor::Properties::inputSizeRestrictsOutputSize;
42+
3943
namespace {
4044

4145
void eraseRow(SharedAqlItemBlockPtr& block, size_t row) {
@@ -51,7 +55,7 @@ void eraseRow(SharedAqlItemBlockPtr& block, size_t row) {
5155
class arangodb::aql::ConstrainedLessThan {
5256
public:
5357
ConstrainedLessThan(velocypack::Options const* options,
54-
std::vector<arangodb::aql::SortRegister> const& sortRegisters) noexcept
58+
std::vector<arangodb::aql::SortRegister>& sortRegisters) noexcept
5559
: _vpackOptions(options), _heapBuffer(nullptr), _sortRegisters(sortRegisters) {}
5660

5761
void setBuffer(arangodb::aql::AqlItemBlock* heap) { _heapBuffer = heap; }
@@ -78,7 +82,7 @@ class arangodb::aql::ConstrainedLessThan {
7882
private:
7983
velocypack::Options const* const _vpackOptions;
8084
arangodb::aql::AqlItemBlock* _heapBuffer;
81-
std::vector<arangodb::aql::SortRegister> const& _sortRegisters;
85+
std::vector<arangodb::aql::SortRegister>& _sortRegisters;
8286
}; // ConstrainedLessThan
8387

8488
arangodb::Result ConstrainedSortExecutor::pushRow(InputAqlItemRow& input) {
@@ -88,16 +92,16 @@ arangodb::Result ConstrainedSortExecutor::pushRow(InputAqlItemRow& input) {
8892

8993
size_t dRow = _rowsPushed;
9094

91-
if (dRow >= _infos.limit()) {
95+
if (dRow >= _infos._limit) {
9296
// pop an entry first
93-
std::pop_heap(_rows.begin(), _rows.end(), *_cmpHeap);
97+
std::pop_heap(_rows.begin(), _rows.end(), *_cmpHeap.get());
9498
dRow = _rows.back();
9599
eraseRow(_heapBuffer, dRow);
96100
} else {
97101
_rows.emplace_back(dRow F438 ); // add to heap vector
98102
}
99103

100-
TRI_ASSERT(dRow < _infos.limit());
104+
TRI_ASSERT(dRow < _infos._limit);
101105
TRI_IF_FAILURE("SortBlock::doSortingInner") {
102106
THROW_ARANGO_EXCEPTION(TRI_ERROR_DEBUG);
103107
}
@@ -109,7 +113,7 @@ arangodb::Result ConstrainedSortExecutor::pushRow(InputAqlItemRow& input) {
109113
++_rowsPushed;
110114

111115
// now restore heap condition
112-
std::push_heap(_rows.begin(), _rows.end(), *_cmpHeap);
116+
std::push_heap(_rows.begin(), _rows.end(), *_cmpHeap.get());
113117

114118
return TRI_ERROR_NO_ERROR;
115119
}
@@ -138,15 +142,15 @@ ConstrainedSortExecutor::ConstrainedSortExecutor(Fetcher& fetcher, SortExecutorI
138142
_rowsPushed(0),
139143
_rowsRead(0),
140144
_skippedAfter(0),
141-
_heapBuffer(_infos.itemBlockManager().requestBlock(_infos.limit(),
142-
_infos.numberOfOutputRegisters())),
145+
_heapBuffer(_infos._manager.requestBlock(_infos._limit,
146+
_infos.numberOfOutputRegisters())),
143147
_cmpHeap(std::make_unique<ConstrainedLessThan>(_infos.vpackOptions(),
144148
_infos.sortRegisters())),
145149
_heapOutputRow{_heapBuffer, make_shared_unordered_set(),
146150
make_shared_unordered_set(_infos.numberOfOutputRegisters()),
147151
_infos.registersToClear()} {
148-
TRI_ASSERT(_infos.limit() > 0);
149-
_rows.reserve(infos.limit());
152+
TRI_ASSERT(_infos._limit > 0);
153+
_rows.reserve(infos._limit);
150154
_cmpHeap->setBuffer(_heapBuffer.get());
151155
}
152156

@@ -180,7 +184,7 @@ ExecutionState ConstrainedSortExecutor::consumeInput() {
180184
TRI_ASSERT(_state == ExecutionState::DONE);
181185
} else {
182186
++_rowsRead;
183-
if (_rowsPushed < _infos.limit() || !compareInput(_rows.front(), input)) {
187+
if (_rowsPushed < _infos._limit || !compareInput(_rows.front(), input)) {
184188
// Push this row into the heap
185189
pushRow(input);
186190
}
@@ -251,7 +255,7 @@ std::pair<ExecutionState, size_t> ConstrainedSortExecutor::expectedNumberOfRows(
251255
return {state, 0};
252256
}
253257
// Return the minimum of upstream + limit
254-
rowsLeft = (std::min)(expectedRows, _infos.limit());
258+
rowsLeft = (std::min)(expectedRows, _infos._limit);
255259
} else {
256260
// We have exactly the following rows available:
257261
rowsLeft = _rows.size() - _returnNext;

arangod/Aql/CountCollectExecutor.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@
3737
using namespace arangodb;
3838
using namespace arangodb::aql;
3939

40+
constexpr bool CountCollectExecutor::Properties::preservesOrder;
41+
constexpr BlockPassthrough CountCollectExecutor::Properties::allowsBlockPassthrough;
42+
constexpr bool CountCollectExecutor::Properties::inputSizeRestrictsOutputSize;
43+
4044
CountCollectExecutorInfos::CountCollectExecutorInfos(
4145
RegisterId collectRegister, RegisterId nrInputRegisters, RegisterId nrOutputRegisters,
4246
// cppcheck-suppress passedByValue

arangod/Aql/DistinctCollectExecutor.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@
3838
using namespace arangodb;
3939
using namespace arangodb::aql;
4040

41+
constexpr bool DistinctCollectExecutor::Properties::preservesOrder;
42+
constexpr BlockPassthrough DistinctCollectExecutor::Properties::allowsBlockPassthrough;
43+
constexpr bool DistinctCollectExecutor::Properties::inputSizeRestrictsOutputSize;
44+
4145
DistinctCollectExecutorInfos::DistinctCollectExecutorInfos(
4246
RegisterId nrInputRegisters, RegisterId nrOutputRegisters,
4347
std::unordered_set<RegisterId> registersToClear,

arangod/Aql/DistributeConsumerNode.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,11 @@ void DistributeConsumerNode::cloneRegisterPlan(ScatterNode* dependency) {
7575
_registerPlan = dependency->getRegisterPlan();
7676
_depth = dependency->getDepth();
7777
{
78-
auto const& later = dependency->getVarsUsedLater();
78+
auto later = dependency->getVarsUsedLater();
7979
setVarsUsedLater(later);
8080
}
8181
{
82-
auto const& valid = dependency->getVarsValid();
82+
auto valid = dependency->getVarsValid();
8383
setVarsValid(valid);
8484
}
8585
setVarUsageValid();

arangod/Aql/DistributeConsumerNode.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,17 @@
2727
#include "Basics/Exceptions.h"
2828
#include "Basics/voc-errors.h"
2929

30-
#include <utility>
31-
32-
namespace arangodb::aql {
33-
30+
namespace arangodb {
31+
namespace aql {
3432
class ExecutionBlock;
3533
class ExecutionPlan;
3634
class ScatterNode;
3735

3836
class DistributeConsumerNode : public ExecutionNode {
3937
public:
40-
DistributeConsumerNode(ExecutionPlan* plan, size_t id, std::string distributeId)
38+
DistributeConsumerNode(ExecutionPlan* plan, size_t id, std::string const& distributeId)
4139
: ExecutionNode(plan, id),
42-
_distributeId(std::move(distributeId)),
40+
_distributeId(distributeId),
4341
_isResponsibleForInitializeCursor(true) {}
4442

4543
DistributeConsumerNode(ExecutionPlan* plan, arangodb::velocypack::Slice const& base);
@@ -108,6 +106,7 @@ class DistributeConsumerNode : public ExecutionNode {
108106
bool _isResponsibleForInitializeCursor;
109107
};
110108

111-
} // namespace arangodb::aql
109+
} // namespace aql
110+
} // namespace arangodb
112111

113112
#endif

arangod/Aql/EnumerateCollectionExecutor.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343
using namespace arangodb;
4444
using namespace arangodb::aql;
4545

46+
constexpr bool EnumerateCollectionExecutor::Properties::preservesOrder;
47+
constexpr BlockPassthrough EnumerateCollectionExecutor::Properties::allowsBlockPassthrough;
48+
constexpr bool EnumerateCollectionExecutor::Properties::inputSizeRestrictsOutputSize;
49+
4650
EnumerateCollectionExecutorInfos::EnumerateCollectionExecutorInfos(
4751
RegisterId outputRegister, RegisterId nrInputRegisters, RegisterId nrOutputRegisters,
4852
// cppcheck-suppress passedByValue

arangod/Aql/EnumerateListExecutor.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ void throwArrayExpectedException(AqlValue const& value) {
4747
}
4848
} // namespace
4949

50+
constexpr bool EnumerateListExecutor::Properties::preservesOrder;
51+
constexpr BlockPassthrough EnumerateListExecutor::Properties::allowsBlockPassthrough;
52+
constexpr bool EnumerateListExecutor::Properties::inputSizeRestrictsOutputSize;
53+
5054
EnumerateListExecutorInfos::EnumerateListExecutorInfos(
5155
RegisterId inputRegister, RegisterId outputRegister,
5256
RegisterId nrInputRegisters, RegisterId nrOutputRegisters,

arangod/Aql/ExecutionBlock.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ class ExecutionBlock {
5555

5656
public:
5757
/// @brief batch size value
58-
[[nodiscard]] static constexpr inline size_t DefaultBatchSize() { return 1000; }
58+
static constexpr inline size_t DefaultBatchSize() { return 1000; }
5959

6060
/// @brief Number to use when we skip all. Should really be inf, but don't
6161
/// use something near std::numeric_limits<size_t>::max() to avoid overflows
6262
/// in calculations.
6363
/// This is used as an argument for skipSome(), e.g. when counting everything.
6464
/// Setting this to any other value >0 does not (and must not) affect the
6565
/// results. It's only to reduce the number of necessary skipSome calls.
66-
[[nodiscard]] static constexpr inline size_t SkipAllSize() { return 1000000000; }
66+
static constexpr inline size_t SkipAllSize() { return 1000000000; }
6767

6868
/// @brief Methods for execution
6969
/// Lifecycle is:
@@ -78,10 +78,10 @@ class ExecutionBlock {
7878
/// DESTRUCTOR
7979

8080
/// @brief initializeCursor, could be called multiple times
81-
[[nodiscard]] virtual std::pair<ExecutionState, Result> initializeCursor(InputAqlItemRow const& input);
81+
virtual std::pair<ExecutionState, Result> initializeCursor(InputAqlItemRow const& input);
8282

8383
/// @brief shutdown, will be called exactly once for the whole query
84-
[[nodiscard]] virtual std::pair<ExecutionState, Result> shutdown(int errorCode);
84+
virtual std::pair<ExecutionState, Result> shutdown(int errorCode);
8585

8686
/// @brief getSome, gets some more items, semantic is as follows: not
8787
/// more than atMost items may be delivered. The method tries to
@@ -90,39 +90,39 @@ class ExecutionBlock {
9090
/// if it returns an actual block, it must contain at least one item.
9191
/// getSome() also takes care of tracing and clearing registers; don't do it
9292
/// in getOrSkipSome() implementations.
93-
[[nodiscard]] virtual std::pair<ExecutionState, SharedAqlItemBlockPtr> getSome(size_t atMost) = 0;
93+
virtual std::pair<ExecutionState, SharedAqlItemBlockPtr> getSome(size_t atMost) = 0;
9494

9595
// Trace the start of a getSome call
9696
void traceGetSomeBegin(size_t atMost);
9797

9898
// Trace the end of a getSome call, potentially with result
99-
[[nodiscard]] std::pair<ExecutionState, SharedAqlItemBlockPtr> traceGetSomeEnd(
99+
std::pair<ExecutionState, SharedAqlItemBlockPtr> traceGetSomeEnd(
100100
ExecutionState state, SharedAqlItemBlockPtr result);
101101

102102
void traceSkipSomeBegin(size_t atMost);
103103

104-
[[nodiscard]] std::pair<ExecutionState, size_t> traceSkipSomeEnd(std::pair<ExecutionState, size_t> res);
97AE 104+
std::pair<ExecutionState, size_t> traceSkipSomeEnd(std::pair<ExecutionState, size_t> res);
105105

106-
[[nodiscard]] std::pair<ExecutionState, size_t> traceSkipSomeEnd(ExecutionState state, size_t skipped);
106+
std::pair<ExecutionState, size_t> traceSkipSomeEnd(ExecutionState state, size_t skipped);
107107

108108
/// @brief skipSome, skips some more items, semantic is as follows: not
109109
/// more than atMost items may be skipped. The method tries to
110110
/// skip a block of at most atMost items, however, it may skip
111111
/// less (for example if there are not enough items to come). The number of
112112
/// elements skipped is returned.
113-
[[nodiscard]] virtual std::pair<ExecutionState, size_t> skipSome(size_t atMost) = 0;
113+
virtual std::pair<ExecutionState, size_t> skipSome(size_t atMost) = 0;
114114

115-
[[nodiscard]] ExecutionState getHasMoreState();
115+
ExecutionState getHasMoreState();
116116

117117
// TODO: Can we get rid of this? Problem: Subquery Executor is using it.
118-
[[nodiscard]] ExecutionNode const* getPlanNode() const;
118+
ExecutionNode const* getPlanNode() const;
119119

120120
[[nodiscard]] velocypack::Options const* trxVpackOptions() const noexcept;
121121

122122
/// @brief add a dependency
123123
void addDependency(ExecutionBlock* ep);
124124

125-
[[nodiscard]] bool isInSplicedSubquery() const noexcept;
125+
bool isInSplicedSubquery() const noexcept;
126126

127127
protected:
128128
/// @brief the execution engine

arangod/Aql/ExecutionBlockImpl.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,6 @@ std::pair<ExecutionState, Result> ExecutionBlockImpl<
640640
}
641641
return {ExecutionState::DONE, {errorCode}};
642642
}
643-
644643
} // namespace arangodb::aql
645644

646645
namespace arangodb::aql {

arangod/Aql/ExecutionBlockImpl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ class ExecutionBlockImpl final : public ExecutionBlock {
170170

171171
[[nodiscard]] std::pair<ExecutionState, Result> initializeCursor(InputAqlItemRow const& input) override;
172172

173-
[[nodiscard]] Infos const& infos() const;
173+
Infos const& infos() const;
174174

175175
/// @brief shutdown, will be called exactly once for the whole query
176176
/// Special implementation for all Executors that need to implement Shutdown

arangod/Aql/ExecutionNode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,7 @@ const ::arangodb::containers::HashSet<const Variable*>& ExecutionNode::getVarsUs
12041204
return _varsUsedLater;
12051205
}
12061206

1207-
void ExecutionNode::setVarsValid(::arangodb::containers::HashSet<const Variable*> const& v) {
1207+
void ExecutionNode::setVarsValid(::arangodb::containers::HashSet<const Variable*>& v) {
12081208
_varsValid = v;
12091209
}
12101210

arangod/Aql/ExecutionNode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ class ExecutionNode {
363363
::arangodb::containers::HashSet<Variable const*> const& getVarsUsedLater() const;
364364

365365
/// @brief setVarsValid
366-
void setVarsValid(::arangodb::containers::HashSet<Variable const*> const& v);
366+
void setVarsValid(::arangodb::containers::HashSet<Variable const*>& v);
367367

368368
/// @brief getVarsValid, this returns the set of variables that is valid
369369
/// for items leaving this node, this includes those that will be set here

arangod/Aql/FilterExecutor.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@
3737
using namespace arangodb;
3838
using namespace arangodb::aql;
3939

40+
constexpr bool FilterExecutor::Properties::preservesOrder;
41+
constexpr BlockPassthrough FilterExecutor::Properties::allowsBlockPassthrough;
42+
constexpr bool FilterExecutor::Properties::inputSizeRestrictsOutputSize;
43+
4044
FilterExecutorInfos::FilterExecutorInfos(RegisterId inputRegister, RegisterId nrInputRegisters,
4145
RegisterId nrOutputRegisters,
4246
// cppcheck-suppress passedByValue

0 commit comments

Comments
 (0)
0