Gabriel39 commented on code in PR #66247:
URL: https://github.com/apache/doris/pull/66247#discussion_r3690590589
##########
fe/fe-connector/fe-connector-paimon/src/test/java/org/apache/doris/connector/paimon/PaimonScanParamsTest.java:
##########
@@ -72,6 +72,69 @@ public void testValidateKnownScanOptions() {
"scan.plan-sort-partition", "true"));
}
+ @Test
+ public void testValidateRelationScopedReaderOptions() {
+ PaimonScanParams.validateOptions(ImmutableMap.of(
+ "read.batch-size", "4096",
+ "file-reader-async-threshold", "16 MB",
+ "file-index.read.enabled", "false",
+ "source.split.target-size", "64 MB",
+ "source.split.open-file-cost", "1 MB",
+ "scan.manifest.parallelism", "1",
+ "scan.plan-sort-partition", "true"));
+
+ for (Map<String, String> options : new Map[] {
+ ImmutableMap.of("read.batch-size", "0"),
+ ImmutableMap.of("read.batch-size", "-1"),
+ ImmutableMap.of("read.batch-size", "65537"),
+ ImmutableMap.of("file-reader-async-threshold", "512 KB"),
+ ImmutableMap.of("file-reader-async-threshold", "2 GB")
+ }) {
+ Assertions.assertThrows(IllegalArgumentException.class,
+ () -> PaimonScanParams.validateOptions(options));
+ }
+ }
+
+ @Test
+ public void testPlanningOptionsDoNotReuseMetadataProjection() {
+
Assertions.assertTrue(PaimonScanParams.hasOnlyReaderOptions(ImmutableMap.of(
+ "file-index.read.enabled", "false",
+ "source.split.target-size", "64 MB")));
+ Assertions.assertFalse(PaimonScanParams.hasOnlyReaderOptions(
+ ImmutableMap.of("scan.manifest.parallelism", "1")));
+ Assertions.assertFalse(PaimonScanParams.hasOnlyReaderOptions(
+ ImmutableMap.of("scan.plan-sort-partition", "true")));
+ }
+
+ @Test
+ public void testManifestParallelismCannotMutateGlobalPoolCapacity() {
+ int availableProcessors = Runtime.getRuntime().availableProcessors();
+ PaimonScanParams.validateOptions(ImmutableMap.of(
Review Comment:
Valid. Commit bd46e1fa6c1 clamps the portable success case to the stable
maximum and retains explicit local and global rejection coverage.
--
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]