zhangyue19921010 opened a new pull request, #11213: URL: https://github.com/apache/paimon/pull/11213
### Purpose Fixes #11212. Append clustering copies each generated order-key row before the sort buffer immediately serializes it, and creates a new output projection view for every sorted row. Consume the order-key view directly and reuse the output projection view, releasing its backing row at close. ### Tests Eight real table cases verify NULLs and long variable-length values through write, full compaction, commit and read, using two clustering keys, all three curves, a 1 MiB buffer, and synchronous/asynchronous output. Two cases use nullable long strings in non-prefix ORDER keys `c,a` and check the key order. The same cases pass on the unchanged base. 28 selected table, sorter, strategy and manager tests pass on JDK 11.0.18. Maven `verify` passes Checkstyle, Spotless, Enforcer and RAT without `fast-build`. | Metric (median) | Base | Patch | | --- | ---: | ---: | | Calling-thread allocation (MiB) | 113.10 | 85.64 | | Rewrite wall time (ms) | 176.09 | 166.84 | | Calling-thread CPU (ms) | 174.51 | 165.05 | | Output bytes | 1,040,848 | 1,040,848 | Local Java `clusterRewrite` measurements on JDK 11.0.18 with G1, `-Xms512m -Xmx2g`: 200,000 rows `(a INT, b INT, c STRING)`, ORDER clustering, Parquet, a 64 MiB buffer and synchronous file output. Each version ran in two fresh JVMs, with three warmups and seven measured rewrites per JVM (14 samples each), in base/patch/patch/base order. Input files were produced by real table writes and committed once; every output row and its order were checked after each rewrite. Fixture writes and validation reads are outside the measured region. Allocation standard deviations were 0.042/0.042 MiB (base/patch); wall-time standard deviations were 17.50/16.28 ms. Allocation fell 24.3%. Timing and whole-JVM RSS samples overlap. AI-generated with TRAE CLI (GPT-6.1-Sol). -- 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]
