Skip to content

Commit b234b11

Browse files
authored
---
yaml --- r: 7479 b: refs/heads/tswast-patch-1 c: 0637c80 h: refs/heads/master i: 7477: ed7b685 7475: eca350c 7471: 7610d01
1 parent 8bb85ab commit b234b11

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ refs/tags/v0.18.0: 9d193c4c4b9d1c6f21515dd8e50836b9194ec9bb
5757
refs/tags/v0.19.0: e67b56e4d8dad5f9a7b38c9b2107c23c828f2ed5
5858
refs/tags/v0.20.0: 839f7fb7156535146aa1cb2c5aadd8d375d854e8
5959
refs/tags/v0.20.1: 370471f437f1f4f68a11e068df5cd6bf39edb1fa
60-
refs/heads/tswast-patch-1: 8d76e73c1d6fb63380c5c37094a7370feffb540b
60+
refs/heads/tswast-patch-1: 0637c80cc23938e4bbfa6304005f975a319648b5
6161
refs/heads/pubsub-streaming-pull: 19262b752ee874eb2ca3b950eb2aef44d5a5267b

branches/tswast-patch-1/gcloud-java-bigquery/src/main/java/com/google/cloud/bigquery/StandardTableDefinition.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ public static class StreamingBuffer implements Serializable {
5353
private static final long serialVersionUID = 822027055549277843L;
5454
private final long estimatedRows;
5555
private final long estimatedBytes;
56-
private final long oldestEntryTime;
56+
private final Long oldestEntryTime;
5757

58-
StreamingBuffer(long estimatedRows, long estimatedBytes, long oldestEntryTime) {
58+
StreamingBuffer(long estimatedRows, long estimatedBytes, Long oldestEntryTime) {
5959
this.estimatedRows = estimatedRows;
6060
this.estimatedBytes = estimatedBytes;
6161
this.oldestEntryTime = oldestEntryTime;
@@ -77,9 +77,9 @@ public long estimatedBytes() {
7777

7878
/**
7979
* Returns the timestamp of the oldest entry in the streaming buffer, in milliseconds since
80-
* epoch.
80+
* epoch. Returns {@code null} if the streaming buffer is empty.
8181
*/
82-
public long oldestEntryTime() {
82+
public Long oldestEntryTime() {
8383
return oldestEntryTime;
8484
}
8585

@@ -111,9 +111,13 @@ Streamingbuffer toPb() {
111111
}
112112

113113
static StreamingBuffer fromPb(Streamingbuffer streamingBufferPb) {
114+
Long oldestEntryTime = null;
115+
if (streamingBufferPb.getOldestEntryTime() != null) {
116+
oldestEntryTime = streamingBufferPb.getOldestEntryTime().longValue();
117+
}
114118
return new StreamingBuffer(streamingBufferPb.getEstimatedRows().longValue(),
115119
streamingBufferPb.getEstimatedBytes().longValue(),
116-
streamingBufferPb.getOldestEntryTime().longValue());
120+
oldestEntryTime);
117121
}
118122
}
119123

0 commit comments

Comments
 (0)