Abacn commented on code in PR #39457:
URL: https://github.com/apache/beam/pull/39457#discussion_r3668131117
##########
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();
Review Comment:
Shall we treat zero the same as null?
##########
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:
Why need "withoutOptions" here? Any risk of breaking changes?
--
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]