Skip to content

fix(parser): normalize inline load format names - #30438

Merged
XuPeng-SH merged 2 commits into
matrixorigin:mainfrom
iamlinjunhong:codex/loom/develop/feb9a138fbf8546a88a63b906873b63ec306d4c0cfd744501ca459fe5af79675
Oct 16, 2026
Merged

XuPeng-SH merged 2 commits into
matrixorigin:mainfrom
iamlinjunhong:codex/loom/develop/feb9a138fbf8546a88a63b906873b63ec306d4c0cfd744501ca459fe5af79675

Conversation

@iamlinjunhong

Copy link
Copy Markdown
Contributor

What type of PR is this?

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

Which issue(s) this PR fixes:

What this PR does / why we need it:

LOAD DATA INLINE FORMAT='CSV' currently fails with a misleading "not yet implemented" error, although the lowercase spelling works. JSONLINE spelling variants also take different validation paths.

Canonicalize the inline format name when constructing the AST, before planner and reader dispatch, matching INFILE/S3 format handling. CSV and JSONLINE spelling variants now follow the existing lowercase behavior. Payloads and other options retain their values; unknown, empty, and padded names remain rejected, and INLINE Arrow retains its existing restriction. Regenerate the parser from the grammar.

Validation:

  • Parser regression: 18 cases covering all recognized formats, invalid names, and payload/option preservation; verified the regression fails before the fix.
  • Full owning MySQL parser package passes.
  • Real MySQL protocol regression passes twice on the same shared single-CN fixture, checking exact loaded rows, matching validation errors, no inserts after rejected loads, and database teardown.
  • Formatting, go vet, and configured incremental golangci-lint pass for the changed parser and embedded-test packages (0 issues).

The added work is one format-name scan per parse, with no per-row or payload processing. Local checks passed; PR CI is pending.

@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 →

@XuPeng-SH

XuPeng-SH commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

mo-bot review · mo-bot-local · done

Commit: 0cf9879e12d8b55e10cc72bbbb7cac48d8cfbc5e

Review completed. Read the assessment.

@XuPeng-SH XuPeng-SH 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.

mo-bot review · mo-bot-local · review

Commit: 0cf9879e12d8b55e10cc72bbbb7cac48d8cfbc5e

Assessment: approve

Reviewed the complete four-file delta and affected callers. Normalizing inline format names at AST construction restores the existing canonical-format contract without duplicating validation or reader dispatch. Payloads, invalid-format rejection and Arrow restrictions remain intact. Tests cover parser boundaries, actual MySQL-protocol behavior and cleanup. No actionable findings; runtime cost is limited to the format-name string.

Model: gpt-6-astra / xhigh

Session: 01a13dcf-1517-7f90-b3f9-c5f9f9e7031b · slot 0 · generation 1

Validation:

  • Reused frozen exact-head successful Ubuntu UT, UT Coverage, arm64 SCA, proxy BVT and pessimistic multi-CN BVT evidence.

  • Regenerated mysql_sql.go using Go 1.27.1 and repository goyacc; output matches the committed parser byte for byte. Receipt checks/1792188692473773958-4.json and generated-parser.log confirm exit 0.

  • Verified exact head/base, clean source, complete changed-file scope, gofmt and git diff --check. Receipt checks/1792188745486035796-20.json and final-audit.log confirm exit 0.

  • Retained evidence reconciliation and review notes under /home/xupeng/.local/state/mo-bot/jobs/571d916ea5e150961cf8200d/attempt-1/validation-audit.json and review-notes.json.

Limitations:

  • No local Go tests were rerun. Supplied CI evidence contains workflow results, without individual test logs; local_validation is empty and raw author-test receipts were unavailable.

  • Linked issue #30419's body was not supplied; review used the concrete reproduction and behavioral contract in the PR description.

@mergify mergify Bot added the queued label Oct 16, 2026
@mergify

mergify Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-16 22:16 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • 🟠 Checks running · in-place
  • 🚫 Left the queue — 2026-10-16 23:32 UTC · at 83b485789690f93d08883dbd621355499dabf3a5

This pull request spent 1 hour 16 minutes 19 seconds in the queue, with no time running CI.

Reason

Pull request #30438 has been dequeued

Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.

The author needs to enable "Allow edits from maintainers" on this pull request.

Hint

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.
If you do update this pull request, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

Waiting for any of
  • check-neutral = CI Required
  • check-skipped = CI Required
  • check-success = CI Required
All conditions

Tick the box to put this pull request back in the merge queue (same as @mergifyio queue).

  • Requeue this pull request

Copy link
Copy Markdown
Contributor

版本范围复核:main aa4b6eddfdad54d11be6fd75a5675eb9801f6690 上已实际通过原始 INLINE CSV 大小写场景,以及对应 parser/真实 MySQL 协议回归;但当前 4.2-dev c914080bba57dd17fb86be300c22b9be43cc2b61 上再次实测:FORMAT='csv' 成功,FORMAT='CSV' 仍返回 20102(load format 'CSV' is not yet implemented)。#30419 原报告来自 v4.2.5,本轮不能把 main 修复当作该版本分支已修复。该版本缺口沿用 #30419,不新建重复 issue;请明确目标交付版本/补齐回补后继续验收。

This branch was previously deployed

1 inactive deployment
ci — 83b48578 Deployed Oct 17, 2026 by mergify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dequeued kind/bug Something isn't working size/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants