@@ -127,11 +127,12 @@ public Dataset(BigQuery bigquery, DatasetInfo info) {
127127 *
128128 * @param bigquery the BigQuery service used for issuing requests
129129 * @param dataset dataset's user-defined id
130- * @return the {@code Dataset} object or {@code null} if not found.
130+ * @param options dataset options
131+ * @return the {@code Dataset} object or {@code null} if not found
131132 * @throws BigQueryException upon failure
132133 */
133- public static Dataset load (BigQuery bigquery , String dataset ) {
134- DatasetInfo info = bigquery .getDataset (dataset );
134+ public static Dataset load (BigQuery bigquery , String dataset , BigQuery . DatasetOption ... options ) {
135+ DatasetInfo info = bigquery .getDataset (dataset , options );
135136 return info != null ? new Dataset (bigquery , info ) : null ;
136137 }
137138
@@ -145,22 +146,23 @@ public DatasetInfo info() {
145146 /**
146147 * Checks if this dataset exists.
147148 *
148- * @return {@code true} if this dataset exists, {@code false} otherwise.
149+ * @return {@code true} if this dataset exists, {@code false} otherwise
149150 * @throws BigQueryException upon failure
150151 */
151152 public boolean exists () {
152153 return bigquery .getDataset (info .datasetId (), BigQuery .DatasetOption .fields ()) != null ;
153154 }
154155
155156 /**
156- * Fetches current dataset's latest information.
157+ * Fetches current dataset's latest information. Returns {@code null} if the dataset does not
158+ * exist.
157159 *
158160 * @param options dataset options
159- * @return a {@code Dataset} object with latest information.
161+ * @return a {@code Dataset} object with latest information or {@code null} if not found
160162 * @throws BigQueryException upon failure
161163 */
162164 public Dataset reload (BigQuery .DatasetOption ... options ) {
163- return new Dataset (bigquery , bigquery . getDataset ( info .datasetId (), options ) );
165+ return Dataset . load (bigquery , info .datasetId (). dataset () , options );
164166 }
165167
166168 /**
@@ -170,7 +172,7 @@ public Dataset reload(BigQuery.DatasetOption... options) {
170172 * @param datasetInfo new dataset's information. User-defined id must match the one of the current
171173 * dataset
172174 * @param options dataset options
173- * @return a {@code Dataset} object with updated information.
175+ * @return a {@code Dataset} object with updated information
174176 * @throws BigQueryException upon failure
175177 */
176178 public Dataset update (DatasetInfo datasetInfo , BigQuery .DatasetOption ... options ) {
@@ -221,7 +223,7 @@ public Table get(String table, BigQuery.TableOption... options) {
221223 * @param table the table's user-defined id
222224 * @param schema the table's schema
223225 * @param options options for table creation
224- * @return a {@code Table} object for the created table.
226+ * @return a {@code Table} object for the created table
225227 * @throws BigQueryException upon failure
226228 */
227229 public Table create (String table , Schema schema , BigQuery .TableOption ... options ) {
@@ -236,7 +238,7 @@ public Table create(String table, Schema schema, BigQuery.TableOption... options
236238 * @param query the query used to generate the table
237239 * @param functions user-defined functions that can be used by the query
238240 * @param options options for table creation
239- * @return a {@code Table} object for the created table.
241+ * @return a {@code Table} object for the created table
240242 * @throws BigQueryException upon failure
241243 */
242244 public Table create (String table , String query , List <UserDefinedFunction > functions ,
@@ -252,7 +254,7 @@ public Table create(String table, String query, List<UserDefinedFunction> functi
252254 * @param table the table's user-defined id
253255 * @param query the query used to generate the table
254256 * @param options options for table creation
255- * @return a {@code Table} object for the created table.
257+ * @return a {@code Table} object for the created table
256258 * @throws BigQueryException upon failure
257259 */
258260 public Table create (String table , String query , BigQuery .TableOption ... options ) {
@@ -266,7 +268,7 @@ public Table create(String table, String query, BigQuery.TableOption... options)
266268 * @param table the table's user-defined id
267269 * @param configuration data format, location and other properties of an external table
268270 * @param options options for table creation
269- * @return a {@code Table} object for the created table.
271+ * @return a {@code Table} object for the created table
270272 * @throws BigQueryException upon failure
271273 */
272274 public Table create (String table , ExternalDataConfiguration configuration ,
0 commit comments