Skip to content

fix(frontend): support human-readable datetime strings in MO_TS table hint - #24629

Merged
mergify[bot] merged 17 commits into
matrixorigin:mainfrom
VioletQwQ-0:violet/issue-24554-mo-ts-datetime
Jun 2, 2026
Merged

fix(frontend): support human-readable datetime strings in MO_TS table hint#24629
mergify[bot] merged 17 commits into
matrixorigin:mainfrom
VioletQwQ-0:violet/issue-24554-mo-ts-datetime

Conversation

@VioletQwQ-0

Copy link
Copy Markdown
Collaborator

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

issue #24554

What this PR does / why we need it:

When {MO_TS = '2024-01-01 00:00:00'} was used, it only accepted the internal debug timestamp format (PhysicalTime-LogicalTime), causing invalid debug timestamp string errors for human-readable datetime strings. This PR makes the MO_TS hint try to parse human-readable datetime strings first, falling back to the debug format if parsing fails, matching the behavior of the existing {TIMESTAMP = '...'} hint.

Special notes for your reviewer:

The change is isolated to the ATMOTIMESTAMP string-literal branch in ResolveTsHint(). It reuses the same time.Parse pattern already present in the ATTIMESTAMPTIME branch.

🤖 Generated with Claude Code

… hint

When `{MO_TS = '2024-01-01 00:00:00'}` was used, it only accepted
the internal debug timestamp format (`PhysicalTime-LogicalTime`).
Now it tries to parse human-readable datetime strings first,
falling back to the debug format if that fails.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@matrix-meow matrix-meow added size/S Denotes a PR that changes [10,99] lines and removed size/XL Denotes a PR that changes [1000, 1999] lines labels May 29, 2026
Ariznawlll and others added 6 commits June 2, 2026 15:38
## What type of PR is this?

- [ ] API-change
- [x] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [x] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

issue matrixorigin#24122
issue matrixorigin#21685

## What this PR does / why we need it:

Adds BVT coverage for two existing features:

- SQL Task string literal preservation: verifies string literals in
`WHEN` gate conditions and SQL task bodies are preserved in
`mo_task.sql_task` and execute with the expected semantics.
- `ALTER USER ... LOCK/UNLOCK`: verifies lock/unlock status transitions
for sys tenant users and normal tenant users.
- Account restore coverage for normal tenants: verifies locked normal
tenant users and normal tenant admin users restore to the snapshot lock
status.
use cuVS C++ library for Kmeans, Cagra, Ivfflat, brute force, ivfpq
integrate pairwise distance to sql function L2Distance, InnerProduct,...etc.
GPU Brute force index for CentriodX JOIN

Parameter "gpu_mode" with valid values [0|1]. With CPU build, default value is 0.  Wtih GPU build, default value is 1.

Approved by: @ouyuanning, @aunjgr, @heni02, @fengttt, @gouhongshen, @LeftHandCold, @iamlinjunhong, @XuPeng-SH
补充函数
```
JSON_ARRAY
JSON_OBJECT
JSON_TYPE
JSON_VALID
JSON_LENGTH
JSON_KEYS
JSON_PRETTY
JSON_SCHEMA_VALID
JSON_SCHEMA_VALID_REPORT
JSON_VALUE

```

Approved by: @aunjgr, @heni02, @XuPeng-SH
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@VioletQwQ-0

Copy link
Copy Markdown
Collaborator Author

@fengttt @iamlinjunhong @LeftHandCold @aunjgr @ouyuanning Please review this PR.

@VioletQwQ-0

Copy link
Copy Markdown
Collaborator Author

@VioletQwQ-0

@aunjgr aunjgr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean fix. The human-readable datetime path is added before the debug-format fallback, matching the ATTIMESTAMPTIME branch's pattern:

  • time.Parse("2006-01-02 15:04:05.999999999", ...) first → produces PhysicalTime directly
  • Falls back to timestamp.ParseTimestamp(...) for PhysicalTime-LogicalTime debug format
  • tsNano <= 0 correctly rejects sub-epoch timestamps (physical_time=0 is an invalid sentinel in TAE)

Error propagation via named-return err is correct in both branches. LGTM.

@mergify

mergify Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • Entered queue2026-06-02 17:44 UTC · Rule: main
  • Checks passed · in-place
  • Merged2026-06-02 19:00 UTC · at fa1508b94442640259de898569e7b2409adf30b0 · squash

This pull request spent 1 hour 15 minutes 24 seconds in the queue, including 1 hour 13 minutes 45 seconds running CI.

Required conditions to merge
  • #approved-reviews-by >= 1 [🛡 GitHub branch protection]
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • github-review-decision = APPROVED [🛡 GitHub branch protection]
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Compose CI / multi cn e2e bvt test docker compose(PESSIMISTIC)
    • check-neutral = Matrixone Compose CI / multi cn e2e bvt test docker compose(PESSIMISTIC)
    • check-skipped = Matrixone Compose CI / multi cn e2e bvt test docker compose(PESSIMISTIC)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Standlone CI / Multi-CN e2e BVT Test on Linux/x64(LAUNCH, PROXY)
    • check-neutral = Matrixone Standlone CI / Multi-CN e2e BVT Test on Linux/x64(LAUNCH, PROXY)
    • check-skipped = Matrixone Standlone CI / Multi-CN e2e BVT Test on Linux/x64(LAUNCH, PROXY)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
    • check-neutral = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
    • check-skipped = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone CI / SCA Test on Ubuntu/x86
    • check-neutral = Matrixone CI / SCA Test on Ubuntu/x86
    • check-skipped = Matrixone CI / SCA Test on Ubuntu/x86
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone CI / UT Test on Ubuntu/x86
    • check-neutral = Matrixone CI / UT Test on Ubuntu/x86
    • check-skipped = Matrixone CI / UT Test on Ubuntu/x86
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Compose CI / multi cn e2e bvt test docker compose(Optimistic/PUSH)
    • check-neutral = Matrixone Compose CI / multi cn e2e bvt test docker compose(Optimistic/PUSH)
    • check-skipped = Matrixone Compose CI / multi cn e2e bvt test docker compose(Optimistic/PUSH)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH,Optimistic)
    • check-neutral = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH,Optimistic)
    • check-skipped = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH,Optimistic)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Upgrade CI / Compatibility Test With Target on Linux/x64(LAUNCH)
    • check-neutral = Matrixone Upgrade CI / Compatibility Test With Target on Linux/x64(LAUNCH)
    • check-skipped = Matrixone Upgrade CI / Compatibility Test With Target on Linux/x64(LAUNCH)
  • any of [🛡 GitHub branch protection]:
    • check-skipped = Matrixone Utils CI / Coverage
    • check-neutral = Matrixone Utils CI / Coverage
    • check-success = Matrixone Utils CI / Coverage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working size/S Denotes a PR that changes [10,99] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.