Support Questions
Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Innovation Accelerator group hub.

SemanticException at beeline when NULL

Contributor

Hi

When i do a SELECT null; at cli hive i get a good answer -> NULL

when i do this in beeline , i get

Error: Error while compiling statement: FAILED: SemanticException [Error 10004]: Line 1:7 Invalid table alias or column reference 'null': (possible column names are: ) (state=42000,code=10004)

this is working on one of my clusters but not in one of them

(hdp 2.6.1

Connected to: Apache Hive (version 2.1.0.2.6.1.0-129)
Driver: Hive JDBC (version 1.2.1000.2.6.1.0-129)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Beeline version 1.2.1000.2.6.1.0-129 by Apache Hive

)

i need this to work, since when i query

INSERT OVERWRITE TABLE schema.customer
SELECT CUST_ACCOUNTS
otherschema.CUST_ACCOUNT_ID,
NULL AS ACCOUNT
FROM xxxx ;


i really appreciate any help



1 ACCEPTED SOLUTION

Contributor

the fix is to set this: `set hive.support.sql11.reserved.keywords=true;`

View solution in original post

1 REPLY 1

Contributor

the fix is to set this: `set hive.support.sql11.reserved.keywords=true;`