apache / apache/beam

Plugging BeamCostModel and Metadata Handlers in JDBC Path

Open
#19,629 0 comments 0 reactions 0 assignees View on GitHub
dsl new feature P3 sql
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
1d 20h
Merged PRs (30d)
196

Description

Currently the SQL Transform Path uses BeamCostModel and custom MetadataHandler for NonCumulativeCost.

Similar to what we have done in CalciteQueryPlanner, we need to plug the followings in the JDBC Path:

1- Plug BeamCostModel.FACTORY as the CostFactory for the planner.

2- Plug NonCumulativeCostImpl.SOURCE for estimating nonCumulativeCost of the nodes.

3- Plug RelMdNodeStats.SOURCE as a handler to estimate NodeStatsSource.

 

Alternatively, if we plug our cost model in JDBC path, since both paths are using the same cost model, we can remove NonCumulativeCostImpl.SOURCE as handler from both of them and instead of using beamComputeSelfCost(), we can override computeSelfCost for all the nodes. 

Imported from Jira [BEAM-7895](https://issues.apache.org/jira/browse/BEAM-7895). Original Jira may contain additional context.
Reported by: riazela.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.