rdblue commented on a change in pull request #1825:
URL: https://github.com/apache/iceberg/pull/1825#discussion_r533018874
##########
File path: nessie/src/main/java/org/apache/iceberg/nessie/TableReference.java
##########
@@ -83,12 +95,49 @@ public static TableReference parse(String path) {
}
if (path.contains("#")) {
- throw new IllegalArgumentException("Invalid table name:" +
- " # is not allowed (reference by timestamp is not supported)");
+ String[] tableTimestamp = path.split("#");
+ TableIdentifier identifier = TableIdentifier.parse(tableTimestamp[0]);
+ return new TableReference(identifier, parseTimestamp(tableTimestamp[1]),
null);
}
TableIdentifier identifier = TableIdentifier.parse(path);
return new TableReference(identifier, null, null);
}
+
+ private enum FormatOptions {
+ DATE_TIME(DateTimeFormatter.ISO_DATE_TIME, Instant::from),
+ LOCAL_DATE_TIME(DateTimeFormatter.ISO_LOCAL_DATE_TIME, t ->
LocalDateTime.from(t).atZone(UTC).toInstant()),
+ LOCAL_DATE(DateTimeFormatter.ISO_LOCAL_DATE, t ->
LocalDate.from(t).atStartOfDay(UTC).toInstant());
Review comment:
This doesn't seem specific enough to include. I would expect the ref on
some day to be the ref at the end of that day, but I think this would produce
the ref at the start of the day.
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]