Repository navigation
fix: expose complete information_schema column metadata - #28228
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.
Deep re-review of exact head 1435a9fc70230b4568fac90be253d66789881bfd. The previous FLOAT(M,D) parser blocker is fixed: the 24/25 storage boundary is now applied only when D is absent, and the generated parser, public DDL test, and metadata helper agree. The integer, MEDIUMINT, BIT, YEAR, DECIMAL, and temporal matrix also matches a clean MySQL 8.0.44 oracle. One reachable metadata distinction is still lost.
[P1 correctness] Do not expose an implicit float scale as explicit NUMERIC_SCALE = 0.
internalNumericScale returns a non-NULL scale for every FLOAT/DOUBLE with typ.Scale >= 0. However, MatrixOne's ordinary function/expression float type is created with types.T_float32.ToType() or types.T_float64.ToType(), whose metadata is Width = 0, Scale = 0. Scientific float literals use that path through makePlan2Float64ConstExprWithType, and many float-returning functions do as well. The zero scale here is an internal default, not evidence of an explicit FLOAT(M,0) declaration.
Consequently a CTAS/expression-derived ordinary DOUBLE is exposed by information_schema.COLUMNS with NUMERIC_SCALE = 0. MySQL leaves NUMERIC_SCALE NULL whenever D is omitted; I verified both ordinary FLOAT/DOUBLE and CTAS expression columns on MySQL 8.0.44. This also contradicts the helper's own contract that only FLOAT(M,D) / DOUBLE(M,D) should expose scale.
Please require the same explicit-width evidence already used by internalNumericPrecision (for example, typ.Width > 0 && typ.Scale >= 0) before returning a float scale. Add helper coverage for T_float32.ToType() and T_float64.ToType(), plus one public CTAS/function-produced FLOAT or DOUBLE column, while retaining FLOAT(M,0) as non-NULL scale 0. The path is common metadata generated by the current system, not malformed legacy state.
|
Addressed the latest P1 in commit
Validation: |
|
已修复并推送最新 head:
|
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep re-review of exact head ddb3828f92626a418b94f1982e18b3e89ecff47c against merge-base 109bf926fdb31de31e0578ad0fb17be160d7d8d0 and current main/c1293102fd18908b59c4b049140aad67a50e0b16.
The previous blockers are closed end to end: the FLOAT(p) 24/25 storage boundary, FLOAT(M,D) type retention, YEAR and signed/unsigned MEDIUMINT metadata, and implicit versus explicit floating scale all agree across grammar, generated parser, persisted type metadata, helper output, and the public DDL/CTAS path. I also checked integer/decimal/BIT/default-width and TIME/DATETIME/TIMESTAMP NULL/scale boundaries, the information_schema view consumers, changed expected results, and the current-main delta; no further correctness, compatibility, lifecycle, boundedness, or performance blocker was found.
Evidence reused on this exact head: Shared Build, Ubuntu UT, SCA, UT Coverage, proxy BVT, pessimistic BVT, and Utils Coverage are terminal green. The newly added issue regression exercises the public SQL/protocol metadata path; focused helper/parser coverage preserves the internal boundaries. git diff --check passes and the isolated worktree is clean.
What type of PR is this?
Which issue(s) this PR fixes:
issue #25103
What this PR does / why we need it:
Expose MySQL-compatible information_schema.COLUMNS metadata for numeric and temporal types:
Add regression coverage for COLUMNS and the Connector/J information_schema getImportedKeys query, and refresh distributed metadata expectations.
Tests: