-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1a4ae3d
commit dc751d4
Showing
12 changed files
with
175 additions
and
101 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
14 changes: 14 additions & 0 deletions
14
src/include/planner/logical_plan/logical_operator/side_way_info_passing.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,14 @@ | ||
#pragma once | ||
|
||
#include <cstddef> | ||
|
||
namespace kuzu { | ||
namespace planner { | ||
|
||
enum class SidewaysInfoPassing : uint8_t { | ||
NONE = 0, | ||
LEFT_TO_RIGHT = 1, | ||
}; | ||
|
||
} // 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
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,44 @@ | ||
#include "planner/logical_plan/logical_operator/logical_semi_masker.h" | ||
#include "processor/mapper/plan_mapper.h" | ||
#include "processor/operator/scan_node_id.h" | ||
#include "processor/operator/semi_masker.h" | ||
#include "processor/operator/table_scan/factorized_table_scan.h" | ||
|
||
using namespace kuzu::planner; | ||
|
||
namespace kuzu { | ||
namespace processor { | ||
|
||
static FactorizedTableScan* getTableScanForAccHashJoin(PhysicalOperator* probe) { | ||
auto op = probe->getChild(0); | ||
while (op->getOperatorType() == PhysicalOperatorType::FLATTEN) { | ||
op = op->getChild(0); | ||
} | ||
assert(op->getOperatorType() == PhysicalOperatorType::FACTORIZED_TABLE_SCAN); | ||
return (FactorizedTableScan*)op; | ||
} | ||
|
||
void PlanMapper::mapASP(kuzu::processor::PhysicalOperator* probe) { | ||
auto tableScan = getTableScanForAccHashJoin(probe); | ||
auto resultCollector = tableScan->moveUnaryChild(); | ||
probe->addChild(std::move(resultCollector)); | ||
} | ||
|
||
std::unique_ptr<PhysicalOperator> PlanMapper::mapLogicalSemiMaskerToPhysical( | ||
LogicalOperator* logicalOperator) { | ||
auto logicalSemiMasker = (LogicalSemiMasker*)logicalOperator; | ||
auto inSchema = logicalSemiMasker->getChild(0)->getSchema(); | ||
auto prevOperator = mapLogicalOperatorToPhysical(logicalOperator->getChild(0)); | ||
auto logicalScanNode = logicalSemiMasker->getScanNode(); | ||
auto physicalScanNode = (ScanNodeID*)logicalOpToPhysicalOpMap.at(logicalScanNode); | ||
auto keyDataPos = | ||
DataPos(inSchema->getExpressionPos(*logicalScanNode->getNode()->getInternalIDProperty())); | ||
auto semiMasker = make_unique<SemiMasker>(keyDataPos, std::move(prevOperator), getOperatorID(), | ||
logicalSemiMasker->getExpressionsForPrinting()); | ||
assert(physicalScanNode->getSharedState()->getNumTableStates() == 1); | ||
semiMasker->setSharedState(physicalScanNode->getSharedState()->getTableState(0)); | ||
return semiMasker; | ||
} | ||
|
||
} // namespace processor | ||
} // namespace kuzu |
Oops, something went wrong.