ahmedabu98 commented on code in PR #30460:
URL: https://github.com/apache/beam/pull/30460#discussion_r1568435582


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIOTranslation.java:
##########
@@ -455,8 +454,8 @@ public Row toConfigRow(Write<?> transform) {
         fieldValues.put(
             "json_time_partitioning", 
toByteArray(transform.getJsonTimePartitioning().get()));
       }
-      if (transform.getClustering() != null) {
-        fieldValues.put("clustering", toByteArray(transform.getClustering()));
+      if (transform.getJsonClustering() != null) {

Review Comment:
   Actually it turns out translation with clustering has always been broken. 
The `Clustering` object is not serializable, so this line would always throw an 
error:
   
https://github.com/apache/beam/blob/6366bd4c8901063467865277891ffc22769db1b7/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIOTranslation.java#L478
   
   We don't have a test for this so we didn't notice. 
   
   Since it has always been broken, I think there's no harm to use a different 
field and there's no need to fork. wdyt @chamikaramj ?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to