-
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.
- Loading branch information
1 parent
657a830
commit 27a6129
Showing
9 changed files
with
66 additions
and
39 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
18 changes: 12 additions & 6 deletions
18
src/include/planner/logical_plan/logical_operator/logical_cross_product.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
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,22 @@ | ||
#include "planner/join_order_enumerator.h" | ||
#include "planner/logical_plan/logical_operator/logical_cross_product.h" | ||
#include "planner/query_planner.h" | ||
|
||
namespace kuzu { | ||
namespace planner { | ||
|
||
void JoinOrderEnumerator::appendCrossProduct( | ||
common::AccumulateType accumulateType, LogicalPlan& probePlan, LogicalPlan& buildPlan) { | ||
auto crossProduct = make_shared<LogicalCrossProduct>( | ||
accumulateType, probePlan.getLastOperator(), buildPlan.getLastOperator()); | ||
crossProduct->computeFactorizedSchema(); | ||
// update cost | ||
probePlan.setCost(probePlan.getCardinality() + buildPlan.getCardinality()); | ||
// update cardinality | ||
probePlan.setCardinality( | ||
queryPlanner->cardinalityEstimator->estimateCrossProduct(probePlan, buildPlan)); | ||
probePlan.setLastOperator(std::move(crossProduct)); | ||
} | ||
|
||
} // 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