Amar3tto commented on code in PR #39457:
URL: https://github.com/apache/beam/pull/39457#discussion_r3675758441


##########
sdks/java/io/debezium/src/main/java/org/apache/beam/io/debezium/DebeziumReadSchemaTransformProvider.java:
##########
@@ -138,10 +150,19 @@ public PCollectionRowTuple expand(PCollectionRowTuple 
input) {
               readTransform
                   .withMaxNumberOfRecords(testLimitRecords)
                   .withMaxTimeToRun(testLimitMilliseconds);
+        } else {
+          Integer maxNumberOfRecords = configuration.getMaxNumberOfRecords();
+          if (maxNumberOfRecords != null) {
+            readTransform = 
readTransform.withMaxNumberOfRecords(maxNumberOfRecords);
+          }
+          Long maxTimeToRun = configuration.getMaxTimeToRun();
+          if (maxTimeToRun != null) {
+            readTransform = readTransform.withMaxTimeToRun(maxTimeToRun);
+          }
         }
 
         // TODO(pabloem): Database connection issues can be debugged here.
-        Schema recordSchema = readTransform.getRecordSchema();
+        Schema recordSchema = withoutOptions(readTransform.getRecordSchema());

Review Comment:
   `withoutOptions` removes the `primaryKeyColumns` schema option because the 
Python SDK cannot decode it across the Java/Python expansion boundary. It does 
not change the output fields or row values, and the regular Java `DebeziumIO` 
schema remains unchanged. The only difference is that this metadata is not 
exposed through the SchemaTransform.



-- 
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