Meituan-Dianping / Meituan-Dianping/SQLAdvisor

第一步sql优化长度达到1000以上会被截断

Open
#15 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
5.6k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

[Note] 第1步: 对SQL解析优化之后得到的SQL:select product_orgz.product_id AS product_id,products.code AS product_code,products.name AS product_name,products.product_base_code AS product_base_code,products.min_spec_unit AS sales_unit,min_spec.name AS unit_name,products.order_spec_unit AS order_spec_unit,products.order_spec_num AS spec_num,order_spec.name AS spec_unit,products.weight_type AS weight_type,products.c_code AS c_code from (((test.product_orgz join test.products on((products.id = product_orgz.product_id))) join test.product_units min_spec on((min_spec.id = products.min_spec_unit))) join test.product_units order_spec on((order_spec.id = products.order_spec_unit))) where ((product_orgz.hq_code = '000001') and (products.code <> 123) and (product_orgz.orgz_id = 12) and (product_orgz.is_manager = 1) and (product_orgz.is_require = 0) and (product_orgz.status = 1) and ((

Contributor guide

No contributing guide indexed for this repository

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 reported SQL parsing or optimization output with the SQL shown in the issue and a statement longer than 1,000 characters. Trace where the optimized SQL is emitted and verify that the complete statement, rather than a truncated prefix, is retained.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, sql
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.