Aliasing tables
Hive 3 in CDP follows the SQL 11 standard regarding a table identifier, which cannot begin with a numeral.
Before Upgrade to CDP
In CDH, using a table alias that begins with a numeral did not cause an error:
select * from db.t1 5d;
After Upgrade to CDP
In CDP, using a table alias that begins with a numeral causes an error:
select * from db.t1 5d;
Output looks something like this:
Error: Error while compiling statement: ...
Action Required
Perform either one of the following workarounds:
- Rename the table that begins with a numeral to conform to the SQL 11 standard.
- Enclose the table that begins with a numeral in backticks.
For more information, see Handling table reference syntax.