alamb commented on code in PR #3887:
URL: https://github.com/apache/arrow-rs/pull/3887#discussion_r1156318103
##########
arrow-flight/src/sql/mod.rs:
##########
@@ -190,4 +279,27 @@ mod tests {
let unpack_query: CommandStatementQuery =
any.unpack().unwrap().unwrap();
assert_eq!(query, unpack_query);
}
+
+ #[test]
+ fn test_command() {
+ let query = CommandStatementQuery {
+ query: "select 1".to_string(),
+ };
+ let any = Any::pack(&query).unwrap();
+ let cmd: Command = any.try_into().unwrap();
+
+ assert!(matches!(cmd, Command::CommandStatementQuery(_)));
+ assert_eq!(cmd.type_url(), COMMAND_STATEMENT_QUERY_TYPE_URL);
+
+ // Unknown variant
+
+ let any = Any {
Review Comment:
👍
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]