-
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 #1108 from kuzudb/extend-property-reading
Extend property reading
- Loading branch information
Showing
35 changed files
with
420 additions
and
616 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
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
49 changes: 0 additions & 49 deletions
49
src/include/planner/logical_plan/logical_operator/logical_scan_rel_property.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 |
---|---|---|
@@ -1,49 +0,0 @@ | ||
#pragma once | ||
|
||
#include "base_logical_operator.h" | ||
#include "binder/expression/rel_expression.h" | ||
|
||
namespace kuzu { | ||
namespace planner { | ||
|
||
class LogicalScanRelProperty : public LogicalOperator { | ||
public: | ||
LogicalScanRelProperty(shared_ptr<NodeExpression> boundNode, shared_ptr<NodeExpression> nbrNode, | ||
shared_ptr<RelExpression> rel, RelDirection direction, shared_ptr<Expression> property, | ||
shared_ptr<LogicalOperator> child) | ||
: LogicalOperator{std::move(child)}, boundNode{std::move(boundNode)}, nbrNode{std::move( | ||
nbrNode)}, | ||
rel{std::move(rel)}, direction{direction}, property{std::move(property)} {} | ||
|
||
inline LogicalOperatorType getLogicalOperatorType() const override { | ||
return LogicalOperatorType::LOGICAL_SCAN_REL_PROPERTY; | ||
} | ||
|
||
inline string getExpressionsForPrinting() const override { return property->getRawName(); } | ||
|
||
inline void computeSchema(Schema& schema) { | ||
auto nbrGroupPos = schema.getGroupPos(nbrNode->getInternalIDPropertyName()); | ||
schema.insertToGroupAndScope(property, nbrGroupPos); | ||
} | ||
|
||
inline shared_ptr<NodeExpression> getBoundNode() const { return boundNode; } | ||
inline shared_ptr<NodeExpression> getNbrNode() const { return nbrNode; } | ||
inline shared_ptr<RelExpression> getRel() const { return rel; } | ||
inline RelDirection getDirection() const { return direction; } | ||
inline shared_ptr<Expression> getProperty() const { return property; } | ||
|
||
unique_ptr<LogicalOperator> copy() override { | ||
return make_unique<LogicalScanRelProperty>( | ||
boundNode, nbrNode, rel, direction, property, children[0]->copy()); | ||
} | ||
|
||
private: | ||
shared_ptr<NodeExpression> boundNode; | ||
shared_ptr<NodeExpression> nbrNode; | ||
shared_ptr<RelExpression> rel; | ||
RelDirection direction; | ||
shared_ptr<Expression> property; | ||
}; | ||
|
||
} // namespace planner | ||
} // 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
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,32 @@ | ||
#pragma once | ||
|
||
#include "processor/operator/physical_operator.h" | ||
|
||
namespace kuzu { | ||
namespace processor { | ||
|
||
class BaseExtendAndScanRelProperties : public PhysicalOperator { | ||
protected: | ||
BaseExtendAndScanRelProperties(const DataPos& inNodeIDVectorPos, | ||
const DataPos& outNodeIDVectorPos, vector<DataPos> outPropertyVectorsPos, | ||
unique_ptr<PhysicalOperator> child, uint32_t id, const string& paramsString) | ||
: PhysicalOperator{std::move(child), id, paramsString}, | ||
inNodeIDVectorPos{inNodeIDVectorPos}, outNodeIDVectorPos{outNodeIDVectorPos}, | ||
outPropertyVectorsPos{std::move(outPropertyVectorsPos)} {} | ||
virtual ~BaseExtendAndScanRelProperties() override = default; | ||
|
||
void initLocalStateInternal(ResultSet* resultSet, ExecutionContext* context) override; | ||
|
||
protected: | ||
// vector positions | ||
DataPos inNodeIDVectorPos; | ||
DataPos outNodeIDVectorPos; | ||
vector<DataPos> outPropertyVectorsPos; | ||
// vectors | ||
shared_ptr<ValueVector> inNodeIDVector; | ||
shared_ptr<ValueVector> outNodeIDVector; | ||
vector<shared_ptr<ValueVector>> outPropertyVectors; | ||
}; | ||
|
||
} // 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
31 changes: 18 additions & 13 deletions
31
src/include/processor/operator/scan_column/adj_column_extend.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
Oops, something went wrong.