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 Reserved Words

KeywordReserved

in

SQL:2016

Reserved

in

Impala 2.12 and lower

Reserved

in

Impala 3.0 and higher

Future Keyword
absX   
acosX   
add XX 
aggregate XX 
allXXX 
allocateX X 
alterXXX 
analytic XX 
andXXX 
anti XX 
anyX X 
api_version  X 
areX X 
arrayXXX 
array_aggX X 
array_max_cardinalityX X 
asXXX 
asc XX 
asensitiveX X 
asinX   
asymmetricX X 
atX X 
atanX   
atomicX X 
authorizationX X 
avgX   
avro XX 
backup   X
beginX  X
begin_frameX X 
begin_partitionX X 
betweenXXX 
bigintXXX 
binaryXXX 
blobX X 
block_size  X 
booleanXXX 
bothX X 
break   X
browse   X
bulk   X
byXXX 
cache    
cached XX 
callX   
calledX X 
cardinalityX X 
cascade XX 
cascadedX X 
caseXXX 
castXXX 
ceilX   
ceilingX   
change XX 
charXXX 
char_lengthX   
characterX X 
character_lengthX   
checkX  X
checkpoint   X
class XX 
classifierX   
clobX X 
closeX  X
close_fn  X 
clustered   X
coalesceX  X
collateX X 
collectX X 
columnXXX 
columns XX 
comment XX 
commitX X 
compression XX 
compute XX 
conditionX X 
conf    
connectX X 
constraintX X 
containsX X 
continue   X
convertX X 
copyX X 
corrX X 
correspondingX X 
cosX   
coshX   
countX   
covar_popX X 
covar_sampX X 
createXXX 
crossXXX 
cubeX X 
cume_distX   
currentXXX 
current_catalogX   
current_dateX X 
current_default_transform_groupX X 
current_pathX X 
current_roleX X 
current_rowX X 
current_schemaX X 
current_timeX X 
current_timestampX  X
current_transform_group_for_typeX X 
current_userX  X
cursorX X 
cycleX X 
data XX 
database XX 
databases XX 
dateXXX 
datetime XX 
dayX   
dayofweek    
dbcc   X
deallocateX X 
decX X 
decfloatX X 
decimalXXX 
declareX X 
defaultXXX 
defineX X 
deleteXXX 
delimited XX 
dense_rankX   
deny   X
derefX X 
desc XX 
describeXXX 
deterministicX X 
disconnectX X 
disk   X
distinctXXX 
distributed   X
div XX 
doubleXXX 
dropXXX 
dump   X
dynamicX X 
eachX X 
elementX X 
elseXXX 
emptyX X 
encoding XX 
endXXX 
end-execX X 
end_frameX X 
end_partitionX X 
equalsX X 
errlvl   X
escapeX X 
escaped XX 
everyX X 
exceptX X 
exchange    
execX X 
executeX X 
existsXXX 
exit   X
expX   
explain XX 
extended XX 
externalXXX 
extractX   
falseXXX 
fetchX X 
fields XX 
file   X
filefactor   X
fileformat XX 
files XX 
filterX X 
finalize_fn  X 
first XX 
first_valueX   
floatXXX 
floorX   
following XX 
forXXX 
foreignX X 
format XX 
formatted XX 
frame_rowX X 
freeX X 
freetext   X
fromXXX 
fullXXX 
functionXXX 
functions XX 
fusionX X 
getX X 
globalX X 
goto   X
grantXXX 
groupXXX 
groupingX X 
groupsX X 
hash XX 
havingXXX 
holdX X 
holdlock   X
hourX   
identityX  X
if XX 
ignore XX 
ilike XX 
import    
inXXX 
incremental XX 
index   X
indicatorX X 
init_fn  X 
initialX X 
innerXXX 
inoutX X 
inpath XX 
insensitiveX X 
insertXXX 
intXXX 
integerXXX 
intermediate XX 
intersectX X 
intersectionX X 
intervalXXX 
intoXXX 
invalidate XX 
iregexp XX 
isXXX 
joinXXX 
json_arrayX X 
json_arrayaggX X 
json_existsX X 
json_objectX X 
json_objectaggX X 
json_queryX X 
json_tableX X 
json_table_primitiveX X 
json_valueX X 
key   X
kill   X
kudu XX 
lagX   
languageX   
largeX X 
last XX 
last_valueX   
lateralX X 
leadX   
leadingX X 
leftXXX 
less    
likeXXX 
like_regexX X 
limit XX 
lineno   X
lines XX 
listaggX X 
lnX   
load XX 
localX X 
localtimeX   
localtimestampX X 
location XX 
logX   
log10X X 
lowerX   
macro    
map XX 
matchX X 
match_numberX X 
match_recognizeX X 
matchesX X 
maxX   
memberX   
mergeX X 
merge_fn  X 
metadata XX 
methodX X 
minX   
minuteX   
modX   
modifiesX X 
moduleX   
monthX   
more    
multisetX X 
nationalX X 
naturalX X 
ncharX X 
nclobX X 
newX   
noX X 
nocheck   X
nonclustered   X
noneX X 
normalizeX X 
notXXX 
nth_valueX X 
ntileX   
nullXXX 
nullifX  X
nulls XX 
numericX X 
occurrences_regexX X 
octet_lengthX X 
ofX X 
off   X
offsetXXX 
offsets   X
oldX   
omitX X 
onXXX 
oneX X 
onlyX X 
openX  X
option   X
orXXX 
orderXXX 
outX X 
outerXXX 
overXXX 
overlapsX X 
overlayX X 
overwrite XX 
parameterX   
parquet XX 
parquetfile XX 
partialscan    
partitionXXX 
partitioned XX 
partitions XX 
patternX X 
perX X 
percentX X 
percent_rankX   
percentile_contX X 
percentile_discX X 
periodX   
pivot   X
plan   X
portionX X 
positionX X 
position_regexX X 
powerX   
precedesX X 
preceding XX 
precisionX  X
prepareX X 
prepare_fn  X 
preserve    
primaryXXX 
print   X
proc   X
procedureX X 
produced XX 
ptfX X 
public   X
purge XX 
raiseerror   X
rangeXXX 
rankX   
rcfile XX 
read   X
readsX X 
readtext   X
realXXX 
reconfigure   X
recover XX 
recursiveX X 
reduce    
refX X 
referencesX X 
referencingX X 
refresh XX 
regexp XX 
regr_avgxX X 
regr_avgyX X 
regr_countX X 
regr_interceptX X 
regr_r2X X 
regr_slopeX X 
regr_sxxX X 
regr_sxyX X 
regr_syyX X 
releaseX X 
rename XX 
repeatable XX 
replace XX 
replication XX 
restore   X
restrict XX 
resultX   
returnX  X
returnsXXX 
revert   X
revokeXXX 
rightXXX 
rlike XX 
role XX 
roles XX 
rollbackX X 
rollupX X 
rowXXX 
row_numberX   
rowcount   X
rowsXXX 
rule   X
runningX X 
save   X
savepointX X 
schema XX 
schemas XX 
scopeX X 
scrollX X 
searchX X 
secondX   
securityaudit   X
seekX X 
selectXXX 
semi XX 
sensitiveX X 
sequencefile XX 
serdeproperties XX 
serialize_fn  X 
session_userX  X
setXXX 
setuser   X
showXXX 
shutdown   X
similarX X 
sinX   
sinhX   
skipX X 
smallintXXX 
someX X 
sort XX 
specificX X 
specifictypeX X 
sqlX   
sqlexceptionX X 
sqlstateX X 
sqlwarningX X 
sqrtX   
startX   
staticX X 
statistics   X
stats XX 
stddev_popX   
stddev_sampX   
stored XX 
straight_join  X 
string XX 
struct XX 
submultisetX X 
subsetX X 
substringX   
substring_regexX X 
succeedsX X 
sumX   
symbol XX 
symmetricX X 
systemX   
system_timeX X 
system_userX X 
tableXXX 
tables XX 
tablesampleXXX 
tanX   
tanhX   
tblproperties XX 
terminated XX 
textfile XX 
textsize   X
thenXXX 
timeX   
timestampXXX 
timezone_hourX X 
timezone_minuteX X 
tinyint XX 
toXXX 
top   X
trailingX X 
tran   X
transform    
translateX   
translate_regexX X 
translationX X 
treatX X 
triggerX X 
trimX   
trim_arrayX X 
trueXXX 
truncateXXX 
try_convert   X
uescapeX X 
unbounded XX 
uncached XX 
unionXXX 
uniqueX X 
uniquejoin    
unknownXXX 
unnestX X 
unpivot   X
updateXXX 
update_fn  X 
updatetext   X
upperX   
upsert XX 
use XX 
userX  X
usingXXX 
utc_tmestamp    
valueX   
value_ofX X 
valuesXXX 
var_popX   
var_sampX   
varbinaryX X 
varcharXXX 
varyingX X 
versioningX X 
view XX 
views    
waitfor   X
whenXXX 
wheneverX X 
whereXXX 
while   X
width_bucketX X 
windowX X 
withXXX 
withinX X 
withoutX X 
writetext   X
yearX