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
addXX
aggregateXX
allXXX
allocateXX
alterXXX
analyticXX
andXXX
antiXX
anyXX
api_versionX
areXX
arrayXXX
array_aggXX
array_max_cardinalityXX
asXXX
ascXX
asensitiveXX
asinX
asymmetricXX
atXX
atanX
atomicXX
authorizationXX
avgX
avroXX
backupX
beginXX
begin_frameXX
begin_partitionXX
betweenXXX
bigintXXX
binaryXXX
blobXX
block_sizeX
booleanXXX
bothXX
breakX
browseX
bulkX
byXXX
cache
cachedXX
callX
calledXX
cardinalityXX
cascadeXX
cascadedXX
caseXXX
castXXX
ceilX
ceilingX
changeXX
charXXX
char_lengthX
characterXX
character_lengthX
checkXX
checkpointX
classXX
classifierX
clobXX
closeXX
close_fnX
clusteredX
coalesceXX
collateXX
collectXX
columnXXX
columnsXX
commentXX
commitXX
compressionXX
computeXX
conditionXX
conf
connectXX
constraintXX
containsXX
continueX
convertXX
copyXX
corrXX
correspondingXX
cosX
coshX
countX
covar_popXX
covar_sampXX
createXXX
crossXXX
cubeXX
cume_distX
currentXXX
current_catalogX
current_dateXX
current_default_transform_groupXX
current_pathXX
current_roleXX
current_rowXX
current_schemaXX
current_timeXX
current_timestampXX
current_transform_group_for_typeXX
current_userXX
cursorXX
cycleXX
dataXX
databaseXX
databasesXX
dateXXX
datetimeXX
dayX
dayofweek
dbccX
deallocateXX
decXX
decfloatXX
decimalXXX
declareXX
defaultXXX
defineXX
deleteXXX
delimitedXX
dense_rankX
denyX
derefXX
descXX
describeXXX
deterministicXX
disconnectXX
diskX
distinctXXX
distributedX
divXX
doubleXXX
dropXXX
dumpX
dynamicXX
eachXX
elementXX
elseXXX
emptyXX
encodingXX
endXXX
end-execXX
end_frameXX
end_partitionXX
equalsXX
errlvlX
escapeXX
escapedXX
everyXX
exceptXX
exchange
execXX
executeXX
existsXXX
exitX
expX
explainXX
extendedXX
externalXXX
extractX
falseXXX
fetchXX
fieldsXX
fileX
filefactorX
fileformatXX
filesXX
filterXX
finalize_fnX
firstXX
first_valueX
floatXXX
floorX
followingXX
forXXX
foreignXX
formatXX
formattedXX
frame_rowXX
freeXX
freetextX
fromXXX
fullXXX
functionXXX
functionsXX
fusionXX
getXX
globalXX
gotoX
grantXXX
groupXXX
groupingXX
groupsXX
hashXX
havingXXX
holdXX
holdlockX
hourX
identityXX
ifXX
ignoreXX
ilikeXX
import
inXXX
incrementalXX
indexX
indicatorXX
init_fnX
initialXX
innerXXX
inoutXX
inpathXX
insensitiveXX
insertXXX
intXXX
integerXXX
intermediateXX
intersectXX
intersectionXX
intervalXXX
intoXXX
invalidateXX
iregexpXX
isXXX
joinXXX
json_arrayXX
json_arrayaggXX
json_existsXX
json_objectXX
json_objectaggXX
json_queryXX
json_tableXX
json_table_primitiveXX
json_valueXX
keyX
killX
kuduXX
lagX
languageX
largeXX
lastXX
last_valueX
lateralXX
leadX
leadingXX
leftXXX
less
likeXXX
like_regexXX
limitXX
linenoX
linesXX
listaggXX
lnX
loadXX
localXX
localtimeX
localtimestampXX
locationXX
logX
log10XX
lowerX
macro
mapXX
matchXX
match_numberXX
match_recognizeXX
matchesXX
maxX
memberX
mergeXX
merge_fnX
metadataXX
methodXX
minX
minuteX
modX
modifiesXX
moduleX
monthX
more
multisetXX
nationalXX
naturalXX
ncharXX
nclobXX
newX
noXX
nocheckX
nonclusteredX
noneXX
normalizeXX
notXXX
nth_valueXX
ntileX
nullXXX
nullifXX
nullsXX
numericXX
occurrences_regexXX
octet_lengthXX
ofXX
offX
offsetXXX
offsetsX
oldX
omitXX
onXXX
oneXX
onlyXX
openXX
optionX
orXXX
orderXXX
outXX
outerXXX
overXXX
overlapsXX
overlayXX
overwriteXX
parameterX
parquetXX
parquetfileXX
partialscan
partitionXXX
partitionedXX
partitionsXX
patternXX
perXX
percentXX
percent_rankX
percentile_contXX
percentile_discXX
periodX
pivotX
planX
portionXX
positionXX
position_regexXX
powerX
precedesXX
precedingXX
precisionXX
prepareXX
prepare_fnX
preserve
primaryXXX
printX
procX
procedureXX
producedXX
ptfXX
publicX
purgeXX
raiseerrorX
rangeXXX
rankX
rcfileXX
readX
readsXX
readtextX
realXXX
reconfigureX
recoverXX
recursiveXX
reduce
refXX
referencesXX
referencingXX
refreshXX
regexpXX
regr_avgxXX
regr_avgyXX
regr_countXX
regr_interceptXX
regr_r2XX
regr_slopeXX
regr_sxxXX
regr_sxyXX
regr_syyXX
releaseXX
renameXX
repeatableXX
replaceXX
replicationXX
restoreX
restrictXX
resultX
returnXX
returnsXXX
revertX
revokeXXX
rightXXX
rlikeXX
roleXX
rolesXX
rollbackXX
rollupXX
rowXXX
row_numberX
rowcountX
rowsXXX
ruleX
runningXX
saveX
savepointXX
schemaXX
schemasXX
scopeXX
scrollXX
searchXX
secondX
securityauditX
seekXX
selectXXX
semiXX
sensitiveXX
sequencefileXX
serdepropertiesXX
serialize_fnX
session_userXX
setXXX
setuserX
showXXX
shutdownX
similarXX
sinX
sinhX
skipXX
smallintXXX
someXX
sortXX
specificXX
specifictypeXX
sqlX
sqlexceptionXX
sqlstateXX
sqlwarningXX
sqrtX
startX
staticXX
statisticsX
statsXX
stddev_popX
stddev_sampX
storedXX
straight_joinX
stringXX
structXX
submultisetXX
subsetXX
substringX
substring_regexXX
succeedsXX
sumX
symbolXX
symmetricXX
systemX
system_timeXX
system_userXX
tableXXX
tablesXX
tablesampleXXX
tanX
tanhX
tblpropertiesXX
terminatedXX
textfileXX
textsizeX
thenXXX
timeX
timestampXXX
timezone_hourXX
timezone_minuteXX
tinyintXX
toXXX
topX
trailingXX
tranX
transform
translateX
translate_regexXX
translationXX
treatXX
triggerXX
trimX
trim_arrayXX
trueXXX
truncateXXX
try_convertX
uescapeXX
unboundedXX
uncachedXX
unionXXX
uniqueXX
uniquejoin
unknownXXX
unnestXX
unpivotX
updateXXX
update_fnX
updatetextX
upperX
upsertXX
useXX
userXX
usingXXX
utc_tmestamp
valueX
value_ofXX
valuesXXX
var_popX
var_sampX
varbinaryXX
varcharXXX
varyingXX
versioningXX
viewXX
views
waitforX
whenXXX
wheneverXX
whereXXX
whileX
width_bucketXX
windowXX
withXXX
withinXX
withoutXX
writetextX
yearX