stevenzwu commented on code in PR #7661:
URL: https://github.com/apache/iceberg/pull/7661#discussion_r1223339467
##########
flink/v1.17/flink/src/main/java/org/apache/iceberg/flink/source/IcebergSource.java:
##########
@@ -462,15 +475,22 @@ public IcebergSource<T> build() {
}
}
+ if (splitAssignerFactory == null) {
+ if (splitComparator == null) {
+ splitAssignerFactory = new SimpleSplitAssignerFactory();
+ } else {
+ splitAssignerFactory = new
OrderedSplitAssignerFactory(splitComparator);
+ }
+ }
+
checkRequired();
// Since builder already load the table, pass it to the source to avoid
double loading
return new IcebergSource<T>(
- tableLoader, context, readerFunction, splitAssignerFactory, table);
+ tableLoader, context, readerFunction, splitAssignerFactory,
splitComparator, table);
}
private void checkRequired() {
Preconditions.checkNotNull(tableLoader, "tableLoader is required.");
- Preconditions.checkNotNull(splitAssignerFactory, "assignerFactory is
required.");
Review Comment:
I see that. but we can probably still keep the not null check
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]