-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf(parser): remove the return value option #47
perf(parser): remove the return value option #47
Conversation
f603f4b
to
3ef84f9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
God job! I will merge it later! ❤️
cc @Tangruilin PTAL.
@@ -460,7 +460,7 @@ impl Parser { | |||
|
|||
loop { | |||
self.next_token(); | |||
exprs.push(self.parse_expression(Precedence::Lowest)?); | |||
exprs.push(Some(self.parse_expression(Precedence::Lowest)?)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, cc @Tangruilin
Lines 82 to 86 in 7974f22
pub struct InsertStmt { | |
pub table_name: String, | |
pub columns: Option<Vec<String>>, | |
pub values: Vec<Vec<Option<Expression>>>, | |
} |
looks
InsertStmt
values should't be Option
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't hacked into this InsertStmt
structure, although it can also remove the Option
, if possible, I can change it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't hacked into this
InsertStmt
structure,although it can also remove the
Option`, if possible, I can change it
Emmm, you can open an other issue to trace this question if you want to solve it. 😃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't hacked into this
InsertStmt
structure,although it can also remove the
Option`, if possible, I can change itEmmm, you can open an other issue to trace this question if you want to solve it. 😃
I just saw it out of the blue and questioned it.
src/parser/mod.rs
Outdated
Some(expr) => expr, | ||
None => { | ||
return Err(Error::ParseErr(fmt_err!( | ||
"ON Predicate expression is not valid!" | ||
))); | ||
} | ||
}) | ||
Some(self.parse_expression(Precedence::Lowest)?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should keep this error message here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok,Pushed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should keep this error message here.
And in other place. you hide the error message. May should keep them too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
Pushed @fansehep
src/parser/mod.rs
Outdated
if !is_prefix_oper(&self.pre_token) { | ||
return Err(Error::ParseErr(fmt_err!( | ||
"No prefixOperatorFunc for: {:?}", | ||
"No prefix Operator Func for: {}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great! 👍🏻
3ef84f9
to
b9e20de
Compare
Signed-off-by: apengn <[email protected]>
b9e20de
to
bbdfca9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Really thanks for your contribution! @apengn ❤️ |
remove the return value option
Which issue does this PR solve? (这个 PR 解决了什么问题)
#46
Retionable for this PR Change (这个 PR 做了什么改变)
remove the return value option