This is an automated email from the ASF dual-hosted git repository.

stigahuang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git

commit 4ab0ce139d6d0dc88901be3b5a06ac096f329930
Author: Riza Suminto <[email protected]>
AuthorDate: Sat May 24 20:24:24 2025 -0700

    IMPALA-12162: (addendum) Move test_parallel_checksum
    
    test_parallel_checksum only need to run over single exec option
    dimension and text/none format. Leaving it in TestInsertQueries will
    exercise test_parallel_checksum over 'compression_codec' query
    option (in exhaustive builds). The CTAS fails when
    compression_codec != none since the target table is in text format
    and writing to compressed text table is not supported.
    
    This patch move test_parallel_checksum under
    TestInsertNonPartitionedTable that have such limited test dimension.
    Also add assertion that CTAS query is successful.
    
    Change-Id: I2b2bc34ae48a2355ee1e6f6e9e42da9076adf96b
    Reviewed-on: http://gerrit.cloudera.org:8080/22948
    Reviewed-by: Impala Public Jenkins <[email protected]>
    Tested-by: Impala Public Jenkins <[email protected]>
---
 tests/query_test/test_insert.py | 48 +++++++++++++++++++++--------------------
 1 file changed, 25 insertions(+), 23 deletions(-)

diff --git a/tests/query_test/test_insert.py b/tests/query_test/test_insert.py
index 0a8ef01da..f5b0af57b 100644
--- a/tests/query_test/test_insert.py
+++ b/tests/query_test/test_insert.py
@@ -172,29 +172,6 @@ class TestInsertQueries(TestInsertBase):
           test_file_vars={'$ORIGINAL_DB': ImpalaTestSuite
           .get_db_name_from_format(vector.get_value('table_format'))})
 
-  @pytest.mark.execute_serially
-  def test_parallel_checksum(self, vector, unique_database):
-    """Test that checksum is calculated in parallel when inserting into a table
-    with multiple files."""
-    # Ensure source table is loaded into catalogd.
-    self.execute_query("describe functional.alltypesaggmultifilesnopart")
-
-    exec_options = vector.get_value('exec_option')
-    exec_options['debug_action'] = 
'catalogd_load_file_checksums_delay:SLEEP@3000'
-    handle = self.execute_query_async("create table {0}.test as select * from "
-        "functional.alltypesaggmultifilesnopart".format(unique_database), 
exec_options)
-
-    # Test file has 4 files, so work can be distributed across 3 executors. 
This results
-    # in writing 3 new files in 3 threads.
-    catalogd = ImpalaCluster.get_e2e_test_cluster().catalogd.service
-    catalogd.wait_for_metric_value(
-        "catalog-server.metadata.file.num-loading-threads", 3)
-    catalogd.wait_for_metric_value(
-        "catalog-server.metadata.table.num-loading-file-metadata", 1)
-
-    # Stop the query and cleanup.
-    self.close_query(handle)
-
 
 class TestInsertQueriesWithDefaultFormat(TestInsertBase):
 
@@ -606,6 +583,31 @@ class TestInsertNonPartitionedTable(ImpalaTestSuite):
     result = self.client.execute("select f0 from {0}".format(table_name))
     assert result.data == ["2"]
 
+  @pytest.mark.execute_serially
+  def test_parallel_checksum(self, vector, unique_database):
+    """Test that checksum is calculated in parallel when inserting into a table
+    with multiple files."""
+    # Ensure source table is loaded into catalogd.
+    self.execute_query("describe functional.alltypesaggmultifilesnopart")
+
+    exec_options = vector.get_value('exec_option')
+    exec_options['debug_action'] = 
'catalogd_load_file_checksums_delay:SLEEP@3000'
+    handle = self.execute_query_async("create table {0}.test as select * from "
+        "functional.alltypesaggmultifilesnopart".format(unique_database), 
exec_options)
+
+    # Test file has 4 files, so work can be distributed across 3 executors. 
This results
+    # in writing 3 new files in 3 threads.
+    catalogd = ImpalaCluster.get_e2e_test_cluster().catalogd.service
+    catalogd.wait_for_metric_value(
+        "catalog-server.metadata.file.num-loading-threads", 3)
+    catalogd.wait_for_metric_value(
+        "catalog-server.metadata.table.num-loading-file-metadata", 1)
+    is_finished = self.client.wait_for_finished_timeout(handle, 30)
+    assert is_finished, "Query '{}' failed".format(handle.sql_stmt())
+
+    # Stop the query and cleanup.
+    self.close_query(handle)
+
 
 class TestUnsafeImplicitCasts(ImpalaTestSuite):
   """Test to check 'allow_unsafe_casts' query-option behaviour on insert 
statements."""

Reply via email to