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


##########
api/src/test/java/org/apache/iceberg/TestPartitionPaths.java:
##########
@@ -54,6 +54,25 @@ public void testPartitionPath() {
         .isEqualTo("ts_hour=2017-12-01-10/id_bucket=" + idBucket);
   }
 
+  @Test
+  public void testPartitionPathWithNanoseconds() {
+    PartitionSpec spec = 
PartitionSpec.builderFor(SCHEMA).hour("ts").bucket("id", 10).build();
+
+    Transform<Long, Integer> hour = Transforms.hour();
+    Transform<Integer, Integer> bucket = Transforms.bucket(10);
+
+    Literal<Long> ts =
+        
Literal.of("2017-12-01T10:12:55.038194789").to(Types.TimestampNanoType.withoutZone());
+    Object tsHour = 
hour.bind(Types.TimestampNanoType.withoutZone()).apply(ts.value());

Review Comment:
   done



-- 
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