You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2020/06/02 00:46:14 UTC
[GitHub] [iceberg] rdblue commented on a change in pull request #199: ORC metrics
rdblue commented on a change in pull request #199:
URL: https://github.com/apache/iceberg/pull/199#discussion_r433561921
##########
File path: core/src/test/java/org/apache/iceberg/TestMetrics.java
##########
@@ -206,13 +214,25 @@ public void testMetricsForTopLevelFields() throws IOException {
assertCounts(9, 2L, 0L, metrics);
assertBounds(9, TimeType.get(), 2000L, 3000L, metrics);
assertCounts(10, 2L, 0L, metrics);
- assertBounds(10, TimestampType.withoutZone(), 0L, 1000L, metrics);
+ if (fileFormat() == FileFormat.ORC) {
+ // ORC-611: ORC only supports millisecond precision, so we adjust by 1 millisecond
+ assertBounds(10, TimestampType.withoutZone(), -1000L, 1000L, metrics);
+ } else {
+ assertBounds(10, TimestampType.withoutZone(), 0L, 900L, metrics);
+ }
assertCounts(11, 2L, 0L, metrics);
assertBounds(11, FixedType.ofLength(4),
ByteBuffer.wrap(fixed), ByteBuffer.wrap(fixed), metrics);
assertCounts(12, 2L, 0L, metrics);
assertBounds(12, BinaryType.get(),
ByteBuffer.wrap("S".getBytes()), ByteBuffer.wrap("W".getBytes()), metrics);
+ if (fileFormat() == FileFormat.ORC) {
+ // TODO: enable when ORC-342 is fixed - ORC-342: creates inaccurate timestamp/stats below epoch
+ // ORC-611: ORC only supports millisecond precision, so we adjust by 1 millisecond
+ // assertBounds(13, TimestampType.withoutZone(), -1000L, 1000L, metrics);
Review comment:
I think this should assert that bounds are not present if there is any value below 0.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org