Test that a simple select statement works in the row-oriented protocol
(self)
| 211 | |
| 212 | @needs_session(TCLIService.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V1) |
| 213 | def test_execute_select_v1(self): |
| 214 | """Test that a simple select statement works in the row-oriented protocol""" |
| 215 | execute_statement_req = TCLIService.TExecuteStatementReq() |
| 216 | execute_statement_req.sessionHandle = self.session_handle |
| 217 | execute_statement_req.statement = "SELECT COUNT(*) FROM functional.alltypes" |
| 218 | execute_statement_resp = self.hs2_client.ExecuteStatement(execute_statement_req) |
| 219 | HS2TestSuite.check_response(execute_statement_resp) |
| 220 | |
| 221 | fetch_results_req = TCLIService.TFetchResultsReq() |
| 222 | fetch_results_req.operationHandle = execute_statement_resp.operationHandle |
| 223 | fetch_results_req.maxRows = 100 |
| 224 | fetch_results_resp = self.fetch(fetch_results_req) |
| 225 | |
| 226 | assert len(fetch_results_resp.results.rows) == 1 |
| 227 | assert fetch_results_resp.results.startRowOffset == 0 |
| 228 | |
| 229 | try: |
| 230 | assert not fetch_results_resp.hasMoreRows |
| 231 | except AssertionError: |
| 232 | pytest.xfail("IMPALA-558") |
| 233 | |
| 234 | @needs_session() |
| 235 | def test_select_null(self): |
nothing calls this directly
no test coverage detected