Gerrrr commented on a change in pull request #1105:
URL: https://github.com/apache/cassandra/pull/1105#discussion_r666487123



##########
File path: pylib/cqlshlib/cqlhandling.py
##########
@@ -18,11 +18,58 @@
 # i.e., stuff that's not necessarily cqlsh-specific
 
 import traceback
-from cassandra.metadata import cql_keywords_reserved
+import cassandra
 from . import pylexotron, util
 
 Hint = pylexotron.Hint
 
+cql_keywords = set((
+    'add', 'aggregate', 'all', 'allow', 'alter', 'and', 'apply', 'as', 'asc', 
'ascii', 'authorize', 'batch', 'begin',
+    'bigint', 'blob', 'boolean', 'by', 'called', 'cast', 'clustering', 
'columnfamily', 'compact', 'contains', 'count',
+    'counter', 'create', 'custom', 'date', 'decimal', 'default', 'delete', 
'desc', 'describe', 'distinct', 'double',
+    'drop', 'duration', 'entries', 'execute', 'exists', 'filtering', 
'finalfunc', 'float', 'from', 'frozen', 'full',
+    'function', 'functions', 'grant', 'group', 'if', 'in', 'index', 'inet', 
'infinity', 'initcond', 'input', 'insert',
+    'int', 'into', 'is', 'json', 'key', 'keys', 'keyspace', 'keyspaces', 
'language', 'like', 'limit', 'list', 'login',
+    'map', 'materialized', 'mbean', 'mbeans', 'modify', 'nan', 'nologin', 
'norecursive', 'nosuperuser', 'not', 'null',
+    'of', 'on', 'options', 'or', 'order', 'partition', 'password', 'per', 
'permission', 'permissions', 'primary',
+    'rename', 'replace', 'returns', 'revoke', 'role', 'roles', 'schema', 
'select', 'set', 'sfunc', 'smallint', 'static',
+    'storage', 'stype', 'superuser', 'table', 'text', 'time', 'timestamp', 
'timeuuid', 'tinyint', 'to', 'token',
+    'trigger', 'truncate', 'ttl', 'tuple', 'type', 'unlogged', 'unset', 
'update', 'use', 'user', 'users', 'using',
+    'uuid', 'values', 'varchar', 'varint', 'view', 'where', 'with', 'writetime'
+))
+"""
+Set of keywords in CQL.
+
+Derived from .../cassandra/src/java/org/apache/cassandra/cql3/Lexer.g
+"""
+
+cql_keywords_unreserved = set((
+    'aggregate', 'all', 'as', 'called', 'clustering', 'compact', 'contains', 
'custom', 'exists', 'filtering',
+    'finalfunc', 'frozen', 'function', 'functions', 'group', 'initcond', 
'input', 'keys', 'keyspaces', 'language',
+    'like', 'list', 'login', 'map', 'nologin', 'nosuperuser', 'options', 
'partition', 'password', 'per', 'permission',
+    'permissions', 'returns', 'role', 'roles', 'sfunc', 'static', 'storage', 
'stype', 'superuser', 'trigger', 'tuple',
+    'type', 'user', 'users', 'values'
+))
+"""
+Set of unreserved keywords in CQL.
+
+Derived from .../cassandra/src/java/org/apache/cassandra/cql3/Parser.g
+"""

Review comment:
       Fixed in 
https://github.com/apache/cassandra/pull/1105/commits/489fe9db380d055e2b350b2c457a1fd6e0e4859b#diff-161e810fc6b29acd5307d1edbd01b314b7590c41eb92bbf6b18766588e0e0ef4L26-L58.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to