|
|
@@ -756,6 +756,24 @@ class TestHiveserver2ApiWithHadoop(BeeswaxSampleProvider):
|
|
|
assert_true('size' in data['result'])
|
|
|
assert_equal(23, data['result']['rows'])
|
|
|
assert_equal(None, data['result']['size'])
|
|
|
+
|
|
|
+ # Assert that selecting all from partitioned table works
|
|
|
+ statement = "SELECT * FROM web_logs;"
|
|
|
+ doc = self.create_query_document(owner=self.user, query_type='impala', statement=statement)
|
|
|
+ notebook = Notebook(document=doc)
|
|
|
+ snippet = self.execute_and_wait(doc, snippet_idx=0, timeout=60.0, wait=2.0)
|
|
|
+
|
|
|
+ self.client.post(reverse('notebook:fetch_result_data'),
|
|
|
+ {'notebook': notebook.get_json(), 'snippet': json.dumps(snippet), 'rows': 100, 'startOver': 'false'})
|
|
|
+
|
|
|
+ response = self.client.post(reverse('notebook:fetch_result_size'),
|
|
|
+ {'notebook': notebook.get_json(), 'snippet': json.dumps(snippet)})
|
|
|
+
|
|
|
+ data = json.loads(response.content)
|
|
|
+ assert_equal(0, data['status'], data)
|
|
|
+ assert_true('result' in data)
|
|
|
+ assert_true('rows' in data['result'])
|
|
|
+ assert_equal(1000, data['result']['rows'])
|
|
|
finally:
|
|
|
self.api.close_session(session)
|
|
|
|