Jie Cheng created CALCITE-6543:
----------------------------------
Summary: 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
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:
{quote}@Override public String toString() {
if (value == Double.MAX_VALUE) {
return "huge";
} else {
return Double.toString(value);
}
}
{quote}
after modification:
{quote}@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);
}
}
{quote}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)