Michael O'Kane created HIVE-15198: ------------------------------------- Summary: Capitalisation of columns/aliases is lost in query results Key: HIVE-15198 URL: https://issues.apache.org/jira/browse/HIVE-15198 Project: Hive Issue Type: Bug Reporter: Michael O'Kane
RDBMS systems, while generally case-insensitive, retain case information for table metadata, e.g. under postgres {code} root=# create table foo as select 1 as "FOO" from users; SELECT 7 root=# select * from foo; FOO ----- 1 1 ... {code} Hive displays a deviation from this behaviour in that: 1) Persisted table metadata (i.e. from CREATE/ALTER) table is physically coerced to lower case upon writing to the DB 2) Transient metadata (i.e. column aliases) are displayed as lower case, regardless of the case provided by the query. In hive: {code}0: jdbc:hive2://localhost:10000/default> create table foo as select 1 as FOO from users; ... 0: jdbc:hive2://localhost:10000/default> select * from foo; +----------+--+ | foo.foo | +----------+--+ | 1 | | 1 | ... 0: jdbc:hive2://localhost:10000/default> select foo as FOO from foo; +------+--+ | foo | +------+--+ | 1 | | 1 | {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)