impala-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Behm (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-3491: Use unique database fixture in test
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

Patch Set 1:

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 L310 and following.
File tests/metadata/

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}/' 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.
File tests/metadata/

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
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: Idf667dd5e960768879c019e2037cf48ad4e4241b
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Alex Behm <>
Gerrit-Reviewer: Alex Behm <>
Gerrit-Reviewer: Michael Brown <>
Gerrit-HasComments: Yes

View raw message