impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Knupp (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-5617: Include full workload name in tpch nested query filenames
Date Wed, 30 Aug 2017 20:17:30 GMT
David Knupp has posted comments on this change.

Change subject: IMPALA-5617: Include full workload name in tpch_nested query filenames
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/7891/3/tests/query_test/test_tpch_nested_queries.py
File tests/query_test/test_tpch_nested_queries.py:

Line 36:   def test_tpch_q1(self, vector):
So, I'm going to offer a comment in the spirit of this being a good opportunity to learn something
about pytest. If we use the pytest parametrize marker, all of these test functions can be
collapsed to a single function, something like this (untested code):


  queries_list = ['q1', 'q2', 'q3', ...]  
  
  @pytest.mark.parametrize('query', TestTpchNestedQuery.queries_list)
  def test_tpch_nested_query(self, query, vector):
      self.run_test_case('{0}-{1}'.format(self.get_workload(), query), vector)


A test run would look something like:

  test_params.py::test_tpch_nested_query[q1] PASSED
  test_params.py::test_tpch_nested_query[q2] PASSED
  test_params.py::test_tpch_nested_query[q3] PASSED
  etc...


This would greatly reduce the tedium of any future refactoring.

That said, I'm happy to +2 to this as is if you'd rather not tackle that. Just let me know
in a reply comment.


-- 
To view, visit http://gerrit.cloudera.org:8080/7891
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie067b201ae20b4f4c61a98be7ac1ec5a3f8febd8
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tim Wood <twood@cloudera.com>
Gerrit-Reviewer: Alex Behm <alex.behm@cloudera.com>
Gerrit-Reviewer: David Knupp <dknupp@cloudera.com>
Gerrit-Reviewer: Matthew Mulder <mmulder@cloudera.com>
Gerrit-Reviewer: Michael Brown <mikeb@cloudera.com>
Gerrit-Reviewer: Tim Wood <twood@cloudera.com>
Gerrit-HasComments: Yes

Mime
View raw message