Files
impala/tests/unittests/test_command.py
Riza Suminto c08aff420d IMPALA-13672: Migrate query_test/test_kudu.py to use hs2 protocol
This patch migrate query_test/test_kudu.py to use hs2 client protocol.
Here are the steps taken:

- Override default_test_protocol() to return 'hs2'.
  See documentation in ImpalaTestSuite about what this method does.
- Remove usage of deprecated cursor and unique_cursor fixture.
- Replace all direct ImpalaTestSuite.client usage with helper
  function call such as execute_query() or execute_query_using_vector().
- Remove all "SET" query invocation and replace it with passing
  exec_option dictionary to helper method.
- Replace veryfing kudu modified / inserted rows from reading query
  output to reading runtime profile counters.
- Add HS2_TYPES section at test cases where only TYPES exist.
- Remove all drop_impala_table_after_context() calls and replace it with
  proper use of unique_database fixture.

KuduTestSuite is fixed with hs2 protocol dimension. Meanwhile,
CustomKuduTest is fixed to use beeswax protocol dimension until proper
migration can be done.

Added following convenience methods:
- ImpalaTestSuite.default_test_protocol() to allow individual test
  class to override its default test procol.
- ImpylaHS2ResultSet.tuples() to access the raw HS2 result set that is
  a list of tuples.

This patch also added several literal constants around test vector
dimension to help with traceability.

Fixed a bug where "SHOW PARTITIONS" via hs2 over kudu table will shows
NULL number of #Replicas because TResultRowBuilder does not have
overload for int type value. Adjust numFiles variable inside
HdfsTable.getTableStats() from int to long to match Type.BIGINT of
column '#Files'.

Fixed py.test classes that does not inherit BaseTestSuite. Fixed flake8
issues in test_statestore.py.

Testing:
- Run and pass all tests extended from KuduTestSuite in exhaustive mode.

Change-Id: I5f38baf5a0bbde1a1ad0bb4666c300f4f3cabd33
Reviewed-on: http://gerrit.cloudera.org:8080/22358
Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2025-02-07 11:57:59 +00:00

1.9 KiB