Skip to content

Conversation

@fhueske
Copy link
Contributor

@fhueske fhueske commented Mar 15, 2016

Calcite's default cost model does not take IO and CPU into account. As a consequence, projections are not pushed down (as described in FLINK-3503).

This PR adds a basic cost model to push filters and projections towards the sources.

val child = this.getInput
val rowCnt = RelMetadataQuery.getRowCount(child)
val exprCnt = calcProgram.getExprCount
planner.getCostFactory.makeCost(rowCnt, rowCnt * exprCnt, 0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is the io cost 0?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Calc is implemented as MapFunction and will never spill to disk or cause network traffic.

@vasia
Copy link
Contributor

vasia commented Mar 16, 2016

Merging this one too.

asfgit pushed a commit that referenced this pull request Mar 16, 2016
@vasia
Copy link
Contributor

vasia commented Mar 16, 2016

merged :))

@fhueske fhueske closed this Mar 16, 2016
vasia pushed a commit to vasia/flink that referenced this pull request Mar 16, 2016
asfgit pushed a commit that referenced this pull request Mar 18, 2016
@fhueske fhueske deleted the tableRules branch March 18, 2016 13:56
fijolekProjects pushed a commit to fijolekProjects/flink that referenced this pull request May 1, 2016
hequn8128 pushed a commit to hequn8128/flink that referenced this pull request Jun 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants