mxm commented on code in PR #27836:
URL: https://github.com/apache/flink/pull/27836#discussion_r2999915199
##########
flink-formats/flink-avro/src/test/java/org/apache/flink/table/runtime/batch/AvroTypesITCase.java:
##########
@@ -114,11 +111,8 @@ class AvroTypesITCase extends AbstractTestBase {
.setTypeTimestampMillis(Instant.parse("2014-03-01T12:12:12.321Z"))
.setTypeTimestampMicros(
Instant.ofEpochSecond(0).plus(123456L,
ChronoUnit.MICROS))
- .setTypeDecimalBytes(
- ByteBuffer.wrap(
- BigDecimal.valueOf(2000,
2).unscaledValue().toByteArray()))
- .setTypeDecimalFixed(
- new Fixed2(BigDecimal.valueOf(2000,
2).unscaledValue().toByteArray()))
+ .setTypeDecimalBytes(BigDecimal.valueOf(2000, 2))
+ .setTypeDecimalFixed(BigDecimal.valueOf(2000, 2))
Review Comment:
Not sure how this can work, why are we omitting Fixed2?
##########
flink-formats/flink-avro/src/test/java/org/apache/flink/formats/avro/AvroOutputFormatTest.java:
##########
@@ -200,11 +199,9 @@ public int getAttemptNumber() {
user.setTypeTimestampMicros(Instant.ofEpochSecond(0).plus(123456L,
ChronoUnit.MICROS));
// 20.00
- user.setTypeDecimalBytes(
- ByteBuffer.wrap(BigDecimal.valueOf(2000,
2).unscaledValue().toByteArray()));
+ user.setTypeDecimalBytes(BigDecimal.valueOf(2000, 2));
// 20.00
- user.setTypeDecimalFixed(
- new Fixed2(BigDecimal.valueOf(2000,
2).unscaledValue().toByteArray()));
+ user.setTypeDecimalFixed(BigDecimal.valueOf(2000, 2));
Review Comment:
Why does the change affect both bytes and fixed type?
--
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]