JingsongLi commented on code in PR #646:
URL: https://github.com/apache/incubator-paimon/pull/646#discussion_r1141658611
##########
paimon-common/src/main/java/org/apache/paimon/format/FileFormat.java:
##########
@@ -77,18 +78,35 @@ public Optional<FileStatsExtractor>
createStatsExtractor(RowType type) {
/** Create a {@link FileFormat} from table options. */
public static FileFormat fromTableOptions(
- Options tableOptions, ConfigOption<String> formatOption) {
+ Options tableOptions,
+ ConfigOption<String> formatOption,
+ ConfigOption<Integer> readBatchSizeOption) {
String formatIdentifier = tableOptions.get(formatOption);
- return fromIdentifier(formatIdentifier,
tableOptions.removePrefix(formatIdentifier + "."));
+ int readBatchSize = tableOptions.get(readBatchSizeOption);
+ return fromIdentifier(
+ formatIdentifier, readBatchSize,
tableOptions.removePrefix(formatIdentifier + "."));
}
- /** Create a {@link FileFormat} from format identifier and format options.
*/
+ @VisibleForTesting
public static FileFormat fromIdentifier(String identifier, Options
options) {
+ return fromIdentifier(identifier, 1000, options);
+ }
+
+ /** Create a {@link FileFormat} from format identifier and format options.
*/
+ public static FileFormat fromIdentifier(String identifier, int
readBatchSize, Options options) {
Review Comment:
fromIdentifier(String identifier, FormatContext context)
--
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]