jackye1995 commented on code in PR #9717:
URL: https://github.com/apache/iceberg/pull/9717#discussion_r1493011625
##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -3324,6 +3348,211 @@ components:
type: integer
format: int64
+ BooleanTypeValue:
+ type: boolean
+ example: true
+
+ IntegerTypeValue:
+ type: integer
+ example: 42
+
+ LongTypeValue:
+ type: integer
+ format: int64
+ example: 9223372036854775807
+
+ FloatTypeValue:
+ type: number
+ format: float
+ example: 3.14
+
+ DoubleTypeValue:
+ type: number
+ format: double
+ example: 123.456
+
+ DecimalTypeValue:
+ type: string
+ description:
+ "Decimal types are serialized as strings using BigDecimal to maintain
precision. For scales greater than
+ or equal to zero, `toPlainString` ensures a non-exponential
representation. Negative scales utilize the
+ `toString`, resulting in exponential notation"
+ example:
+ positiveScale: "123.4500"
+ zeroScale: "2"
+ negativeScale: "2E+20"
+
+ StringTypeValue:
+ type: string
+ example: "hello"
+
+ UUIDTypeValue:
+ type: string
+ description:
+ "UUID types are serialized as a string"
+ example: "eb26bdb1-a1d8-4aa6-990e-da940875492c"
+
+ DateTypeValue:
+ type: string
+ format: date
+ description:
+ "Date types are serialized from an integer representing days since the
Unix epoch to an ISO 8601 date string"
+ example: "2007-12-03"
+
+ TimeTypeValue:
+ type: string
+ description:
+ "Time types are serialized from a long representing microseconds since
midnight to an ISO 8601 time string"
+ example: "10:15:30"
+
+ TimestampTypeValue:
+ type: string
+ description:
+ "Timestamp types are serialized from a long representing microseconds
since the Unix epoch to an ISO 8601
+ timestamp string. During serialization, the timestamp type is checked
to see if it should be converted to UTC.
+ If so, the serialized timestamp string will be formatted to represent
UTC by appending `+00:00`"
+ example:
+ withoutTimezone: "2007-12-03T10:15:30"
+ withTimezone: "2007-12-03T10:15:30+00:00"
+
+ FixedTypeValue:
+ type: string
+ description:
+ "serialized as a base16-encoded string representing fixed length
binary data"
+ example: "111F"
+
+ BinaryTypeValue:
+ type: string
+ description:
+ "serialized as a base16-encoded string representing binary data"
+ example: "0000FF"
+
+ MapTypeValue:
+ type: object
+ description:
+ "A map structure serialized with keys and values arrays that maintain
type"
+ properties:
+ keys:
+ type: array
+ items:
+ $ref: '#/components/schemas/TypeValue'
+ values:
+ type: array
+ items:
+ $ref: '#/components/schemas/TypeValue'
+ example:
+ keys: [1, 2]
+ values: ["foo", "bar"]
+
+ StructTypeValue:
+ type: object
+ description:
+ "Struct type are serialized, where field id are preserved as a string
JSON key, and the fields value is
+ serialized based on the defined type, supporting a deep serialization
of nested structures"
+ additionalProperties:
+ oneOf:
+ - $ref: '#/components/schemas/TypeValue'
+ example:
+ "4": 1
Review Comment:
is this missing the {} at beginning and end?
##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -3324,6 +3348,211 @@ components:
type: integer
format: int64
+ BooleanTypeValue:
+ type: boolean
+ example: true
+
+ IntegerTypeValue:
+ type: integer
+ example: 42
+
+ LongTypeValue:
+ type: integer
+ format: int64
+ example: 9223372036854775807
+
+ FloatTypeValue:
+ type: number
+ format: float
+ example: 3.14
+
+ DoubleTypeValue:
+ type: number
+ format: double
+ example: 123.456
+
+ DecimalTypeValue:
+ type: string
+ description:
+ "Decimal types are serialized as strings using BigDecimal to maintain
precision. For scales greater than
+ or equal to zero, `toPlainString` ensures a non-exponential
representation. Negative scales utilize the
+ `toString`, resulting in exponential notation"
+ example:
+ positiveScale: "123.4500"
+ zeroScale: "2"
+ negativeScale: "2E+20"
+
+ StringTypeValue:
+ type: string
+ example: "hello"
+
+ UUIDTypeValue:
+ type: string
+ description:
+ "UUID types are serialized as a string"
+ example: "eb26bdb1-a1d8-4aa6-990e-da940875492c"
+
+ DateTypeValue:
+ type: string
+ format: date
+ description:
+ "Date types are serialized from an integer representing days since the
Unix epoch to an ISO 8601 date string"
+ example: "2007-12-03"
+
+ TimeTypeValue:
+ type: string
+ description:
+ "Time types are serialized from a long representing microseconds since
midnight to an ISO 8601 time string"
+ example: "10:15:30"
+
+ TimestampTypeValue:
+ type: string
+ description:
+ "Timestamp types are serialized from a long representing microseconds
since the Unix epoch to an ISO 8601
+ timestamp string. During serialization, the timestamp type is checked
to see if it should be converted to UTC.
+ If so, the serialized timestamp string will be formatted to represent
UTC by appending `+00:00`"
+ example:
+ withoutTimezone: "2007-12-03T10:15:30"
+ withTimezone: "2007-12-03T10:15:30+00:00"
+
+ FixedTypeValue:
+ type: string
+ description:
+ "serialized as a base16-encoded string representing fixed length
binary data"
+ example: "111F"
+
+ BinaryTypeValue:
+ type: string
+ description:
+ "serialized as a base16-encoded string representing binary data"
+ example: "0000FF"
+
+ MapTypeValue:
+ type: object
+ description:
+ "A map structure serialized with keys and values arrays that maintain
type"
+ properties:
+ keys:
+ type: array
+ items:
+ $ref: '#/components/schemas/TypeValue'
+ values:
+ type: array
+ items:
+ $ref: '#/components/schemas/TypeValue'
+ example:
+ keys: [1, 2]
Review Comment:
is this missing the {} at beginning and end?
--
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]