Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bigquery: BigQuery.writer return type should be public. #1394

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import static com.google.common.base.Preconditions.checkArgument;

import com.google.cloud.BaseWriteChannel;
import com.google.cloud.FieldSelector;
import com.google.cloud.FieldSelector.Helper;
import com.google.cloud.Page;
Expand Down Expand Up @@ -1027,5 +1028,6 @@ Page<List<FieldValue>> listTableData(String datasetId, String tableId,
*
* @throws BigQueryException upon failure
*/
TableDataWriteChannel writer(WriteChannelConfiguration writeChannelConfiguration);
BaseWriteChannel<BigQueryOptions, WriteChannelConfiguration> writer(
WriteChannelConfiguration writeChannelConfiguration);
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import com.google.api.services.bigquery.model.TableDataInsertAllRequest.Rows;
import com.google.api.services.bigquery.model.TableRow;
import com.google.cloud.BaseService;
import com.google.cloud.BaseWriteChannel;
import com.google.cloud.Page;
import com.google.cloud.PageImpl;
import com.google.cloud.PageImpl.NextPageFetcher;
Expand Down Expand Up @@ -670,7 +671,8 @@ private static QueryResult.Builder transformQueryResults(JobId jobId, List<Table
}

@Override
public TableDataWriteChannel writer(WriteChannelConfiguration writeChannelConfiguration) {
public BaseWriteChannel<BigQueryOptions, WriteChannelConfiguration> writer(
WriteChannelConfiguration writeChannelConfiguration) {
return new TableDataWriteChannel(getOptions(),
writeChannelConfiguration.setProjectId(getOptions().getProjectId()));
}
Expand Down