def METHOD_NAME(exception):
    return (
        errors.exception_matches(
            exception,
            classname_with_package="impala.error.HiveServer2Error",
            exception_message_matcher_regex="^AnalysisException.*",
        )
        or errors.exception_matches(
            exception,
            classname_with_package="impala.error.HiveServer2Error",
            exception_message_matcher_regex="^ParseException: Syntax error.*",
        )
        or errors.exception_matches(
            exception,
            classname_with_package="impala.error.HiveServer2Error",
            exception_message_matcher_regex="^Could not compile regexp pattern.*",
        )
        or errors.exception_matches(
            exception,
            classname_with_package="impala.error.HiveServer2Error",
            exception_message_matcher_regex="^TableNotFoundException.*",
        )
        or errors.exception_matches(
            exception,
            classname_with_package="impala.error.HiveServer2Error",
            exception_message_matcher_regex=".*ArrayIndexOutOfBoundsException:.*",
        )
    )