[
https://issues.apache.org/jira/browse/CALCITE-6543?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mihai Budiu resolved CALCITE-6543.
----------------------------------
Resolution: Fixed
Fixed in
https://github.com/apache/calcite/commit/787dfdb39c4bca91ec18ee5e223cb31260186c5a
Thank you for the contribution [~chengjie]
> Change the RelOptCostImpl toString method to be consistent with VolcanoCost
> ---------------------------------------------------------------------------
>
> Key: CALCITE-6543
> URL: https://issues.apache.org/jira/browse/CALCITE-6543
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Affects Versions: 1.37.0
> Reporter: Jie Cheng
> Priority: Trivial
> Labels: pull-request-available
> Fix For: 1.37.0
>
>
> Hello everyone, I am a calcite novice, recently learning calcite source code,
> in the process of learning, found that RelOptCostImpl toString method is
> inconsistent with the VolcanoCost method, I think we should revise them to be
> similar
> before modification:
> @Override public String toString() {
> if (value == Double.MAX_VALUE) {
> return "huge";
> } else {
> return Double.toString(value);
> }
> }
> after modification:
> @Override public String toString() {
> if (value == Double.MAX_VALUE) {
> return "huge";
> } else if (value == Double.POSITIVE_INFINITY) {
> return "inf";
> } else if (value == 1.0) {
> return "tiny";
> } else if (value == 0.0) {
> return "0";
> } else {
> return Double.toString(value);
> }
> }
--
This message was sent by Atlassian Jira
(v8.20.10#820010)