epgif commented on code in PR #9008:
URL: https://github.com/apache/iceberg/pull/9008#discussion_r1669176686


##########
api/src/test/java/org/apache/iceberg/transforms/TestBucketing.java:
##########
@@ -112,12 +112,59 @@ public void testSpecValues() {
         .as("Spec example: hash(2017-11-16T22:31:08) = -2047944441")
         .isEqualTo(-2047944441);
 
+    timestampVal = 
Literal.of("2017-11-16T22:31:08.000001").to(Types.TimestampType.withoutZone());
+    assertThat(BucketUtil.hash(timestampVal.value()))
+        .as("Spec example: hash(2017-11-16T22:31:08.000001) = -1207196810")
+        .isEqualTo(-1207196810);
+
     Literal<Long> timestamptzVal =
         
Literal.of("2017-11-16T14:31:08-08:00").to(Types.TimestampType.withZone());
     assertThat(BucketUtil.hash(timestamptzVal.value()))
         .as("Spec example: hash(2017-11-16T14:31:08-08:00) = -2047944441")
         .isEqualTo(-2047944441);
 
+    timestamptzVal =
+        
Literal.of("2017-11-16T14:31:08.000001-08:00").to(Types.TimestampType.withZone());
+    assertThat(BucketUtil.hash(timestamptzVal.value()))
+        .as("Spec example: hash(2017-11-16T14:31:08.000001-08:00) = 
-1207196810")
+        .isEqualTo(-1207196810);
+
+    Literal<Long> timestampNsVal =
+        
Literal.of("2017-11-16T22:31:08").to(Types.TimestampNanoType.withoutZone());
+    assertThat(BucketUtil.hash(timestampNsVal.value()))
+        .as("Spec example: hash(2017-11-16T22:31:08) = -737750069")

Review Comment:
   Ahhhh these are from before commit 753aed569184890156f826347fbbf6eab843cf1b 
changed the bucketing. New tests were added in that commit and in commit 
eb5e38242348ebed6778432ead28182672bafc79, obviating all these. I've removed 
these now.



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to