Skip to content

Commit

Permalink
Merge pull request #2832 from actiontech/sql_rewriting_fix_3
Browse files Browse the repository at this point in the history
sql rewriting: add sql logic desc in response
  • Loading branch information
iwanghc authored Dec 19, 2024
2 parents cae6df8 + b053642 commit 17d82fb
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sqle/api/controller/v1/sql_rewriting.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@ type RewriteSQLReq struct {
type RewriteSQLData struct {
// @Description 重写前的SQL业务描述
BusinessDesc string `json:"business_desc"`
// @Description 重写前的SQL执行逻辑描述
LogicDesc string `json:"logic_desc"`
// @Description 重写建议列表
Suggestions []*RewriteSuggestion `json:"suggestions"`
// @Description 重写后的SQL
RewrittenSQL string `json:"rewritten_sql"`
// @Description 重写后的SQL业务描述
RewrittenSQLBusinessDesc string `json:"rewritten_sql_business_desc"`
// @Description 重写后的SQL执行逻辑描述
RewrittenSQLLogicDesc string `json:"rewritten_sql_logic_desc"`
// @Description 重写前后的业务不等价性描述,为空表示等价
BusinessNonEquivalentDesc string `json:"business_non_equivalent_desc"`

Expand Down
8 changes: 8 additions & 0 deletions sqle/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -16438,6 +16438,10 @@ var doc = `{
"description": "@Description 重写前后的业务不等价性描述,为空表示等价",
"type": "string"
},
"logic_desc": {
"description": "@Description 重写前的SQL执行逻辑描述",
"type": "string"
},
"rewritten_sql": {
"description": "@Description 重写后的SQL",
"type": "string"
Expand All @@ -16446,6 +16450,10 @@ var doc = `{
"description": "@Description 重写后的SQL业务描述",
"type": "string"
},
"rewritten_sql_logic_desc": {
"description": "@Description 重写后的SQL执行逻辑描述",
"type": "string"
},
"suggestions": {
"description": "@Description 重写建议列表",
"type": "array",
Expand Down
8 changes: 8 additions & 0 deletions sqle/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -16422,6 +16422,10 @@
"description": "@Description 重写前后的业务不等价性描述,为空表示等价",
"type": "string"
},
"logic_desc": {
"description": "@Description 重写前的SQL执行逻辑描述",
"type": "string"
},
"rewritten_sql": {
"description": "@Description 重写后的SQL",
"type": "string"
Expand All @@ -16430,6 +16434,10 @@
"description": "@Description 重写后的SQL业务描述",
"type": "string"
},
"rewritten_sql_logic_desc": {
"description": "@Description 重写后的SQL执行逻辑描述",
"type": "string"
},
"suggestions": {
"description": "@Description 重写建议列表",
"type": "array",
Expand Down
6 changes: 6 additions & 0 deletions sqle/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3536,12 +3536,18 @@ definitions:
business_non_equivalent_desc:
description: '@Description 重写前后的业务不等价性描述,为空表示等价'
type: string
logic_desc:
description: '@Description 重写前的SQL执行逻辑描述'
type: string
rewritten_sql:
description: '@Description 重写后的SQL'
type: string
rewritten_sql_business_desc:
description: '@Description 重写后的SQL业务描述'
type: string
rewritten_sql_logic_desc:
description: '@Description 重写后的SQL执行逻辑描述'
type: string
suggestions:
description: '@Description 重写建议列表'
items:
Expand Down

0 comments on commit 17d82fb

Please sign in to comment.