-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
Search before asking
- I had searched in the issues and found no similar issues.
Version
2.1.x, 3.0.x
What's Wrong?
When querying Hive views through External Catalog, queries fail due to case sensitivity issues. Hive view definitions often contain uppercase identifiers, but Doris processes them case-sensitively, causing table/column not found errors.
What You Expected?
Hive views should be queryable through Doris External Catalog regardless of the case used in the original view definition, maintaining compatibility with Hive's case-insensitive behavior.
How to Reproduce?
- Create a Hive view with uppercase identifiers:
-- In Hive
CREATE VIEW test_db.TEST_VIEW AS
SELECT COL1, COL2 FROM TEST_DB.TEST_TABLE WHERE COL1 = 'value';- Configure Doris External Catalog:
-- In Doris
CREATE CATALOG hive_catalog PROPERTIES (
"type"="hms",
"hive.metastore.uris" = "thrift://hive-metastore:9083"
);- Query the view through Doris:
-- This fails with table not found error
SELECT * FROM hive_catalog.test_db.TEST_VIEW;Error:
ERROR 1105 (HY000): [ANALYSIS_ERROR]Unknown table 'TEST_TABLE' in database 'test_db'
Root Cause:
Hive stores view SQL with uppercase identifiers, but Doris processes them case-sensitively, causing table lookup failures.
Expected Fix:
The view should work after normalizing identifiers to lowercase while preserving quoted strings.
Anything Else?
Impact:
- Affects users migrating from Hive to Doris
- Breaks compatibility with existing Hive view definitions
- Inconsistent behavior between direct table access and view access
Workaround:
Currently, users need to recreate Hive views with lowercase identifiers, which is not always feasible in production environments.
Related Components:
- External Catalog (HMS)
- Nereids Query Planner
- View Processing
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct