Tests that when result spooling is disabled, setting a small batch_size causes the shell to fetch a single batch at a time, even when the configured fetch size is larger than the batch_size.
(self, vector)
| 43 | cls.ImpalaTestMatrix.add_dimension(create_client_protocol_no_strict_dimension()) |
| 44 | |
| 45 | def test_fetch_size(self, vector): |
| 46 | """Tests that when result spooling is disabled, setting a small batch_size causes |
| 47 | the shell to fetch a single batch at a time, even when the configured fetch size is |
| 48 | larger than the batch_size.""" |
| 49 | handle = None |
| 50 | num_rows = 100 |
| 51 | batch_size = 10 |
| 52 | query_options = {'batch_size': str(batch_size), 'spool_query_results': 'false'} |
| 53 | client = self.__get_shell_client(vector) |
| 54 | |
| 55 | try: |
| 56 | client.connect() |
| 57 | handle = client.execute_query( |
| 58 | "select * from functional.alltypes limit {0}".format(num_rows), query_options) |
| 59 | self.__fetch_rows(client.fetch(handle), batch_size, num_rows) |
| 60 | finally: |
| 61 | if handle is not None: client.close_query(handle) |
| 62 | client.close_connection() |
| 63 | |
| 64 | def test_fetch_size_result_spooling(self, vector): |
| 65 | """Tests that when result spooling is enabled, that the exact fetch_size is honored |
nothing calls this directly
no test coverage detected