### Description

#27647 has introduced filtering for invalid schemas in Hive hook based on the characters `;` and `!`. I'm wondering if a more generic filtering could be introduced, e.g. one that adheres to the regex `[^a-z0-9_]`, since Hive schemas (and table names) can only contain alphanumeric characters and the character `_`.

Note: since the Hive metastore [stores schemas and tables in lowercase](https://stackoverflow.com/questions/57181316/how-to-keep-column-names-in-camel-case-in-hive/57183048#57183048), checking against `[^a-z0-9_]` is probably better than `[^a-zA-Z0-9_]`.

### Use case/motivation

Ensure that Hive schemas used in `apache-airflow-providers-apache-hive` hooks contain no invalid characters.

### Related issues

_No response_

### Are you willing to submit a PR?

- [X] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)

hook = MockHiveServer2Hook()
        hook._get_results = mock.MagicMock(
            return_value=iter(
                [
                    [
                        ("hive_server_hook.a", "INT_TYPE", None, None, None, None, True),
                        ("hive_server_hook.b", "INT_TYPE", None, None, None, None, True),
                    ],
                    (1, 1),
                    (2, 2),
                ]
            )
        )
        query = f"SELECT * FROM {self.table}"
        csv_filepath = "query_results.csv"
        hook.to_csv(
            query,
            csv_filepath,
            schema=self.database,
            delimiter=",",
            lineterminator="\n",
            output_header=True,
            fetch_size=2,
        )
        df = pd.read_csv(csv_filepath, sep=",")
        assert df.columns.tolist() == self.columns
        assert df[self.columns[0]].values.tolist() == [1, 2]
        assert len(df) == 2
    def test_multi_statements(self):