Cloudera Enterprise 6.3.x | Other versions

Impala Reserved Words

This topic lists the reserved words in Impala.

A reserved word is one that cannot be used directly as an identifier. If you need to use it as an identifier, you must quote it with backticks. For example:
  • CREATE TABLE select (x INT): fails
  • CREATE TABLE `select` (x INT): succeeds

Because different database systems have different sets of reserved words, and the reserved words change from release to release, carefully consider database, table, and column names to ensure maximum compatibility between products and versions.

Also consider whether your object names are the same as any Hive keywords, and rename or quote any that conflict as you might switch between Impala and Hive when doing analytics and ETL. Consult the list of Hive keywords.

To future-proof your code, you should avoid additional words in case they become reserved words if Impala adds features in later releases. This kind of planning can also help to avoid name conflicts in case you port SQL from other systems that have different sets of reserved words. The Future Keyword column in the table below indicates those additional words that you should avoid for table, column, or other object names, even though they are not currently reserved by Impala.

The following is a summary of the process for deciding whether a particular SQL 2016 word is to be reserved in Impala.

  • By default, Impala targets to have the same list of reserved words as SQL 2016.
  • At the same time, to be compatible with earlier versions of Impala and to avoid breaking existing tables/workloads, Impala built-in function names are removed from the reserved words list, e.g. COUNT, AVG, as Impala generally does not need to reserve the names of built-in functions for parsing to work.
  • For those remaining SQL 2016 reserved words, if a word is likely to be in-use by users of older Impala versions and if there is a low chance of Impala needing to reserve that word in the future, then the word is not reserved.
  • Otherwise, the word is reserved in Impala.

List of Current Reserved Words

Keyword Reserved

in

SQL:2016

Reserved

in

Impala 2.12 and lower

Reserved

in

CDH 6.0 / Impala 3.0 and higher

Future Keyword
abs X      
acos X      
add   X X  
aggregate   X X  
all X X X  
allocate X   X  
alter X X X  
analytic   X X  
and X X X  
anti   X X  
any X   X  
api_version     X  
are X   X  
array X X X  
array_agg X   X  
array_max_cardinality X   X  
as X X X  
asc   X X  
asensitive X   X  
asin X      
asymmetric X   X  
at X   X  
atan X      
atomic X   X  
authorization X   X  
avg X      
avro   X X  
backup       X
begin X     X
begin_frame X   X  
begin_partition X   X  
between X X X  
bigint X X X  
binary X X X  
blob X   X  
block_size     X  
boolean X X X  
both X   X  
break       X
browse       X
bulk       X
by X X X  
cache        
cached   X X  
call X      
called X   X  
cardinality X   X  
cascade   X X  
cascaded X   X  
case X X X  
cast X X X  
ceil X      
ceiling X      
change   X X  
char X X X  
char_length X      
character X   X  
character_length X      
check X     X
checkpoint       X
class   X X  
classifier X      
clob X   X  
close X     X
close_fn     X  
clustered       X
coalesce X     X
collate X   X  
collect X   X  
column X X X  
columns   X X  
comment   X X  
commit X   X  
compression   X X  
compute   X X  
condition X   X  
conf        
connect X   X  
constraint X   X  
contains X   X  
continue       X
convert X   X  
copy X   X  
corr X   X  
corresponding X   X  
cos X      
cosh X      
count X      
covar_pop X   X  
covar_samp X   X  
create X X X  
cross X X X  
cube X   X  
cume_dist X      
current X X X  
current_catalog X      
current_date X   X  
current_default_transform_group X   X  
current_path X   X  
current_role X   X  
current_row X   X  
current_schema X   X  
current_time X   X  
current_timestamp X     X
current_transform_group_for_type X   X  
current_user X     X
cursor X   X  
cycle X   X  
data   X X  
database   X X  
databases   X X  
date X X X  
datetime   X X  
day X      
dayofweek        
dbcc       X
deallocate X   X  
dec X   X  
decfloat X   X  
decimal X X X  
declare X   X  
default X X X  
define X   X  
delete X X X  
delimited   X X  
dense_rank X      
deny       X
deref X   X  
desc   X X  
describe X X X  
deterministic X   X  
disconnect X   X  
disk       X
distinct X X X  
distributed       X
div   X X  
double X X X  
drop X X X  
dump       X
dynamic X   X  
each X   X  
element X   X  
else X X X  
empty X   X  
encoding   X X  
end X X X  
end-exec X   X  
end_frame X   X  
end_partition X   X  
equals X   X  
errlvl       X
escape X   X  
escaped   X X  
every X   X  
except X   X  
exchange        
exec X   X  
execute X   X  
exists X X X  
exit       X
exp X      
explain   X X  
extended   X X  
external X X X  
extract X      
false X X X  
fetch X   X  
fields   X X  
file       X
filefactor       X
fileformat   X X  
files   X X  
filter X   X  
finalize_fn     X  
first   X X  
first_value X      
float X X X  
floor X      
following   X X  
for X X X  
foreign X   X  
format   X X  
formatted   X X  
frame_row X   X  
free X   X  
freetext       X
from X X X  
full X X X  
function X X X  
functions   X X  
fusion X   X  
get X   X  
global X   X  
goto       X
grant X X X  
group X X X  
grouping X   X  
groups X   X  
hash   X X  
having X X X  
hold X   X  
holdlock       X
hour X      
identity X     X
if   X X  
ignore   X X  
ilike   X X  
import        
in X X X  
incremental   X X  
index       X
indicator X   X  
init_fn     X  
initial X   X  
inner X X X  
inout X   X  
inpath   X X  
insensitive X   X  
insert X X X  
int X X X  
integer X X X  
intermediate   X X  
intersect X   X  
intersection X   X  
interval X X X  
into X X X  
invalidate   X X  
iregexp   X X  
is X X X  
join X X X  
json_array X   X  
json_arrayagg X   X  
json_exists X   X  
json_object X   X  
json_objectagg X   X  
json_query X   X  
json_table X   X  
json_table_primitive X   X  
json_value X   X  
key       X
kill       X
kudu   X X  
lag X      
language X      
large X   X  
last   X X  
last_value X      
lateral X   X  
lead X      
leading X   X  
left X X X  
less        
like X X X  
like_regex X   X  
limit   X X  
lineno       X
lines   X X  
listagg X   X  
ln X      
load   X X  
local X   X  
localtime X      
localtimestamp X   X  
location   X X  
log X      
log10 X   X  
lower X      
macro        
map   X X  
match X   X  
match_number X   X  
match_recognize X   X  
matches X   X  
max X      
member X      
merge X   X  
merge_fn     X  
metadata   X X  
method X   X  
min X      
minute X      
mod X      
modifies X   X  
module X      
month X      
more        
multiset X   X  
national X   X  
natural X   X  
nchar X   X  
nclob X   X  
new X      
no X   X  
nocheck       X
nonclustered       X
none X   X  
normalize X   X  
not X X X  
nth_value X   X  
ntile X      
null X X X  
nullif X     X
nulls   X X  
numeric X   X  
occurrences_regex X   X  
octet_length X   X  
of X   X  
off       X
offset X X X  
offsets       X
old X      
omit X   X  
on X X X  
one X   X  
only X   X  
open X     X
option       X
or X X X  
order X X X  
out X   X  
outer X X X  
over X X X  
overlaps X   X  
overlay X   X  
overwrite   X X  
parameter X      
parquet   X X  
parquetfile   X X  
partialscan        
partition X X X  
partitioned   X X  
partitions   X X  
pattern X   X  
per X   X  
percent X   X  
percent_rank X      
percentile_cont X   X  
percentile_disc X   X  
period X      
pivot       X
plan       X
portion X   X  
position X   X  
position_regex X   X  
power X      
precedes X   X  
preceding   X X  
precision X     X
prepare X   X  
prepare_fn     X  
preserve        
primary X X X  
print       X
proc       X
procedure X   X  
produced   X X  
ptf X   X  
public       X
purge   X X  
raiseerror       X
range X X X  
rank X      
rcfile   X X  
read       X
reads X   X  
readtext       X
real X X X  
reconfigure       X
recover   X X  
recursive X   X  
reduce        
ref X   X  
references X   X  
referencing X   X  
refresh   X X  
regexp   X X  
regr_avgx X   X  
regr_avgy X   X  
regr_count X   X  
regr_intercept X   X  
regr_r2 X   X  
regr_slope X   X  
regr_sxx X   X  
regr_sxy X   X  
regr_syy X   X  
release X   X  
rename   X X  
repeatable   X X  
replace   X X  
replication   X X  
restore       X
restrict   X X  
result X      
return X     X
returns X X X  
revert       X
revoke X X X  
right X X X  
rlike   X X  
role   X X  
roles   X X  
rollback X   X  
rollup X   X  
row X X X  
row_number X      
rowcount       X
rows X X X  
rule       X
running X   X  
save       X
savepoint X   X  
schema   X X  
schemas   X X  
scope X   X  
scroll X   X  
search X   X  
second X      
securityaudit       X
seek X   X  
select X X X  
semi   X X  
sensitive X   X  
sequencefile   X X  
serdeproperties   X X  
serialize_fn     X  
session_user X     X
set X X X  
setuser       X
show X X X  
shutdown       X
similar X   X  
sin X      
sinh X      
skip X   X  
smallint X X X  
some X   X  
sort   X X  
specific X   X  
specifictype X   X  
sql X      
sqlexception X   X  
sqlstate X   X  
sqlwarning X   X  
sqrt X      
start X      
static X   X  
statistics       X
stats   X X  
stddev_pop X      
stddev_samp X      
stored   X X  
straight_join     X  
string   X X  
struct   X X  
submultiset X   X  
subset X   X  
substring X      
substring_regex X   X  
succeeds X   X  
sum X      
symbol   X X  
symmetric X   X  
system X      
system_time X   X  
system_user X   X  
table X X X  
tables   X X  
tablesample X X X  
tan X      
tanh X      
tblproperties   X X  
terminated   X X  
textfile   X X  
textsize       X
then X X X  
time X      
timestamp X X X  
timezone_hour X   X  
timezone_minute X   X  
tinyint   X X  
to X X X  
top       X
trailing X   X  
tran       X
transform        
translate X      
translate_regex X   X  
translation X   X  
treat X   X  
trigger X   X  
trim X      
trim_array X   X  
true X X X  
truncate X X X  
try_convert       X
uescape X   X  
unbounded   X X  
uncached   X X  
union X X X  
unique X   X  
uniquejoin        
unknown X X X  
unnest X   X  
unpivot       X
update X X X  
update_fn     X  
updatetext       X
upper X      
upsert   X X  
use   X X  
user X     X
using X X X  
utc_tmestamp        
value X      
value_of X   X  
values X X X  
var_pop X      
var_samp X      
varbinary X   X  
varchar X X X  
varying X   X  
versioning X   X  
view   X X  
views        
waitfor       X
when X X X  
whenever X   X  
where X X X  
while       X
width_bucket X   X  
window X   X  
with X X X  
within X   X  
without X   X  
writetext       X
year X      
Page generated August 29, 2019.