-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IGNITE-20000: Add planner test to verify numeric type coercion in binary arithmetic #2583
Conversation
f67c4b5
to
17a4d3e
Compare
17a4d3e
to
7fd03fe
Compare
|
||
forTypePair(NumericPair.TINYINT_DOUBLE) | ||
.firstOpBeSame() | ||
.secondOpMatches(castTo(Types.DECIMAL_30_15)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i just still don`t understand is it correct behavior or we need additional issue, probably @lowka may help here?
Overall looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With @lowka help seems it raised from :
org.apache.calcite.sql.validate.implicit.AbstractTypeCoercion#implicitCast
// FLOAT/DOUBLE -> DECIMAL
if (SqlTypeUtil.isApproximateNumeric(in) && expected == SqlTypeFamily.EXACT_NUMERIC) {
return factory.decimalOf(in);
}
org.apache.calcite.rel.type.RelDataTypeFactoryImpl#decimalOf2 <-- here
.../test/java/org/apache/ignite/internal/sql/engine/planner/datatypes/BaseTypeCoercionTest.java
Outdated
Show resolved
Hide resolved
...he/ignite/internal/sql/engine/planner/datatypes/NumericBinaryOperationsTypeCoercionTest.java
Show resolved
Hide resolved
@ygerzhedovich PR heading need to be fixed. |
…ary arithmetic
Thank you for submitting the pull request.
To streamline the review process of the patch and ensure better code quality
we ask both an author and a reviewer to verify the following:
The Review Checklist
- There is a single JIRA ticket related to the pull request.
- The web-link to the pull request is attached to the JIRA ticket.
- The JIRA ticket has the Patch Available state.
- The description of the JIRA ticket explains WHAT was made, WHY and HOW.
- The pull request title is treated as the final commit message. The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
Notes