diff --git a/projects/vdk-plugins/vdk-impala/src/vdk/plugin/impala/impala_error_classifier.py b/projects/vdk-plugins/vdk-impala/src/vdk/plugin/impala/impala_error_classifier.py index f92c6fe948..4ef5707c65 100644 --- a/projects/vdk-plugins/vdk-impala/src/vdk/plugin/impala/impala_error_classifier.py +++ b/projects/vdk-plugins/vdk-impala/src/vdk/plugin/impala/impala_error_classifier.py @@ -20,6 +20,7 @@ def is_impala_user_error(received_exception): or _is_quota_exceeded(received_exception) or _is_other_query_error(received_exception) or _is_property_unsupported_value_error(received_exception) + or _is_udf_hive_server2_error(received_exception) ) @@ -119,3 +120,11 @@ def _is_quota_exceeded(exception): classname_with_package="impala.error.OperationalError", exception_message_matcher_regex=".*DiskSpace quota of .* is exceeded.*", ) + + +def _is_udf_hive_server2_error(exception): + return errors.exception_matches( + exception, + classname_with_package="impala.error.HiveServer2Error", + exception_message_matcher_regex=".*UDF ERROR:.*", + ) diff --git a/projects/vdk-plugins/vdk-impala/tests/test_error_classifier.py b/projects/vdk-plugins/vdk-impala/tests/test_error_classifier.py index 7fc31c04bf..2fc2d44660 100644 --- a/projects/vdk-plugins/vdk-impala/tests/test_error_classifier.py +++ b/projects/vdk-plugins/vdk-impala/tests/test_error_classifier.py @@ -92,3 +92,10 @@ def test_user_error_classification(self): ) ) ) + self.assertTrue( + is_impala_user_error( + HiveServer2Error( + "impala.error.HiveServer2Error: UDF ERROR: Decimal expression overflowed" + ) + ) + )