Caideyipi opened a new pull request, #18854: URL: https://github.com/apache/iotdb/pull/18854
## Description Backport #18851 (`a78f5a736c7e34a951fa1dda34a314fc8a47b7c9`) to `dev/1.3` by re-scanning this branch's production Java code and adapting the collection allocation optimization to its implementations. Collections with a known number of entries currently grow their backing arrays or hash tables while being filled. Pre-size 152 collections in 80 production Java files across six modules: - Session batch-write buffers and schema lists, and both JDBC and Session result column metadata. - Schema/path, query and write plan, logical-view, template, and ConfigNode plan/procedure deserialization. - Query projections, expression transformers, CASE evaluation, and spill readers. - Memtable row/tablet schema lists and recovery, TsFile device sets, Pipe payloads and progress metadata, and UDF point/tangent materialization. Use serialized counts or the number of outputs produced from the input. Guava expected-size factories account for the hash-table load factor. Optional empty lists use capacity zero; memtable schema-list sizing handles nullable measurement arrays. The dev/1.3 scan includes its aggregation/device-view/templated plan deserialization and logical-view maps, and uses the branch's existing DataNode transformation, AuthorPlan, DeviceTimeIndex, and PipeConsensus implementations. ## Validation - Spotless applied to all six affected modules; Checkstyle, Spotless, and forbidden API checks passed in the reactor build. - English reactor `test-compile` passed for the affected modules and their dependencies (28 modules). - 48 existing test classes passed: 378 tests, zero failures/errors/skips. Coverage includes Session, schema/path and plan/procedure serialization, memtable partial inserts and recovery, TsFile metadata, Pipe payloads/progress metadata, expression/operator behavior, and UDF pattern processing. - Chinese locale reactor `test-compile` passed for the same 28 modules with `-P with-zh-locale`. - `git diff --cached --check` passed. This PR has: - [x] been self-reviewed. -- 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]
