| 147 | } |
| 148 | |
| 149 | arrow::Result<StatementQuery> ParseCommandStatementQuery( |
| 150 | const google::protobuf::Any& any) { |
| 151 | pb::sql::CommandStatementQuery command; |
| 152 | if (!any.UnpackTo(&command)) { |
| 153 | return Status::Invalid("Unable to unpack CommandStatementQuery"); |
| 154 | } |
| 155 | |
| 156 | StatementQuery result; |
| 157 | result.query = command.query(); |
| 158 | result.transaction_id = command.transaction_id(); |
| 159 | return result; |
| 160 | } |
| 161 | |
| 162 | SubstraitPlan ParseStatementSubstraitPlan(const pb::sql::SubstraitPlan& pb_plan) { |
| 163 | return {pb_plan.plan(), pb_plan.version()}; |