Skip to content

Commit 4897c05

Browse files
authored
fix: Update SchemaAwareStreamWriter comment to down recommend it. (#2195)
* fix: update the comment in SchemaAwareStreamWriter about when the feature is actually disabled * . * . * . * . * .
1 parent addbcdf commit 4897c05

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/SchemaAwareStreamWriter.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@
4343
* StreamWriter functions, but also provides an additional feature: schema update support, where if
4444
* the BigQuery table schema is updated, users will be able to ingest data on the new schema after
4545
* some time (in order of minutes).
46+
*
47+
* <p>NOTE: The schema update ability will be disabled when you pass in a table schema explicitly
48+
* through the writer. It is recommended that user either use JsonStreamWriter (which fully manages
49+
* table schema) or StreamWriter (which accepts proto format in raw and user will handle the schema
50+
* update event themsevles). If you use this class, you need to be very cautious about possible
51+
* mistmach between the writer's schema and the input data, any mismatch of the two will cause data
52+
* corruption.
4653
*/
4754
public class SchemaAwareStreamWriter<T> implements AutoCloseable {
4855
private static final Logger LOG = Logger.getLogger(SchemaAwareStreamWriter.class.getName());

0 commit comments

Comments
 (0)