alex-plekhanov commented on a change in pull request #9927:
URL: https://github.com/apache/ignite/pull/9927#discussion_r840567486
##########
File path:
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/ddl/ColumnDefinition.java
##########
@@ -71,13 +72,13 @@ public boolean nullable() {
* @return Column's precision.
*/
public Integer precision() {
- return type.getPrecision() != RelDataType.PRECISION_NOT_SPECIFIED ?
type.getPrecision() : null;
+ return TypeUtils.hasPrecesion(type) ? type.getPrecision() : null;
Review comment:
The behavior will be the same (empty precision and scale will be
converted to -1 finally), but I don't think it's a good idea:
1. It requires a little bit more memory for intermediate HashMaps
2. It's a magic number (normally we shouldn't know about meaning of -1 for
query entity, perhaps it will have another meaning in Ignite 3)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]