-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1971 from kuzudb/order-by-compilation
Refactor order by compilation
- Loading branch information
Showing
12 changed files
with
222 additions
and
253 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
src/include/processor/operator/order_by/order_by_data_info.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#pragma once | ||
|
||
#include "common/types/types_include.h" | ||
#include "processor/data_pos.h" | ||
#include "processor/result/factorized_table.h" | ||
|
||
namespace kuzu { | ||
namespace processor { | ||
|
||
struct OrderByDataInfo { | ||
std::vector<DataPos> keysPos; | ||
std::vector<DataPos> payloadsPos; | ||
std::vector<std::unique_ptr<common::LogicalType>> keyTypes; | ||
std::vector<std::unique_ptr<common::LogicalType>> payloadTypes; | ||
std::vector<bool> isAscOrder; | ||
std::unique_ptr<FactorizedTableSchema> payloadTableSchema; | ||
std::vector<uint32_t> keyInPayloadPos; | ||
|
||
OrderByDataInfo(std::vector<DataPos> keysPos, std::vector<DataPos> payloadsPos, | ||
std::vector<std::unique_ptr<common::LogicalType>> keyTypes, | ||
std::vector<std::unique_ptr<common::LogicalType>> payloadTypes, | ||
std::vector<bool> isAscOrder, std::unique_ptr<FactorizedTableSchema> payloadTableSchema, | ||
std::vector<uint32_t> keyInPayloadPos) | ||
: keysPos{std::move(keysPos)}, payloadsPos{std::move(payloadsPos)}, keyTypes{std::move( | ||
keyTypes)}, | ||
payloadTypes{std::move(payloadTypes)}, isAscOrder{std::move(isAscOrder)}, | ||
payloadTableSchema{std::move(payloadTableSchema)}, keyInPayloadPos{ | ||
std::move(keyInPayloadPos)} {} | ||
OrderByDataInfo(const OrderByDataInfo& other) | ||
: keysPos{other.keysPos}, | ||
payloadsPos{other.payloadsPos}, keyTypes{common::LogicalType::copy(other.keyTypes)}, | ||
payloadTypes{common::LogicalType::copy(other.payloadTypes)}, isAscOrder{other.isAscOrder}, | ||
payloadTableSchema{other.payloadTableSchema->copy()}, keyInPayloadPos{ | ||
other.keyInPayloadPos} {} | ||
|
||
std::unique_ptr<OrderByDataInfo> copy() const { | ||
return std::make_unique<OrderByDataInfo>(*this); | ||
} | ||
}; | ||
|
||
} // namespace processor | ||
} // namespace kuzu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.