-
Notifications
You must be signed in to change notification settings - Fork 209
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
Implement ENTRIES function #1315
Conversation
Pull Request Test Coverage Report for Build 5670676976
💛 - Coveralls |
Ok(Evaluated::Value(Value::List(entries))) | ||
} | ||
_ => Err(EvaluateError::FunctionRequiresMapValue(name).into()), | ||
} |
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.
only one test left!
https://coveralls.io/builds/61509376/source?filename=core%2Fsrc%2Fexecutor%2Fevaluate%2Ffunction.rs#L775
we can write this test like this
test!(
"SELECT UNWRAP('abc', 'a.b.c') FROM MapType",
Err(EvaluateError::FunctionRequiresMapValue("UNWRAP".to_owned()).into())
);
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.
thanks for the feedback. i've applied it :)
test-suite/src/function/entries.rs
Outdated
}; | ||
test! { | ||
name: "test if the sample string gets inserted to table", | ||
sql: "INSERT INTO Item VALUES ('{\"name\":\"GlueSQL\"}')", |
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.
we can use r# operator to remove '' for readable code
r#"INSERT INTO Item VALUES ('{"name":"GlueSQL"}')"#,
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.
thanks for the feedback. i've applied 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.
Looks all nice! Thanks a lot for the contribution 👍 👍
core/src/ast/function.rs
Outdated
@@ -1176,14 +1178,6 @@ mod tests { | |||
)))) | |||
.to_sql() | |||
); | |||
|
|||
assert_eq!( |
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.
this removal does not look intentional which is not related to this pr.
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 fixed :)
associated commit: 7d2eeb8
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.
Looks all nice! Thanks a lot for the contribution 👍 👍
resolve #1290