[
https://issues.apache.org/jira/browse/IMPALA-13766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Riza Suminto updated IMPALA-13766:
----------------------------------
Description:
execute_wrapper is a function decorator that allows test method to pass vector
or table_format argument to any function annotated by it.
[https://github.com/apache/impala/blob/1b6395b8db09d271bd166bf501bdf7038d8be644/tests/common/impala_test_suite.py#L1021]
The main purpose for this decorator is to intercept those argument and changing
database pointed by Impala client, depending on given 'vector' or
'table_format' argument.
This is convenient, but have some problem:
# For test writer, it is not obvious that functions decorated by
execute_wrapper can actually accept optional 'vector' and 'table_format'
argument. Consequently, very few test method actually utilizing it.
# It does not revert client to point back to 'default' database.
# There is a potential confusion if both 'vector' and 'table_format' are
specified.
# If 'vector' is set, execute_wrapper only change database, but not applying
exec_option inside 'vector'. This is contradict with
execute_query_using_client() and execute_query_async_using_client() function.
# Its usage can largely replaced by run_test_case().
# Changing database is only needed if testing same table kind on different
file/table format.
But most tests calling the execute helper method use fully qualified table name
and does not require changing database.
was:
execute_wrapper is a function decorator that allows test method to pass vector
or table_format argument to any function annotated by it.
[https://github.com/apache/impala/blob/1b6395b8db09d271bd166bf501bdf7038d8be644/tests/common/impala_test_suite.py#L1021]
The main purpose for this decorator is to intercept those argument and changing
database pointed by Impala client, depending on given 'vector' or
'table_format' argument.
This is convenient, but have some problem:
# For test writer, it is not obvious that functions decorated by
execute_wrapper can actually accept optional 'vector' and 'table_format'
argument. Consequently, very few test method actually utilizing it.
# It does not revert client to point back to 'default' database.
# There is a potential confusion if both 'vector' and 'table_format' are
specified.
# If 'vector' is set, execute_wrapper only change database, but not applying
exec_option inside 'vector'. This is contradict with
execute_query_using_client() and execute_query_async_using_client() function.
# Its usage can largely replaced by run_test_case().
> Remove execute_wrapper decorator
> --------------------------------
>
> Key: IMPALA-13766
> URL: https://issues.apache.org/jira/browse/IMPALA-13766
> Project: IMPALA
> Issue Type: Improvement
> Components: Test
> Reporter: Riza Suminto
> Priority: Major
>
> execute_wrapper is a function decorator that allows test method to pass
> vector or table_format argument to any function annotated by it.
> [https://github.com/apache/impala/blob/1b6395b8db09d271bd166bf501bdf7038d8be644/tests/common/impala_test_suite.py#L1021]
> The main purpose for this decorator is to intercept those argument and
> changing database pointed by Impala client, depending on given 'vector' or
> 'table_format' argument.
> This is convenient, but have some problem:
> # For test writer, it is not obvious that functions decorated by
> execute_wrapper can actually accept optional 'vector' and 'table_format'
> argument. Consequently, very few test method actually utilizing it.
> # It does not revert client to point back to 'default' database.
> # There is a potential confusion if both 'vector' and 'table_format' are
> specified.
> # If 'vector' is set, execute_wrapper only change database, but not applying
> exec_option inside 'vector'. This is contradict with
> execute_query_using_client() and execute_query_async_using_client() function.
> # Its usage can largely replaced by run_test_case().
> # Changing database is only needed if testing same table kind on different
> file/table format.
> But most tests calling the execute helper method use fully qualified table
> name and does not require changing database.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]