jackye1995 commented on code in PR #9717:
URL: https://github.com/apache/iceberg/pull/9717#discussion_r1491864036
##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -3324,6 +3348,184 @@ components:
type: integer
format: int64
+ BooleanTypeValue:
+ type: boolean
+
+ IntegerTypeValue:
+ type: integer
+
+ LongTypeValue:
+ type: integer
+ format: int64
+
+ FloatTypeValue:
+ type: number
+ format: float
+
+ DoubleTypeValue:
+ type: number
+ format: double
+
+ DecimalTypeValue:
+ type: string
+ description:
+ "Decimal types are serialized as a string to preserve exact numeric
precision"
Review Comment:
I think we need to be more specific for how the string is serialized. For
decimal, we should precisely describe this logic:
```
BigDecimal decimalValue = (BigDecimal) defaultValue;
if (decimalValue.scale() >= 0) {
generator.writeString(decimalValue.toPlainString());
} else {
generator.writeString(decimalValue.toString());
}
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]