Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@xuanyuan300
Copy link
Contributor

Signed-off-by: xuanyuan300 [email protected]

What is changed and how it works?

What's Changed:

  1. Fix generate AST struct incorrect when parsing sql statement which contains like a.b.c .

When parsing select a.b.select from t, the result as follows:
before(incorrect AST):

                                     expr: SimpleIdentExpr(
                                              TableIdent {
                                                            span: Span {
                                                                start: 11,
                                                                end: 21,
                                                            },
                                                            field: "b.select",
                                                            table: "a",
                                                            schema: None,
                                                        },
                                                    ),

after(correct AST):

                                               expr: SimpleIdentExpr(
                                                        TableIdent {
                                                            span: Span {
                                                                start: 11,
                                                                end: 21,
                                                            },
                                                            field: "select",
                                                            table: "b",
                                                            schema: Some(
                                                                "a",
                                                            ),
                                                        },
                                                    ),

…ains `a.b.c` like sql statement

Signed-off-by: xuanyuan300 <[email protected]>
@xuanyuan300 xuanyuan300 requested a review from mlycore September 9, 2022 10:10
@xuanyuan300 xuanyuan300 added type:bug Misbehavior app:pisa-proxy Pisa-Proxy related changes in:parser Parser related changes labels Sep 9, 2022
@xuanyuan300 xuanyuan300 added this to the v0.3.0 milestone Sep 9, 2022
@codecov
Copy link

codecov bot commented Sep 9, 2022

Codecov Report

Merging #301 (6eeb4ea) into master (df61eb4) will increase coverage by 3.32%.
The diff coverage is 79.68%.

@@            Coverage Diff             @@
##           master     #301      +/-   ##
==========================================
+ Coverage   66.97%   70.30%   +3.32%     
==========================================
  Files           7        6       -1     
  Lines         427      495      +68     
==========================================
+ Hits          286      348      +62     
- Misses        133      137       +4     
- Partials        8       10       +2     
Flag Coverage Δ
unittests 70.30% <79.68%> (+3.32%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pisa-controller/pkg/webhook/server.go 26.66% <0.00%> (ø)
pisa-controller/pkg/proxy/http.go 58.62% <53.84%> (+0.72%) ⬆️
pisa-controller/pkg/webhook/injection.go 59.02% <82.56%> (+20.08%) ⬆️
pisa-controller/pkg/proxy/builder.go 91.21% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@mlycore mlycore merged commit 604d30d into database-mesh:master Sep 9, 2022
xuanyuan300 added a commit to xuanyuan300/pisanix that referenced this pull request Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app:pisa-proxy Pisa-Proxy related changes in:parser Parser related changes size/S type:bug Misbehavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants