Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-2714

metadata.test_ddl.TestDdlStatements.test_functions_ddl fails on repeated runs

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: Impala 2.3.0
    • Fix Version/s: None
    • Component/s: Infrastructure
    • Labels:

      Description

      The test fails when run a second time without restarting impalad because it uses the default database and doesn't clean up udfs.

      metadata.test_ddl.TestDdlStatements.test_functions_ddl[exec_option: {'batch_size': 0, 'num_nodes': 0, 'sync_ddl': 0, 'disable_codegen': False, 'abort_on_error': 1, 'exec_single_node_rows_threshold': 0} | table_format: text/none] (from pytest)
      

      Test log:

      Error Message
      
      assert Comparing QueryTestResults (expected vs actual):   'INT','fn()' == 'INT','fn()'   None != 'STRING','udf_update_test_create1()'   None != 'STRING','udf_update_test_create2()'   None != 'STRING','udf_update_test_drop()'   Number of rows returned (expected vs actual): 1 != 4
      Stacktrace
      
      metadata/test_ddl.py:347: in test_functions_ddl
          multiple_impalad=self._use_multiple_impalad(vector))
      common/impala_test_suite.py:235: in run_test_case
          pytest.config.option.update_results)
      common/test_result_verifier.py:345: in verify_raw_results
          VERIFIER_MAP[verifier](expected, actual)
      common/test_result_verifier.py:197: in verify_query_result_is_equal
          assert expected_results == actual_results
      E   assert Comparing QueryTestResults (expected vs actual):
      E     'INT','fn()' == 'INT','fn()'
      E     None != 'STRING','udf_update_test_create1()'
      E     None != 'STRING','udf_update_test_create2()'
      E     None != 'STRING','udf_update_test_drop()'
      E     Number of rows returned (expected vs actual): 1 != 4
      Standard Error
      
      -- executing against localhost:21000
      use default;
      
      SET sync_ddl=1;
      -- executing against localhost:21000
      drop database if exists `ddl_test_db` cascade;
      
      -- executing against localhost:21000
      use default;
      
      SET sync_ddl=1;
      -- executing against localhost:21000
      drop database if exists `ddl_purge_db` cascade;
      
      -- executing against localhost:21000
      use default;
      
      SET sync_ddl=1;
      -- executing against localhost:21000
      drop database if exists `alter_table_test_db` cascade;
      
      -- executing against localhost:21000
      use default;
      
      SET sync_ddl=1;
      -- executing against localhost:21000
      drop database if exists `alter_table_test_db2` cascade;
      
      -- executing against localhost:21000
      use default;
      
      SET sync_ddl=1;
      -- executing against localhost:21000
      drop database if exists `function_ddl_test` cascade;
      
      -- executing against localhost:21000
      use default;
      
      SET sync_ddl=1;
      -- executing against localhost:21000
      drop database if exists `udf_test` cascade;
      
      -- executing against localhost:21000
      use default;
      
      SET sync_ddl=1;
      -- executing against localhost:21000
      drop database if exists `data_src_test` cascade;
      
      -- executing against localhost:21000
      use default;
      
      SET sync_ddl=1;
      -- executing against localhost:21000
      drop database if exists `truncate_table_test_db` cascade;
      
      -- executing against localhost:21000
      use default;
      
      SET sync_ddl=1;
      -- executing against localhost:21000
      drop database if exists `test_db` cascade;
      
      -- executing against localhost:21000
      use default;
      
      SET sync_ddl=1;
      -- executing against localhost:21000
      drop database if exists `alter_purge_db` cascade;
      
      MainThread: Starting new HTTP connection (1): 0.0.0.0
      MainThread: Starting new HTTP connection (1): 0.0.0.0
      MainThread: Starting new HTTP connection (1): 0.0.0.0
      -- connecting to: localhost:21000
      SET sync_ddl=1;
      -- executing against localhost:21000
      create database function_ddl_test location '/test-warehouse/function_ddl_test.db';
      
      -- closing connection to: localhost:21000
      -- executing against localhost:21000
      use function_ddl_test;
      
      SET batch_size=0;
      SET num_nodes=0;
      SET sync_ddl=0;
      SET disable_codegen=False;
      SET abort_on_error=1;
      SET exec_single_node_rows_threshold=0;
      -- executing against localhost:21000
      drop function if exists default.fn();
      
      -- executing against localhost:21000
      
      drop function if exists function_ddl_test.fn();
      
      -- executing against localhost:21000
      
      drop function if exists function_ddl_test.fn(int);
      
      -- executing against localhost:21000
      
      drop function if exists function_ddl_test.fn(int, string);
      
      -- executing against localhost:21000
      
      drop function if exists function_ddl_test.fn(string, int);
      
      -- executing against localhost:21000
      
      drop function if exists function_ddl_test.fn2(int);
      
      -- executing against localhost:21000
      
      drop function if exists function_ddl_test.fn2(int, string);
      
      -- executing against localhost:21000
      
      drop function if exists function_ddl_test.fn_var_arg(int...);
      
      -- executing against localhost:21000
      
      drop function if exists function_ddl_test.agg_fn(int);
      
      -- executing against localhost:21000
      
      drop function if exists function_ddl_test.agg_fn(int, string);
      
      MainThread: No results found. Skipping verification
      -- executing against localhost:21000
      show functions in function_ddl_test;
      
      -- executing against localhost:21000
      show aggregate functions in function_ddl_test;
      
      -- executing against localhost:21000
      create function default.fn() RETURNS int
      LOCATION '/test-warehouse/libTestUdfs.so' SYMBOL='Fn';
      
      MainThread: No results found. Skipping verification
      -- executing against localhost:21000
      create function function_ddl_test.fn() RETURNS int
      LOCATION '/test-warehouse/libTestUdfs.so' SYMBOL='Fn';
      
      MainThread: No results found. Skipping verification
      -- executing against localhost:21000
      create function function_ddl_test.fn(int) RETURNS double
      LOCATION '/test-warehouse/libTestUdfs.so' SYMBOL='Fn';
      
      MainThread: No results found. Skipping verification
      -- executing against localhost:21000
      create function function_ddl_test.fn(int, string) RETURNS int
      LOCATION '/test-warehouse/libTestUdfs.so' SYMBOL='Fn';
      
      MainThread: No results found. Skipping verification
      -- executing against localhost:21000
      create function function_ddl_test.fn(string, int) RETURNS int
      LOCATION '/test-warehouse/libTestUdfs.so' SYMBOL='Fn';
      
      MainThread: No results found. Skipping verification
      -- executing against localhost:21000
      create function function_ddl_test.fn2(int) RETURNS int
      LOCATION '/test-warehouse/libTestUdfs.so' SYMBOL='Fn2';
      
      MainThread: No results found. Skipping verification
      -- executing against localhost:21000
      create function function_ddl_test.fn2(int, string) RETURNS int
      LOCATION '/test-warehouse/libTestUdfs.so' SYMBOL='Fn2';
      
      MainThread: No results found. Skipping verification
      -- executing against localhost:21000
      create function function_ddl_test.fn_var_arg(int...) RETURNS int
      LOCATION '/test-warehouse/libTestUdfs.so' SYMBOL='VarSum';
      
      MainThread: No results found. Skipping verification
      -- executing against localhost:21000
      create aggregate function function_ddl_test.agg_fn(int) RETURNS bigint
      LOCATION '/test-warehouse/libudasample.so' UPDATE_FN='CountUpdate';
      
      MainThread: No results found. Skipping verification
      -- executing against localhost:21000
      create aggregate function function_ddl_test.agg_fn(int, string) RETURNS int
      LOCATION '/test-warehouse/libTestUdas.so' UPDATE_FN='TwoArgUpdate';
      
      MainThread: No results found. Skipping verification
      -- executing against localhost:21000
      show functions in default;
      
      MainThread: Comparing QueryTestResults (expected vs actual):
      'INT','fn()' == 'INT','fn()'
      None != 'STRING','udf_update_test_create1()'
      None != 'STRING','udf_update_test_create2()'
      None != 'STRING','udf_update_test_drop()'
      Number of rows returned (expected vs actual): 1 != 4
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                hsheinblatt_impala_e511 Harrison Sheinblatt
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: