RustedBones commented on code in PR #32514: URL: https://github.com/apache/beam/pull/32514#discussion_r1773120121
########## sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQuerySourceDef.java: ########## @@ -45,12 +45,23 @@ <T> BigQuerySourceBase<T> toSource( SerializableFunction<TableSchema, AvroSource.DatumReaderFactory<T>> readerFactory, boolean useAvroLogicalTypes); + /** + * Extract the {@link TableSchema} corresponding to this source. + * + * @param bqOptions BigQueryOptions + * @return table schema of the source + * @throws BigQuerySchemaRetrievalException if schema retrieval fails + */ + TableSchema getTableSchema(BigQueryOptions bqOptions); + /** * Extract the Beam {@link Schema} corresponding to this source. * * @param bqOptions BigQueryOptions * @return Beam schema of the source * @throws BigQuerySchemaRetrievalException if schema retrieval fails */ - Schema getBeamSchema(BigQueryOptions bqOptions); + default Schema getBeamSchema(BigQueryOptions bqOptions) { + return BigQueryUtils.fromTableSchema(getTableSchema(bqOptions)); + } Review Comment: I removed it in the original PR but was asked to put it back https://github.com/apache/beam/pull/32360#discussion_r1761144791 -- 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. To unsubscribe, e-mail: github-unsubscr...@beam.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org