rymurr commented on a change in pull request #1825:
URL: https://github.com/apache/iceberg/pull/1825#discussion_r533371672
##########
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:
hmmmm...I am torn. On one hand I agree, it makes the users life easier
if we add 23:59:59 to the timestamp they specified. However I don't like
changing what they asked for, if they ask for a date I think they should be
given what they asked for, they can always specify time if they want EOD. Or
they can create a tag to represent EOD. Thoughts?
----------------------------------------------------------------
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]