From 4897c05aeb7cddff20fb530d64034cc143c24d91 Mon Sep 17 00:00:00 2001 From: Yiru Tang Date: Wed, 19 Jul 2023 17:35:08 -0700 Subject: [PATCH] fix: Update SchemaAwareStreamWriter comment to down recommend it. (#2195) * fix: update the comment in SchemaAwareStreamWriter about when the feature is actually disabled * . * . * . * . * . --- .../cloud/bigquery/storage/v1/SchemaAwareStreamWriter.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/SchemaAwareStreamWriter.java b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/SchemaAwareStreamWriter.java index 32f8e0f7e3..f91309be35 100644 --- a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/SchemaAwareStreamWriter.java +++ b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/SchemaAwareStreamWriter.java @@ -43,6 +43,13 @@ * StreamWriter functions, but also provides an additional feature: schema update support, where if * the BigQuery table schema is updated, users will be able to ingest data on the new schema after * some time (in order of minutes). + * + *

NOTE: The schema update ability will be disabled when you pass in a table schema explicitly + * through the writer. It is recommended that user either use JsonStreamWriter (which fully manages + * table schema) or StreamWriter (which accepts proto format in raw and user will handle the schema + * update event themsevles). If you use this class, you need to be very cautious about possible + * mistmach between the writer's schema and the input data, any mismatch of the two will cause data + * corruption. */ public class SchemaAwareStreamWriter implements AutoCloseable { private static final Logger LOG = Logger.getLogger(SchemaAwareStreamWriter.class.getName());