Repository navigation
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Explicitly requested deep re-review of current head 9aa0519 (base 4b43f8c). Self-authored: COMMENT only; CI readiness is bypassed by the explicit review request, not claimed as passed.
Conclusion remains no confirmed source blocker. I reread all current changed hunks across the 10 files, including every changed registry overload and the complete domain/boundary and CTAS tests. Exact old-head/new-head file comparisons show string_result_domain.go, func_unary.go, list_builtIn.go, and function.go are byte-identical to the implementation reviewed at 26dd486; this is verified reuse of the earlier runtime analysis, not an assumption based on the PR title.
Rechecked checked-width arithmetic and overflow/unknown fallback, UTF-8 versus binary byte bounds, rounded-up UNHEX output, AES full-block PKCS#7 padding, fixed digest/network/numeric domains, all four UNCOMPRESSED_LENGTH registry signatures and the int32 executor/masked range, and NULL-producing function metadata. No new lifecycle, synchronization, or per-row allocation change appeared on this head. The prior encoder/runtime proof remains applicable because the executable files above are unchanged.
Independently reran the standard-library Go compression-framing probe: all 1,031 seeded incompressible input sizes stayed within the proposed bound including the four-byte header and optional trailing dot. This is a focused framing check, not a native MatrixOne test or universal compression proof.
Non-blocking acceptance: keep native/BVT CI for this rebased head and the high-entropy compression/CTAS regression. I did not rerun MatrixOne native or distributed suites here. The metadata/UNCOMPRESSED_LENGTH physical-type change should also be represented in any supported rolling-upgrade compatibility testing; no mixed-version cluster execution is claimed by this review.
Summary
Fix #28387 by deriving bounded result metadata for conversion, network, hash,
hex, compression, and encryption built-ins instead of returning the default
wide
VARCHAR/BLOBtypes.The problem is metadata, not the scalar values: CTAS persists the planner's
expression result type, so a function that returns a bounded value was
materialized as
VARCHAR(65535),VARBINARY(65535), orBLOB. This affectsschema compatibility, information-schema metadata, client buffer planning,
and downstream DDL.
What changed
unknown types and arithmetic overflow.
INET_NTOA(31),INET6_NTOA(39),BIN/CONV(65), numericHEX(16),MD5(32),SHA1(40), and the safe maximumSHA2width (128).HEX,UNHEX,COMPRESS, andAES_ENCRYPTmetadata. Text results remain text; binary results remainbinary.
HEX(string)by twice the declared input byte length andUNHEXbyhalf the input byte length rounded up.
AES_ENCRYPTby PKCS#7 block padding and keepAES_DECRYPTas BLOBbecause its plaintext length is not statically recoverable.
COMPRESSusing the zlib expansion formula plus MatrixOne's currentGo-zlib stream overhead. The resulting widths are 68 for
VARCHAR(12)and32 for
VARBINARY(12), rather than blindly using MySQL C-zlib's 66/30;high-entropy input demonstrated that 66/30 underestimates the actual
MatrixOne output.
UNCOMPRESSas BLOB and arrayHEXas TEXT. These arelossless fallbacks because MatrixOne has no statically bounded LONGBLOB or
array serialization domain here.
UNCOMPRESSED_LENGTHwith its INT result contract and useint32end-to-end. Its masked value is at most
0x3fffffff, so this does notnarrow any valid result.
non-NULL inputs: invalid conversion bases, invalid SHA2 variants, invalid
network input, AES/compression failures, and decompression failures.
Correctness and unhappy paths
to a lossless wide type; no result is deliberately truncated.
format behavior.
as the actual encoder limit without a short write.
information_schemacolumn metadata for text, binary, network, hash,compression, AES, and
UNCOMPRESSED_LENGTHresults.Performance and scope
allocation, or compression is added to type inference.
int32result contractfor
UNCOMPRESSED_LENGTH; function values and compression/decompressionbehavior are otherwise unchanged.
INET6_ATONkeeps its existing fixedVARBINARY(16)contract.AES_DECRYPTandUNCOMPRESSintentionally remain wide because theirresult length cannot be soundly bounded from the available static metadata.
Validation
nullability, compression boundaries, AES compatibility, and existing
compression behavior.
library path; this avoids the known
go testlauncher/DYLD issue.func_bounded_result_metadata.test, 15/15 passed.48-byte high-entropy UTF-8 case (
COMPRESSlength 68 and materializedVARBINARY(68)).git diff --checkpassed.missing ONNX testdata and the existing WASM test's
/testwrite path; nofailure was observed in the changed tests.