You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Compatibility]: temporal formatting functions reject row-dependent format expressions #28566
CREATETABLEsrc(
id INTPRIMARY KEY,
dt DATETIME(6),
tm TIME(6),
epoch DECIMAL(20,6),
fmt VARCHAR(64)
);
INSERT INTO src VALUES
(1,'2024-01-02 03:04:05.123456','12:34:56.123456',
1704164645.123456,'%Y-%m-%d %H:%i:%s.%f'),
(2,'2025-06-07 08:09:10.654321','23:45:01.654321',
1749283750.654321,'%H:%i:%s.%f');
SELECT id, DATE_FORMAT(dt, fmt) FROM src ORDER BY id;
SELECT id, TIME_FORMAT(tm, fmt) FROM src ORDER BY id;
SELECT id, FROM_UNIXTIME(epoch, fmt) FROM src ORDER BY id;
SELECT id, DATE_FORMAT(dt, CASE WHEN id=1 THEN '%Y' ELSE '%m' END)
FROM src ORDER BY id;
MatrixOne 对以上语句分别返回同类错误:
invalid argument date format format, bad value not constant
invalid argument time format format, bad value not constant
invalid argument from_unixtime format, bad value not constant
Triage routing: assigned to @jiangxinmeng1. Labels normalized to kind/bug + needs-triage (existing compatibility labels, when present, are retained).
Recommended PR decomposition:
PR-T1 — temporal format expressions (#28566 only): support row-dependent format expressions in DATE_FORMAT, TIME_FORMAT, and FROM_UNIXTIME. This changes the constant-expression/planner contract and vectorized execution, so it should stay isolated.
Keep it separate from #28567/#28597 (format output and locale semantics), #28572/#28573 (EXTRACT), and #28569/#28570 (temporal arithmetic/time-zone conversion).
Suggested priority: P2 compatibility issue with a clear repro; confirm supported format-expression scope before implementation.
QA handoff after merged PR #28851 (merge a99db843c7b4630a86883addc9424433d93fc2d2). This issue was a non-closing related report; the merge and shared BVT counts are not an independent PASS for this reproducer.
Latest MatrixOne contract: C24, C27, C36–C38 in the merged temporal design. DATE_FORMAT, TIME_FORMAT and formatted FROM_UNIXTIME read each row’s format expression; NULL value/format propagates, and repeated or alternating formats do not reuse an earlier row’s state.
Please rerun the original reproducer on main at or after the merge and record the exact SHA, deployment, SQL mode/time zone, client path, observed rows/types/NULLs and active warnings or errors. Retest the original format-column query, empty/all-NULL batches and a real prepared format marker; compare values and result metadata.
Keep the issue open until the issue-specific acceptance is demonstrated with happy and unhappy controls. If any part still fails, post the exact observed-versus-expected result and return it to development; if it passes, record evidence and close the issue. @Ariznawlll
Activity
XuPeng-SH commentedon Sep 10, 2026
Triage routing: assigned to @jiangxinmeng1. Labels normalized to
kind/bug+needs-triage(existing compatibility labels, when present, are retained).Recommended PR decomposition:
#28566only): support row-dependent format expressions inDATE_FORMAT,TIME_FORMAT, andFROM_UNIXTIME. This changes the constant-expression/planner contract and vectorized execution, so it should stay isolated.#28567/#28597(format output and locale semantics),#28572/#28573(EXTRACT), and#28569/#28570(temporal arithmetic/time-zone conversion).Suggested priority: P2 compatibility issue with a clear repro; confirm supported format-expression scope before implementation.
fix: align date compatibility semantics (#28851)
XuPeng-SH commentedon Sep 27, 2026
QA handoff after merged PR #28851 (merge
a99db843c7b4630a86883addc9424433d93fc2d2). This issue was a non-closing related report; the merge and shared BVT counts are not an independent PASS for this reproducer.Latest MatrixOne contract: C24, C27, C36–C38 in the merged temporal design. DATE_FORMAT, TIME_FORMAT and formatted FROM_UNIXTIME read each row’s format expression; NULL value/format propagates, and repeated or alternating formats do not reuse an earlier row’s state.
Please rerun the original reproducer on
mainat or after the merge and record the exact SHA, deployment, SQL mode/time zone, client path, observed rows/types/NULLs and active warnings or errors. Retest the original format-column query, empty/all-NULL batches and a real prepared format marker; compare values and result metadata.Keep the issue open until the issue-specific acceptance is demonstrated with happy and unhappy controls. If any part still fails, post the exact observed-versus-expected result and return it to development; if it passes, record evidence and close the issue. @Ariznawlll
Ariznawlll commentedon Oct 2, 2026
测试版本
maind50a2d475a406829f67127fef7b2ad4abc1c1d3dmo-service,独立数据目录;MySQL 文本协议与 server-side PREPARE原问题验证
按 issue 原始语义在上述 commit 重新执行并重复 3 次。STR_TO_DATE 的 format 可逐行变化,每行均按自己的格式解析,不再复用首行格式。
Happy Path 覆盖
覆盖同批次多种 DATE/DATETIME format 和重复值。
Unhappy Path 覆盖
覆盖某行格式不匹配、NULL format/value;只影响对应行,不污染其他行。
白盒验证
关联修复 #28851、#29365 已进入当前
main。同时将本 issue 的可公开观察契约固化为独立回归,避免只依赖实现细节或共享测试间接判断。回归测试
suites/14_issue_regression/t/issue_recent_temporal_contracts.test714/714条语句通过。测试证据
d50a2d475a406829f67127fef7b2ad4abc1c1d3d14_issue_regression中观察到的旧 GOROOT/历史 golden/并发锁冲突属于既有无关失败,以上新增用例单独重跑均稳定通过。测试结论
测试通过。