mirror of
https://github.com/apache/impala.git
synced 2025-12-19 18:12:08 -05:00
Before this patch, ImpylaHS2Connection unconditionally opened a cursor (and HS2 session) as it connected, followed by running a "SET ALL" query to populate the default query options. This patch changes the behavior of ImpylaHS2Connection to open the default cursor only when querying is needed for the first time. This helps preserve assertions for a test that is sensitive about client connection, like IMPALA-13925. Default query options are now parsed from newly instantiated TQueryOptions object rather than issuing a "SET ALL" query or making BeeswaxService.get_default_configuration() RPC. Fix test_query_profile_contains_query_compilation_metadata_cached_event slightly by setting the 'sync_ddl' option because the test is flaky without it. Tweak test_max_hs2_sessions_per_user to run queries so that sessions will open. Deduplicate test cases between utc-timestamp-functions.test and local-timestamp-functions.test. Rename TestUtcTimestampFunctions to TestTimestampFunctions, and expand it to also tests local-timestamp-functions.test and file-formats-with-local-tz-conversion.test. The table_format is now contrained to 'test/none' because it is unnecessary to permute other table_format. Deprecate 'use_local_tz_for_unix_timestamp_conversions' in favor of query option with the same name. Filed IMPALA-13953 to update the documentation of 'use_local_tz_for_unix_timestamp_conversions' flag/option. Testing: Run and pass a few pytests such as: test_admission_controller.py test_observability.py test_runtime_filters.py test_session_expiration.py. test_set.py Change-Id: I9d5e3e5c11ad386b7202431201d1a4cff46cbff5 Reviewed-on: http://gerrit.cloudera.org:8080/22731 Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
18 lines
705 B
Plaintext
18 lines
705 B
Plaintext
====
|
|
---- QUERY
|
|
# Tests for unix_micros_to_utc_timestamp().
|
|
# Set timezone to CET to ensure that the local time is never UTC.
|
|
SET timezone=CET;
|
|
SELECT
|
|
unix_micros_to_utc_timestamp(NULL),
|
|
unix_micros_to_utc_timestamp(0),
|
|
unix_micros_to_utc_timestamp(1),
|
|
unix_micros_to_utc_timestamp(-17987443200 * 1000000),
|
|
unix_micros_to_utc_timestamp(253402300799 * 1000000),
|
|
unix_micros_to_utc_timestamp(253402300799 * 1000000 + 1),
|
|
unix_micros_to_utc_timestamp(-17987443200 * 1000000 - 1);
|
|
---- TYPES
|
|
TIMESTAMP,TIMESTAMP,TIMESTAMP,TIMESTAMP,TIMESTAMP,TIMESTAMP,TIMESTAMP
|
|
---- RESULTS
|
|
NULL,1970-01-01 00:00:00,1970-01-01 00:00:00.000001000,1400-01-01 00:00:00,9999-12-31 23:59:59,9999-12-31 23:59:59.000001000,NULL
|
|
==== |