impala-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Behm (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-3491: Use unique database fixture in test ddl.py.
Date Tue, 30 Aug 2016 05:01:06 GMT
Alex Behm has posted comments on this change.

Change subject: IMPALA-3491: Use unique database fixture in test_ddl.py.
......................................................................


Patch Set 1:

(5 comments)

http://gerrit.cloudera.org:8080/#/c/4155/1/testdata/workloads/functional-query/queries/QueryTest/alter-table.test
File testdata/workloads/functional-query/queries/QueryTest/alter-table.test:

PS1, Line 263: create external table t_part (i int) partitioned by (j int, s string)
             : location '$FILESYSTEM_PREFIX/test-warehouse/$DATABASE.db/t_part_tmp';
             : alter table t_part add partition (j=cast(2-1 as int), s='2012');
             : alter table t_part add if not exists partition (j=1, s='2012');
             : alter table t_part add if not exists partition (j=1, s='2012/withslash');
             : alter table t_part add partition (j=1, s=substring('foo2013bar', 4, 8));
> Will the test framework adequately fail the test if one of these reports an
If any of thee queries fail, the client throws a Beeswax exception which is raised up to run_test_case,
so I'd say the test will fail adequately.

For confirmation, you can look at impala_test_suite.py L310 and following.


http://gerrit.cloudera.org:8080/#/c/4155/1/tests/metadata/test_ddl.py
File tests/metadata/test_ddl.py:

PS1, Line 234:     assert "ddl_test_db" not in self.all_db_names()
> (I found this by searching for the removed members of TEST_DBS.)
Nice catch! Fixed.


PS1, Line 255:     unique_dabatase2 = unique_database + '2'
             :     self._create_db(unique_dabatase2, sync=True)
> Clever, but it's unfortunate you have to do this. I'm not aware of pytest b
Sure, added a new num_dbs param.


PS1, Line 328:     create_fn_stmt = "create function {0}.f() returns int "\
             :                      "location '{1}/libTestUdfs.so' symbol='NoArgs'"\
             :                      .format(unique_database, WAREHOUSE)
> Tip for here and elsewhere: You can join strings across lines without \ if 
Fixed here and in some other places in this file.

I'm not really sure about our preferred style here for these string + format is, so please
keep pointing out examples if you want me to fix them.


http://gerrit.cloudera.org:8080/#/c/4155/1/tests/metadata/test_hms_integration.py
File tests/metadata/test_hms_integration.py:

Line 55:   def test_sanity(self, vector):
> Not your changes, but in case you want to improve: This test doesn't have m
I'm not sure our execute_query_expect_success even makes sense, at least for Beeswax clients.
If a query fails the client throws, so the assert is likewise never executed.

What do you think?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idf667dd5e960768879c019e2037cf48ad4e4241b
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Alex Behm <alex.behm@cloudera.com>
Gerrit-Reviewer: Alex Behm <alex.behm@cloudera.com>
Gerrit-Reviewer: Michael Brown <mikeb@cloudera.com>
Gerrit-HasComments: Yes

Mime
View raw message