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



##########
File path: src/java/org/apache/cassandra/cql3/ReservedKeywords.java
##########
@@ -18,83 +18,46 @@
 
 package org.apache.cassandra.cql3;
 
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.nio.charset.StandardCharsets;
 import java.util.Set;
 
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.collect.ImmutableSet;
 
+import org.apache.cassandra.exceptions.ConfigurationException;
+
 class ReservedKeywords
 {
-    @VisibleForTesting
-    static final String[] reservedKeywords = new String[]
-                                                     {
-                                                     "SELECT",
-                                                     "FROM",
-                                                     "WHERE",
-                                                     "AND",
-                                                     "ENTRIES",
-                                                     "FULL",
-                                                     "INSERT",
-                                                     "UPDATE",
-                                                     "WITH",
-                                                     "LIMIT",
-                                                     "USING",
-                                                     "USE",
-                                                     "SET",
-                                                     "BEGIN",
-                                                     "UNLOGGED",
-                                                     "BATCH",
-                                                     "APPLY",
-                                                     "TRUNCATE",
-                                                     "DELETE",
-                                                     "IN",
-                                                     "CREATE",
-                                                     "KEYSPACE",
-                                                     "SCHEMA",
-                                                     "COLUMNFAMILY",
-                                                     "TABLE",
-                                                     "MATERIALIZED",
-                                                     "VIEW",
-                                                     "INDEX",
-                                                     "ON",
-                                                     "TO",
-                                                     "DROP",
-                                                     "PRIMARY",
-                                                     "INTO",
-                                                     "ALTER",
-                                                     "RENAME",
-                                                     "ADD",
-                                                     "ORDER",
-                                                     "BY",
-                                                     "ASC",
-                                                     "DESC",
-                                                     "ALLOW",
-                                                     "IF",
-                                                     "IS",
-                                                     "GRANT",
-                                                     "OF",
-                                                     "REVOKE",
-                                                     "MODIFY",
-                                                     "AUTHORIZE",
-                                                     "DESCRIBE",
-                                                     "EXECUTE",
-                                                     "NORECURSIVE",
-                                                     "TOKEN",
-                                                     "NULL",
-                                                     "NOT",
-                                                     "NAN",
-                                                     "INFINITY",
-                                                     "OR",
-                                                     "REPLACE",
-                                                     "DEFAULT",
-                                                     "UNSET",
-                                                     "MBEAN",
-                                                     "MBEANS"};
 
-    private static final Set<String> reservedSet = 
ImmutableSet.copyOf(reservedKeywords);
+    private static final String FILE_NAME = "reserved_keywords.txt";
+
+    static final Set<String> reservedKeywords = getFromResource();

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




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