Abacn commented on code in PR #39457:
URL: https://github.com/apache/beam/pull/39457#discussion_r3676434534
##########
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:
> the Python SDK cannot decode it across the Java/Python expansion boundary.
Could you please share what the current error is. This sounds a generic gap
we may want to fix it separately. Feel free to open an Issue.
> The only difference is that this metadata is not exposed through the
SchemaTransform
This metadata was added here:
https://github.com/apache/beam/blob/08dc50a3b91cfc066a641a01275ec9a0475263f2/sdks/java/io/debezium/src/main/java/org/apache/beam/io/debezium/DebeziumIO.java#L334
and `getRecordSchema` is only used by
DebeziumReadSchemaTransformProvider.from. If we are convinced it's not
necessary. We can comment out `.setOption` and link to the decode bug as a TODO
--
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]