From 770d6de020359abd5f580b29a45eec51bf8bd7bf Mon Sep 17 00:00:00 2001 From: Mike Kaplinskiy Date: Tue, 4 Dec 2018 21:56:37 -0800 Subject: [PATCH] Make StandardTableDefinition$StreamingBuffer/getEstimatedRows nullable --- .../cloud/bigquery/StandardTableDefinition.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/StandardTableDefinition.java b/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/StandardTableDefinition.java index 880372b2b733..08693cf18916 100644 --- a/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/StandardTableDefinition.java +++ b/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/StandardTableDefinition.java @@ -56,13 +56,19 @@ public static class StreamingBuffer implements Serializable { this.oldestEntryTime = oldestEntryTime; } - /** Returns a lower-bound estimate of the number of rows currently in the streaming buffer. */ - public long getEstimatedRows() { + /** + * Returns a lower-bound estimate of the number of rows currently in the streaming buffer. + * Returns {@code null} if the streaming buffer is empty. + */ + public Long getEstimatedRows() { return estimatedRows; } - /** Returns a lower-bound estimate of the number of bytes currently in the streaming buffer. */ - public long getEstimatedBytes() { + /** + * Returns a lower-bound estimate of the number of bytes currently in the streaming buffer. + * Returns {@code null} if the streaming buffer is empty. + */ + public Long getEstimatedBytes() { return estimatedBytes; }