sql-formatter-org / sql-formatter-org/sql-formatter

Support Chinese parenthesis characters in MySQL

Open
#610 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
2.9k
Forks
456
Avg merge
3d 4h
Merged PRs (30d)
3

Description

Input data

SELECT `时间` as "时间",SUM(进度(计划完成率)) as "SUM(`进度(计划完成率)`)" FROM ds_upload_19 WHERE 1=1 GROUP BY `时间` LIMIT 1000 

Expected Output

SELECT
  `时间` as "时间",
  SUM(进 度 ( 计 划 完 成 率 )) as "SUM(`进度(计划完成率)`)"
FROM
  ds_upload_19
WHERE
  1 = 1
GROUP BY
  `时间`
LIMIT
  1000

Actual Output

SELECT `时间` as "时间",SUM(进度(计划完成率)) as "SUM(`进度(计划完成率)`)" FROM ds_upload_19 WHERE 1=1 GROUP BY `时间` LIMIT 1000 

Usage

  • How are you calling / using the library?
  • What SQL language(s) does this apply to?
  • Which SQL Formatter version are you using?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the supplied MySQL query with the formatter and compare the actual output with the expected formatting. Trace the MySQL formatting path or parser behavior for the Chinese parenthesis characters. Done means the query is formatted into the expected multiline output without breaking the existing MySQL behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, sql, typescript
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.